code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private AnimationListener createAnimationListener(final boolean show, final boolean cancel) {
return new AnimationListener() {
@Override
public void onAnimationStart(final Animation animation) {
}
@Override
public void onAnimationEnd(final Animation... | class class_name[name] begin[{]
method[createAnimationListener, return_type[type[AnimationListener]], modifier[private], parameter[show, cancel]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifi... | Keyword[private] identifier[AnimationListener] identifier[createAnimationListener] operator[SEP] Keyword[final] Keyword[boolean] identifier[show] , Keyword[final] Keyword[boolean] identifier[cancel] operator[SEP] {
Keyword[return] Keyword[new] identifier[AnimationListener] operator[SEP] operator[SEP] {
... |
@Indexable(type = IndexableType.DELETE)
@Override
public CommerceTierPriceEntry deleteCommerceTierPriceEntry(
CommerceTierPriceEntry commerceTierPriceEntry)
throws PortalException {
return commerceTierPriceEntryPersistence.remove(commerceTierPriceEntry);
} | class class_name[name] begin[{]
method[deleteCommerceTierPriceEntry, return_type[type[CommerceTierPriceEntry]], modifier[public], parameter[commerceTierPriceEntry]] begin[{]
return[call[commerceTierPriceEntryPersistence.remove, parameter[member[.commerceTierPriceEntry]]]]
end[}]
END[}] | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CommerceTierPriceEntry] identifier[deleteCommerceTierPriceEntry] operator[SEP] identifier[CommerceTierPric... |
public String getUserKeyFile() {
String location;
location = System.getProperty("X509_USER_KEY");
if (location != null) {
return location;
}
location = getProperty("userkey");
if (location != null) {
return location;
}
return ConfigUtil.discoverUserKeyLocation();
} | class class_name[name] begin[{]
method[getUserKeyFile, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], location]
assign[member[.location], call[System.getProperty, parameter[literal["X509_USER_KEY"]]]]
if[binary_operation[m... | Keyword[public] identifier[String] identifier[getUserKeyFile] 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] operato... |
public static <T extends Comparable<? super T>> Comparator<T> naturalOrder()
{
return new Comparator<T>()
{
@Override
public int compare(T o1, T o2)
{
return o1.compareTo(Parameters.checkNotNull(o2));
}
};
} | class class_name[name] begin[{]
method[naturalOrder, return_type[type[Comparator]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[Comparator] operator[<] identifier[T] operator[>] identifier[naturalOrder] operator[SEP] operator[SEP] {
Keyword[return] Keywor... |
private void handleClusterEvent(ClusterMembershipEvent event) {
PrimaryTerm term = this.term;
if (term != null && event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED && event.subject().id().equals(term.primary().memberId())) {
threadContext.execute(() -> {
state = PrimitiveState.SUSPENDED;
... | class class_name[name] begin[{]
method[handleClusterEvent, return_type[void], modifier[private], parameter[event]] begin[{]
local_variable[type[PrimaryTerm], term]
if[binary_operation[binary_operation[binary_operation[member[.term], !=, literal[null]], &&, binary_operation[call[event.ty... | Keyword[private] Keyword[void] identifier[handleClusterEvent] operator[SEP] identifier[ClusterMembershipEvent] identifier[event] operator[SEP] {
identifier[PrimaryTerm] identifier[term] operator[=] Keyword[this] operator[SEP] identifier[term] operator[SEP] Keyword[if] operator[SEP] identifier[term] operator[!=] ... |
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> onExceptionResumeNext(final MaybeSource<? extends T> next) {
ObjectHelper.requireNonNull(next, "next is null");
return RxJavaPlugins.onAssembly(new MaybeOnErrorNext<T>(this, Functions.justFunction(next), false));
... | class class_name[name] begin[{]
method[onExceptionResumeNext, return_type[type[Maybe]], modifier[final public], parameter[next]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.next], literal["next is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arg... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Maybe] operator[<] identifier[T] operator[>] identifier[onExceptionResumeNext] operator[SEP] Keyword[fin... |
public static byte isValid(String reportVersion) {
if (isOlderUnsupportedVersion(reportVersion)) {
return REPORT_INVALID_OLDER;
} else if (isNewerUnsupportedVersion(reportVersion)) {
return REPORT_INVALID_NEWER;
} else {
return REPORT_VALID;
}
} | class class_name[name] begin[{]
method[isValid, return_type[type[byte]], modifier[public static], parameter[reportVersion]] begin[{]
if[call[.isOlderUnsupportedVersion, parameter[member[.reportVersion]]]] begin[{]
return[member[.REPORT_INVALID_OLDER]]
else begin[{]
... | Keyword[public] Keyword[static] Keyword[byte] identifier[isValid] operator[SEP] identifier[String] identifier[reportVersion] operator[SEP] {
Keyword[if] operator[SEP] identifier[isOlderUnsupportedVersion] operator[SEP] identifier[reportVersion] operator[SEP] operator[SEP] {
Keyword[return] identifier[... |
public static int checkPreconditionsI(
final int value,
final ContractIntConditionType... conditions)
throws PreconditionViolationException
{
final Violations violations = innerCheckAllInt(value, conditions);
if (violations != null) {
throw new PreconditionViolationException(
failedM... | class class_name[name] begin[{]
method[checkPreconditionsI, return_type[type[int]], modifier[public static], parameter[value, conditions]] begin[{]
local_variable[type[Violations], violations]
if[binary_operation[member[.violations], !=, literal[null]]] begin[{]
ThrowStateme... | Keyword[public] Keyword[static] Keyword[int] identifier[checkPreconditionsI] operator[SEP] Keyword[final] Keyword[int] identifier[value] , Keyword[final] identifier[ContractIntConditionType] operator[...] identifier[conditions] operator[SEP] Keyword[throws] identifier[PreconditionViolationException] {
Keyword[f... |
Rule Stem() {
return FirstOf(
Note(),
Sequence(String("["),
Note(),
//some bogus file have [CE][A]
//for one MultiNote C-E and one
//note A.
ZeroOrMoreS(Note()),
String("]"),
OptionalS(NoteLength()),
OptionalS(Tie())).label(_MultiNote)
).label(Stem... | class class_name[name] begin[{]
method[Stem, return_type[type[Rule]], modifier[default], parameter[]] begin[{]
return[call[.FirstOf, parameter[call[.Note, parameter[]], call[.Sequence, parameter[call[.String, parameter[literal["["]]], call[.Note, parameter[]], call[.ZeroOrMoreS, parameter[call[.Note, p... | identifier[Rule] identifier[Stem] operator[SEP] operator[SEP] {
Keyword[return] identifier[FirstOf] operator[SEP] identifier[Note] operator[SEP] operator[SEP] , identifier[Sequence] operator[SEP] identifier[String] operator[SEP] literal[String] operator[SEP] , identifier[Note] operator[SEP] operator[SEP] , id... |
private static final boolean isDestinationPrefixValid(String destinationPrefix)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isDestinationPrefixValid", destinationPrefix);
boolean isValid = true; // Assume the prefix is valid until we know otherwise... | class class_name[name] begin[{]
method[isDestinationPrefixValid, return_type[type[boolean]], modifier[final private static], parameter[destinationPrefix]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
... | Keyword[private] Keyword[static] Keyword[final] Keyword[boolean] identifier[isDestinationPrefixValid] operator[SEP] identifier[String] identifier[destinationPrefix] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] opera... |
public static boolean isModelCopyGroup(CmsObject cms, CmsResource resource) {
boolean result = false;
if (isModelGroup(resource)) {
try {
CmsProperty tempElementsProp = cms.readPropertyObject(
resource,
CmsPropertyDefinition.PROPERTY_T... | class class_name[name] begin[{]
method[isModelCopyGroup, return_type[type[boolean]], modifier[public static], parameter[cms, resource]] begin[{]
local_variable[type[boolean], result]
if[call[.isModelGroup, parameter[member[.resource]]]] begin[{]
TryStatement(block=[LocalVari... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isModelCopyGroup] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] operator[SEP] {
Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[isM... |
public static boolean write(OutputStream os, Metadata data)
{
XmpDirectory dir = data.getFirstDirectoryOfType(XmpDirectory.class);
if (dir == null)
return false;
XMPMeta meta = dir.getXMPMeta();
try
{
SerializeOptions so = new SerializeOptions().setOmi... | class class_name[name] begin[{]
method[write, return_type[type[boolean]], modifier[public static], parameter[os, data]] begin[{]
local_variable[type[XmpDirectory], dir]
if[binary_operation[member[.dir], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[write] operator[SEP] identifier[OutputStream] identifier[os] , identifier[Metadata] identifier[data] operator[SEP] {
identifier[XmpDirectory] identifier[dir] operator[=] identifier[data] operator[SEP] identifier[getFirstDirectoryOfType] operator[SEP] i... |
private static JSONArray getArray(JsonObject object, String key)
throws IOException {
// Get the existing one
if (object.containsKey(key)) {
Object existing = object.get(key);
if (!(existing instanceof JSONArray)) {
throw new IOException("Invalid field... | class class_name[name] begin[{]
method[getArray, return_type[type[JSONArray]], modifier[private static], parameter[object, key]] begin[{]
if[call[object.containsKey, parameter[member[.key]]]] begin[{]
local_variable[type[Object], existing]
if[binary_operation... | Keyword[private] Keyword[static] identifier[JSONArray] identifier[getArray] operator[SEP] identifier[JsonObject] identifier[object] , identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[object] operator[SEP] identifier[containsKey] oper... |
public void parse(IVdmSourceUnit file)
{
ParseResult result;
try
{
LexLocation.resetLocations();
result = startParse(file, FileUtility.makeString(FileUtility.getContent(file.getFile())), file.getFile().getCharset());
setFileMarkers(file.getFile(), result);
if (result != null && result.getAst() != nu... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[public], parameter[file]] begin[{]
local_variable[type[ParseResult], result]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=resetLocations, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[void] identifier[parse] operator[SEP] identifier[IVdmSourceUnit] identifier[file] operator[SEP] {
identifier[ParseResult] identifier[result] operator[SEP] Keyword[try] {
identifier[LexLocation] operator[SEP] identifier[resetLocations] operator[SEP] operator[SEP] operator[SEP] i... |
public void onMouseUp(MouseUpEvent event) {
if (event.getNativeButton() != NativeEvent.BUTTON_RIGHT) {
Coordinate coordinate = getWorldPosition(event);
if (distanceLine.getOriginalLocation() == null) {
distanceLine.setGeometry(getFactory().createLineString(new Coordinate[] { coordinate }));
mapWidget.re... | class class_name[name] begin[{]
method[onMouseUp, return_type[void], modifier[public], parameter[event]] begin[{]
if[binary_operation[call[event.getNativeButton, parameter[]], !=, member[NativeEvent.BUTTON_RIGHT]]] begin[{]
local_variable[type[Coordinate], coordinate]
... | Keyword[public] Keyword[void] identifier[onMouseUp] operator[SEP] identifier[MouseUpEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] identifier[event] operator[SEP] identifier[getNativeButton] operator[SEP] operator[SEP] operator[!=] identifier[NativeEvent] operator[SEP] identifier[BUTTON_RIGHT... |
private int getIndex(PdfName key) {
for (int i = 0; i < VIEWER_PREFERENCES.length; i++) {
if (VIEWER_PREFERENCES[i].equals(key))
return i;
}
return -1;
} | class class_name[name] begin[{]
method[getIndex, return_type[type[int]], modifier[private], parameter[key]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=VIEWER_PREFERENCES, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[private] Keyword[int] identifier[getIndex] operator[SEP] identifier[PdfName] identifier[key] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[VIEWER_PREFERENCES] operator[SEP] identifier[length] operator[SEP] ide... |
private String fatJarLibraryPath(String linkage, String flavor) {
String sep = "/"; //System.getProperty("file.separator");
String os_name = getUnifiedOSName();
String os_arch = System.getProperty("os.arch");
String path = sep + "lib" + sep + linkage + sep + os_name + sep + os_arch + sep;
if (n... | class class_name[name] begin[{]
method[fatJarLibraryPath, return_type[type[String]], modifier[private], parameter[linkage, flavor]] begin[{]
local_variable[type[String], sep]
local_variable[type[String], os_name]
local_variable[type[String], os_arch]
local_variable[type[String],... | Keyword[private] identifier[String] identifier[fatJarLibraryPath] operator[SEP] identifier[String] identifier[linkage] , identifier[String] identifier[flavor] operator[SEP] {
identifier[String] identifier[sep] operator[=] literal[String] operator[SEP] identifier[String] identifier[os_name] operator[=] identifie... |
public Attributes put(String key, String value) {
int i = indexOfKey(key);
if (i != NotFound)
vals[i] = value;
else
add(key, value);
return this;
} | class class_name[name] begin[{]
method[put, return_type[type[Attributes]], modifier[public], parameter[key, value]] begin[{]
local_variable[type[int], i]
if[binary_operation[member[.i], !=, member[.NotFound]]] begin[{]
assign[member[.vals], member[.value]]
else begin... | Keyword[public] identifier[Attributes] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
Keyword[int] identifier[i] operator[=] identifier[indexOfKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identif... |
public void setNamespaceURI(String prefix, String namespaceURI) {
if (prefix == null)
throw new IllegalArgumentException("Cannot bind null prefix");
if (namespaceURI == null)
throw new IllegalArgumentException("Cannot set prefix to null namespace URI");
// no need to store
if (XMLConstants.... | class class_name[name] begin[{]
method[setNamespaceURI, return_type[void], modifier[public], parameter[prefix, namespaceURI]] begin[{]
if[binary_operation[member[.prefix], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[setNamespaceURI] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[namespaceURI] operator[SEP] {
Keyword[if] operator[SEP] identifier[prefix] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentEx... |
public static void writeCompletely(WritableByteChannel channel, ByteBuffer src) throws IOException {
while (src.hasRemaining()) {
channel.write(src);
}
} | class class_name[name] begin[{]
method[writeCompletely, return_type[void], modifier[public static], parameter[channel, src]] begin[{]
while[call[src.hasRemaining, parameter[]]] begin[{]
call[channel.write, parameter[member[.src]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[writeCompletely] operator[SEP] identifier[WritableByteChannel] identifier[channel] , identifier[ByteBuffer] identifier[src] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[while] operator[SEP] identifier[src] operator[SEP] identifier[hasRe... |
public void setSql(String sql) {
if (StringUtils.isNotEmpty(sql)) {
this.sql = sql.trim();
this.comment = parseComment(sql);
this.digest = MessageDigestUtils.MD5(sql);
String sqlStatement = this.sql.toLowerCase();
if (sqlStatement != null) {
this.select = sqlStatement.startsWith("select... | class class_name[name] begin[{]
method[setSql, return_type[void], modifier[public], parameter[sql]] begin[{]
if[call[StringUtils.isNotEmpty, parameter[member[.sql]]]] begin[{]
assign[THIS[member[None.sql]], call[sql.trim, parameter[]]]
assign[THIS... | Keyword[public] Keyword[void] identifier[setSql] operator[SEP] identifier[String] identifier[sql] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[sql] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[sq... |
public static CPOptionValue findByC_ERC(long companyId,
String externalReferenceCode)
throws com.liferay.commerce.product.exception.NoSuchCPOptionValueException {
return getPersistence().findByC_ERC(companyId, externalReferenceCode);
} | class class_name[name] begin[{]
method[findByC_ERC, return_type[type[CPOptionValue]], modifier[public static], parameter[companyId, externalReferenceCode]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPOptionValue] identifier[findByC_ERC] operator[SEP] Keyword[long] identifier[companyId] , identifier[String] identifier[externalReferenceCode] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] ide... |
public static List<Group> getGroups(Atom[] rAtoms) {
List<Group> groups = new ArrayList<Group>(rAtoms.length);
for (Atom a : rAtoms) {
Group g = a.getGroup();
if (g != null)
groups.add(g);
else
logger.info("Group not found for representative Atom {}", a);
}
return groups;
} | class class_name[name] begin[{]
method[getGroups, return_type[type[List]], modifier[public static], parameter[rAtoms]] begin[{]
local_variable[type[List], groups]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(di... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Group] operator[>] identifier[getGroups] operator[SEP] identifier[Atom] operator[SEP] operator[SEP] identifier[rAtoms] operator[SEP] {
identifier[List] operator[<] identifier[Group] operator[>] identifier[groups] operator[=] Keyword[new] ide... |
public <D extends Dialog> void setTypeface(D dialog, @StringRes int strResId) {
setTypeface(dialog, mApplication.getString(strResId));
} | class class_name[name] begin[{]
method[setTypeface, return_type[void], modifier[public], parameter[dialog, strResId]] begin[{]
call[.setTypeface, parameter[member[.dialog], call[mApplication.getString, parameter[member[.strResId]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[D] Keyword[extends] identifier[Dialog] operator[>] Keyword[void] identifier[setTypeface] operator[SEP] identifier[D] identifier[dialog] , annotation[@] identifier[StringRes] Keyword[int] identifier[strResId] operator[SEP] {
identifier[setTypeface] operator[SEP] identifier[... |
@Override
public ChargeInfo getChargeInfo(String CorpNum) throws PopbillException {
return httpget("/Cashbill/ChargeInfo", CorpNum, null, ChargeInfo.class);
} | class class_name[name] begin[{]
method[getChargeInfo, return_type[type[ChargeInfo]], modifier[public], parameter[CorpNum]] begin[{]
return[call[.httpget, parameter[literal["/Cashbill/ChargeInfo"], member[.CorpNum], literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, sel... | annotation[@] identifier[Override] Keyword[public] identifier[ChargeInfo] identifier[getChargeInfo] operator[SEP] identifier[String] identifier[CorpNum] operator[SEP] Keyword[throws] identifier[PopbillException] {
Keyword[return] identifier[httpget] operator[SEP] literal[String] , identifier[CorpNum] , Other[n... |
public static Set<Pair<Integer, Integer>> getTopicIdsFromContentSpec(final ContentSpec contentSpec) {
// Add the topics at this level to the database
final Set<Pair<Integer, Integer>> topicIds = new HashSet<Pair<Integer, Integer>>();
final List<SpecTopic> specTopics = contentSpec.getSpecTopics()... | class class_name[name] begin[{]
method[getTopicIdsFromContentSpec, return_type[type[Set]], modifier[public static], parameter[contentSpec]] begin[{]
local_variable[type[Set], topicIds]
local_variable[type[List], specTopics]
ForStatement(body=BlockStatement(label=None, statements=[IfStat... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[>] identifier[getTopicIdsFromContentSpec] operator[SEP] Keyword[final] identifier[ContentSpec] identifier[contentSpec] operator[SEP] {
Keyword[final] identifier... |
public boolean useIdentityColumnField()
{
if(useIdentityColumn == 0)
{
useIdentityColumn = -1;
FieldDescriptor[] pkFields = getPkFields();
for (int i = 0; i < pkFields.length; i++)
{
// to find the identity column we sea... | class class_name[name] begin[{]
method[useIdentityColumnField, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.useIdentityColumn], ==, literal[0]]] begin[{]
assign[member[.useIdentityColumn], literal[1]]
local_v... | Keyword[public] Keyword[boolean] identifier[useIdentityColumnField] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[useIdentityColumn] operator[==] Other[0] operator[SEP] {
identifier[useIdentityColumn] operator[=] operator[-] Other[1] operator[SEP] identifier[FieldDescriptor] opera... |
protected void proxyReadHandshake() {
// setup the read buffer - use JIT on the first read attempt. If it
// works, then any subsequent reads will use that same buffer.
connLink.getReadInterface().setJITAllocateSize(1024);
// reader.setBuffer(WsByteBufferPoolManagerImpl.getRef().allocat... | class class_name[name] begin[{]
method[proxyReadHandshake, return_type[void], modifier[protected], parameter[]] begin[{]
call[connLink.getReadInterface, parameter[]]
if[call[connLink.isAsyncConnect, parameter[]]] begin[{]
assign[THIS[member[None.proxyRead... | Keyword[protected] Keyword[void] identifier[proxyReadHandshake] operator[SEP] operator[SEP] {
identifier[connLink] operator[SEP] identifier[getReadInterface] operator[SEP] operator[SEP] operator[SEP] identifier[setJITAllocateSize] operator[SEP] Other[1024] operator[SEP] operator[SEP] Keyword[if] operator[SEP] id... |
public void printMessage(Diagnostic.Kind kind, CharSequence msg) {
printMessage(kind, msg, null, null, null);
} | class class_name[name] begin[{]
method[printMessage, return_type[void], modifier[public], parameter[kind, msg]] begin[{]
call[.printMessage, parameter[member[.kind], member[.msg], literal[null], literal[null], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[printMessage] operator[SEP] identifier[Diagnostic] operator[SEP] identifier[Kind] identifier[kind] , identifier[CharSequence] identifier[msg] operator[SEP] {
identifier[printMessage] operator[SEP] identifier[kind] , identifier[msg] , Other[null] , Other[null] , Other... |
private void setVersion(final Future<Void> aFuture) {
final StringBuilder specNote = new StringBuilder();
final String ptVersion = LOGGER.getMessage(MessageCodes.PT_011, PT_VERSION_NUM);
final String urlString = LOGGER.getMessage(MessageCodes.PT_012);
specNote.append(ptVersion).append(S... | class class_name[name] begin[{]
method[setVersion, return_type[void], modifier[private], parameter[aFuture]] begin[{]
local_variable[type[StringBuilder], specNote]
local_variable[type[String], ptVersion]
local_variable[type[String], urlString]
call[specNote.append, param... | Keyword[private] Keyword[void] identifier[setVersion] operator[SEP] Keyword[final] identifier[Future] operator[<] identifier[Void] operator[>] identifier[aFuture] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[specNote] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operato... |
public void marshall(StopApplicationRequest stopApplicationRequest, ProtocolMarshaller protocolMarshaller) {
if (stopApplicationRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(stopApplicati... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[stopApplicationRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.stopApplicationRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopApplicationRequest] identifier[stopApplicationRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopApplicationRequest] operator[==] Other[null] operator[SE... |
public ApiResponse<List<CorporationContactsLabelsResponse>> getCorporationsCorporationIdContactsLabelsWithHttpInfo(
Integer corporationId, String datasource, String ifNoneMatch, String token) throws ApiException {
com.squareup.okhttp.Call call = getCorporationsCorporationIdContactsLabelsValidateBefo... | class class_name[name] begin[{]
method[getCorporationsCorporationIdContactsLabelsWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[corporationId, datasource, ifNoneMatch, token]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
... | Keyword[public] identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[CorporationContactsLabelsResponse] operator[>] operator[>] identifier[getCorporationsCorporationIdContactsLabelsWithHttpInfo] operator[SEP] identifier[Integer] identifier[corporationId] , identifier[String] identifier[datasourc... |
public void setDirectEditProvider(I_CmsDirectEditProvider clazz) {
m_directEditProvider = clazz;
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(
Messages.get().getBundle().key(
Messages.INIT_DIRECT_EDIT_PROVIDER_1,
m_directEditPro... | class class_name[name] begin[{]
method[setDirectEditProvider, return_type[void], modifier[public], parameter[clazz]] begin[{]
assign[member[.m_directEditProvider], member[.clazz]]
if[call[CmsLog.INIT.isInfoEnabled, parameter[]]] begin[{]
call[CmsLog.INIT.... | Keyword[public] Keyword[void] identifier[setDirectEditProvider] operator[SEP] identifier[I_CmsDirectEditProvider] identifier[clazz] operator[SEP] {
identifier[m_directEditProvider] operator[=] identifier[clazz] operator[SEP] Keyword[if] operator[SEP] identifier[CmsLog] operator[SEP] identifier[INIT] operator[SEP... |
public void marshall(DescribeImportTasksRequest describeImportTasksRequest, ProtocolMarshaller protocolMarshaller) {
if (describeImportTasksRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(d... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeImportTasksRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeImportTasksRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeImportTasksRequest] identifier[describeImportTasksRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeImportTasksRequest] operator[==] Other[null]... |
static public void logError(String msg) {
AnalysisContext currentAnalysisContext2 = currentAnalysisContext();
if (currentAnalysisContext2 == null) {
return;
}
currentAnalysisContext2.logAnError(msg);
} | class class_name[name] begin[{]
method[logError, return_type[void], modifier[public static], parameter[msg]] begin[{]
local_variable[type[AnalysisContext], currentAnalysisContext2]
if[binary_operation[member[.currentAnalysisContext2], ==, literal[null]]] begin[{]
return[None... | Keyword[static] Keyword[public] Keyword[void] identifier[logError] operator[SEP] identifier[String] identifier[msg] operator[SEP] {
identifier[AnalysisContext] identifier[currentAnalysisContext2] operator[=] identifier[currentAnalysisContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] id... |
public Observable<Page<JobResponseInner>> listJobsAsync(final String resourceGroupName, final String resourceName) {
return listJobsWithServiceResponseAsync(resourceGroupName, resourceName)
.map(new Func1<ServiceResponse<Page<JobResponseInner>>, Page<JobResponseInner>>() {
@Override
... | class class_name[name] begin[{]
method[listJobsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName]] begin[{]
return[call[.listJobsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[JobResponseInner] operator[>] operator[>] identifier[listJobsAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[resourceName] operator[SEP] {
... |
@Override
@CheckForNull
public Language get(String languageKey) {
org.sonar.api.resources.Language language = languages.get(languageKey);
return language != null ? new Language(language.getKey(), language.getName(), language.getFileSuffixes()) : null;
} | class class_name[name] begin[{]
method[get, return_type[type[Language]], modifier[public], parameter[languageKey]] begin[{]
local_variable[type[org], language]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=language, postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[Override] annotation[@] identifier[CheckForNull] Keyword[public] identifier[Language] identifier[get] operator[SEP] identifier[String] identifier[languageKey] operator[SEP] {
identifier[org] operator[SEP] identifier[sonar] operator[SEP] identifier[api] operator[SEP] identifier[resources]... |
protected void toggleSelection(CmsTreeItem item, boolean changeState) {
boolean select = item.getCheckBox().isChecked();
select = changeState ? !select : select;
if (m_isSingleSelection) {
m_selectedCategories.clear();
uncheckAll(m_scrollList);
}
... | class class_name[name] begin[{]
method[toggleSelection, return_type[void], modifier[protected], parameter[item, changeState]] begin[{]
local_variable[type[boolean], select]
assign[member[.select], TernaryExpression(condition=MemberReference(member=changeState, postfix_operators=[], pref... | Keyword[protected] Keyword[void] identifier[toggleSelection] operator[SEP] identifier[CmsTreeItem] identifier[item] , Keyword[boolean] identifier[changeState] operator[SEP] {
Keyword[boolean] identifier[select] operator[=] identifier[item] operator[SEP] identifier[getCheckBox] operator[SEP] operator[SEP] operat... |
private void sendClickEvent(final Boolean isLongClick) {
if (getParent() instanceof AdapterView) {
final AdapterView adapterView = (AdapterView) getParent();
final int position = adapterView.getPositionForView(this);
final long id = adapterView.getItemIdAtPosition(position);
... | class class_name[name] begin[{]
method[sendClickEvent, return_type[void], modifier[private], parameter[isLongClick]] begin[{]
if[binary_operation[call[.getParent, parameter[]], instanceof, type[AdapterView]]] begin[{]
local_variable[type[AdapterView], adapterView]
local_... | Keyword[private] Keyword[void] identifier[sendClickEvent] operator[SEP] Keyword[final] identifier[Boolean] identifier[isLongClick] operator[SEP] {
Keyword[if] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] Keyword[instanceof] identifier[AdapterView] operator[SEP] {
Keyword[final] iden... |
public static FieldScope allowingFieldDescriptors(
FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) {
return FieldScopeImpl.createAllowingFieldDescriptors(asList(firstFieldDescriptor, rest));
} | class class_name[name] begin[{]
method[allowingFieldDescriptors, return_type[type[FieldScope]], modifier[public static], parameter[firstFieldDescriptor, rest]] begin[{]
return[call[FieldScopeImpl.createAllowingFieldDescriptors, parameter[call[.asList, parameter[member[.firstFieldDescriptor], member[.re... | Keyword[public] Keyword[static] identifier[FieldScope] identifier[allowingFieldDescriptors] operator[SEP] identifier[FieldDescriptor] identifier[firstFieldDescriptor] , identifier[FieldDescriptor] operator[...] identifier[rest] operator[SEP] {
Keyword[return] identifier[FieldScopeImpl] operator[SEP] identifier[... |
void rejectAttributes(RejectedAttributesLogContext rejectedAttributes, ModelNode attributeValue) {
for (RejectAttributeChecker checker : checks) {
rejectedAttributes.checkAttribute(checker, name, attributeValue);
}
} | class class_name[name] begin[{]
method[rejectAttributes, return_type[void], modifier[default], parameter[rejectedAttributes, attributeValue]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=checker, post... | Keyword[void] identifier[rejectAttributes] operator[SEP] identifier[RejectedAttributesLogContext] identifier[rejectedAttributes] , identifier[ModelNode] identifier[attributeValue] operator[SEP] {
Keyword[for] operator[SEP] identifier[RejectAttributeChecker] identifier[checker] operator[:] identifier[checks] op... |
public List<Type> union(List<Type> cl1, List<Type> cl2, BiPredicate<Type, Type> shouldSkip) {
if (cl1.isEmpty()) {
return cl2;
} else if (cl2.isEmpty()) {
return cl1;
} else if (shouldSkip.test(cl1.head, cl2.head)) {
return union(cl1.tail, cl2.tail, shouldSkip... | class class_name[name] begin[{]
method[union, return_type[type[List]], modifier[public], parameter[cl1, cl2, shouldSkip]] begin[{]
if[call[cl1.isEmpty, parameter[]]] begin[{]
return[member[.cl2]]
else begin[{]
if[call[cl2.isEmpty, parameter[]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[Type] operator[>] identifier[union] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[cl1] , identifier[List] operator[<] identifier[Type] operator[>] identifier[cl2] , identifier[BiPredicate] operator[<] identifier[Type] , iden... |
public static <T> T assertNotNull(T value, String message) {
if (value == null)
throw new IllegalStateException(message);
return value;
} | class class_name[name] begin[{]
method[assertNotNull, return_type[type[T]], modifier[public static], parameter[value, message]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, postfix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[assertNotNull] operator[SEP] identifier[T] identifier[value] , identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[throw] K... |
public String formatMessage(String key, Object[] args) {
assert _resourceProvider != null : "Received a null resource provider";
return _resourceProvider.formatMessage(key, args);
} | class class_name[name] begin[{]
method[formatMessage, return_type[type[String]], modifier[public], parameter[key, args]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=_resourceProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=L... | Keyword[public] identifier[String] identifier[formatMessage] operator[SEP] identifier[String] identifier[key] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[assert] identifier[_resourceProvider] operator[!=] Other[null] operator[:] literal[String] operator[SEP] Keywor... |
protected void doFilterImpl(ServletRequest pRequest, ServletResponse pResponse, FilterChain pChain) throws IOException, ServletException {
// TODO: Max size configuration, to avoid DOS attacks? OutOfMemory
// Size parameters
int width = ServletUtil.getIntParameter(pRequest, sizeWidthParam, ... | class class_name[name] begin[{]
method[doFilterImpl, return_type[void], modifier[protected], parameter[pRequest, pResponse, pChain]] begin[{]
local_variable[type[int], width]
local_variable[type[int], height]
if[binary_operation[binary_operation[member[.width], >, literal[0]], |... | Keyword[protected] Keyword[void] identifier[doFilterImpl] operator[SEP] identifier[ServletRequest] identifier[pRequest] , identifier[ServletResponse] identifier[pResponse] , identifier[FilterChain] identifier[pChain] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] {
Keywor... |
public List<CmsRole> getRolesForResource(CmsRequestContext context, CmsUser user, CmsResource resource)
throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
List<CmsRole> result = null;
try {
result = m_driverManager.getRolesForResource(dbc, user, r... | class class_name[name] begin[{]
method[getRolesForResource, return_type[type[List]], modifier[public], parameter[context, user, resource]] begin[{]
local_variable[type[CmsDbContext], dbc]
local_variable[type[List], result]
TryStatement(block=[StatementExpression(expression=Assignment(ex... | Keyword[public] identifier[List] operator[<] identifier[CmsRole] operator[>] identifier[getRolesForResource] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[CmsUser] identifier[user] , identifier[CmsResource] identifier[resource] operator[SEP] Keyword[throws] identifier[CmsException] {
... |
public BigramCollocation[] find(Corpus corpus, int k) {
BigramCollocation[] bigrams = new BigramCollocation[k];
HeapSelect<BigramCollocation> heap = new HeapSelect<>(bigrams);
Iterator<Bigram> iterator = corpus.getBigrams();
while (iterator.hasNext()) {
Bigram bigram... | class class_name[name] begin[{]
method[find, return_type[type[BigramCollocation]], modifier[public], parameter[corpus, k]] begin[{]
local_variable[type[BigramCollocation], bigrams]
local_variable[type[HeapSelect], heap]
local_variable[type[Iterator], iterator]
while[call... | Keyword[public] identifier[BigramCollocation] operator[SEP] operator[SEP] identifier[find] operator[SEP] identifier[Corpus] identifier[corpus] , Keyword[int] identifier[k] operator[SEP] {
identifier[BigramCollocation] operator[SEP] operator[SEP] identifier[bigrams] operator[=] Keyword[new] identifier[BigramColl... |
public void setComment(String comment, int type)
{
if (allow(type&ID3V1))
{
id3v1.setComment(comment);
}
if (allow(type&ID3V2))
{
id3v2.setCommentFrame("", comment);
}
} | class class_name[name] begin[{]
method[setComment, return_type[void], modifier[public], parameter[comment, type]] begin[{]
if[call[.allow, parameter[binary_operation[member[.type], &, member[.ID3V1]]]]] begin[{]
call[id3v1.setComment, parameter[member[.comment]]]
... | Keyword[public] Keyword[void] identifier[setComment] operator[SEP] identifier[String] identifier[comment] , Keyword[int] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[allow] operator[SEP] identifier[type] operator[&] identifier[ID3V1] operator[SEP] operator[SEP] {
identifier[i... |
void initializePatterns(QrCode qr) {
int where[] = QrCode.VERSION_INFO[qr.version].alignment;
qr.alignment.reset();
lookup.reset();
for (int row = 0; row < where.length; row++ ) {
for (int col = 0; col < where.length; col++) {
boolean skip = false;
if( row == 0 && col == 0 )
skip = true;
els... | class class_name[name] begin[{]
method[initializePatterns, return_type[void], modifier[default], parameter[qr]] begin[{]
local_variable[type[int], where]
call[qr.alignment.reset, parameter[]]
call[lookup.reset, parameter[]]
ForStatement(body=BlockStatement(label=... | Keyword[void] identifier[initializePatterns] operator[SEP] identifier[QrCode] identifier[qr] operator[SEP] {
Keyword[int] identifier[where] operator[SEP] operator[SEP] operator[=] identifier[QrCode] operator[SEP] identifier[VERSION_INFO] operator[SEP] identifier[qr] operator[SEP] identifier[version] operator[SEP... |
public static Connection getConnectionAuto(DataSource ds) throws SQLException {
if (get() == null)
return ds.getConnection();
else
return get().getConnection(ds);
} | class class_name[name] begin[{]
method[getConnectionAuto, return_type[type[Connection]], modifier[public static], parameter[ds]] begin[{]
if[binary_operation[call[.get, parameter[]], ==, literal[null]]] begin[{]
return[call[ds.getConnection, parameter[]]]
else begin[{]
return[call[.get,... | Keyword[public] Keyword[static] identifier[Connection] identifier[getConnectionAuto] operator[SEP] identifier[DataSource] identifier[ds] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[re... |
@Override
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
this.activityHandle = new NullActivityHandleImpl(in.readUTF());
} | class class_name[name] begin[{]
method[readExternal, return_type[void], modifier[public], parameter[in]] begin[{]
assign[THIS[member[None.activityHandle]], ClassCreator(arguments=[MethodInvocation(arguments=[], member=readUTF, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[readExternal] operator[SEP] identifier[ObjectInput] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] {
Keyword[this] operator[SEP] identifier[activityHandle] operator[=] Keyword[n... |
private void fillDensities(KNNQuery<O> knnq, DBIDs ids, WritableDoubleDataStore dens) {
FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Densities", ids.size(), LOG) : null;
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
final KNNList neighbors = knnq.getKNNForDBID(iter, k);
... | class class_name[name] begin[{]
method[fillDensities, return_type[void], modifier[private], parameter[knnq, ids, dens]] begin[{]
local_variable[type[FiniteProgress], prog]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecl... | Keyword[private] Keyword[void] identifier[fillDensities] operator[SEP] identifier[KNNQuery] operator[<] identifier[O] operator[>] identifier[knnq] , identifier[DBIDs] identifier[ids] , identifier[WritableDoubleDataStore] identifier[dens] operator[SEP] {
identifier[FiniteProgress] identifier[prog] operator[=] i... |
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException {
return callMethod(obj, KeyImpl.getInstance(methodName), args);
} | class class_name[name] begin[{]
method[callMethod, return_type[type[Object]], modifier[public static], parameter[obj, methodName, args]] begin[{]
return[call[.callMethod, parameter[member[.obj], call[KeyImpl.getInstance, parameter[member[.methodName]]], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Object] identifier[callMethod] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[methodName] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[PageException] {
Keyword[return] iden... |
public VoltTable[] run(short station, long ttl_seconds) throws VoltAbortException {
voltQueueSQL(getLastDeparts, station);
// For each station, calculate the wait time between departures
final StationStats stats = getStationStats(station, voltExecuteSQL());
voltQueueSQL(updateWaitTime,
... | class class_name[name] begin[{]
method[run, return_type[type[VoltTable]], modifier[public], parameter[station, ttl_seconds]] begin[{]
call[.voltQueueSQL, parameter[member[.getLastDeparts], member[.station]]]
local_variable[type[StationStats], stats]
call[.voltQueueSQL, p... | Keyword[public] identifier[VoltTable] operator[SEP] operator[SEP] identifier[run] operator[SEP] Keyword[short] identifier[station] , Keyword[long] identifier[ttl_seconds] operator[SEP] Keyword[throws] identifier[VoltAbortException] {
identifier[voltQueueSQL] operator[SEP] identifier[getLastDeparts] , identifie... |
public HostDiskPartitionInfo computeDiskPartitionInfoForResize(HostScsiDiskPartition partition, HostDiskPartitionBlockRange blockRange) throws NotFound, HostConfigFault, RuntimeFault, RemoteException {
return computeDiskPartitionInfoForResize(partition, blockRange, null);
} | class class_name[name] begin[{]
method[computeDiskPartitionInfoForResize, return_type[type[HostDiskPartitionInfo]], modifier[public], parameter[partition, blockRange]] begin[{]
return[call[.computeDiskPartitionInfoForResize, parameter[member[.partition], member[.blockRange], literal[null]]]]
end[}]... | Keyword[public] identifier[HostDiskPartitionInfo] identifier[computeDiskPartitionInfoForResize] operator[SEP] identifier[HostScsiDiskPartition] identifier[partition] , identifier[HostDiskPartitionBlockRange] identifier[blockRange] operator[SEP] Keyword[throws] identifier[NotFound] , identifier[HostConfigFault] , ide... |
public static SObject of(String key, InputStream is) {
try {
return new InputStreamSObject(key, $.requireNotNull(is));
} catch (Exception e) {
return getInvalidObject(key, e);
}
} | class class_name[name] begin[{]
method[of, return_type[type[SObject]], modifier[public static], parameter[key, is]] begin[{]
TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInv... | Keyword[public] Keyword[static] identifier[SObject] identifier[of] operator[SEP] identifier[String] identifier[key] , identifier[InputStream] identifier[is] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[new] identifier[InputStreamSObject] operator[SEP] identifier[key] , identifier[$] operat... |
public <T extends Comparable<? super T>> List<T> sort (Iterator<T> iter)
{
ArrayList<T> list = new ArrayList<T>();
CollectionUtil.addAll(list, iter);
return sort(list);
} | class class_name[name] begin[{]
method[sort, return_type[type[List]], modifier[public], parameter[iter]] begin[{]
local_variable[type[ArrayList], list]
call[CollectionUtil.addAll, parameter[member[.list], member[.iter]]]
return[call[.sort, parameter[member[.list]]]]
end[}]
E... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[sort] operator[SEP] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iter]... |
public List<Coordinate> getInterpolated() {
List<Coordinate> p = new ArrayList<Coordinate>();
if (pts.size() >= 2) {
double[] xs = new double[pts.size()];
double[] ys = new double[pts.size()];
for( int i = 0; i < xs.length; i++ ) {
Coordinate coordinat... | class class_name[name] begin[{]
method[getInterpolated, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], p]
if[binary_operation[call[pts.size, parameter[]], >=, literal[2]]] begin[{]
local_variable[type[double], xs]
loca... | Keyword[public] identifier[List] operator[<] identifier[Coordinate] operator[>] identifier[getInterpolated] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Coordinate] operator[>] identifier[p] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Coordinate] operator[>] ope... |
private String removeEscapeChar(final String str, final char escapeChar) {
if(str == null || str.isEmpty()) {
return str;
}
final String escapeStr = String.valueOf(escapeChar);
StringBuilder sb = new StringBuilder();
final LinkedLis... | class class_name[name] begin[{]
method[removeEscapeChar, return_type[type[String]], modifier[private], parameter[str, escapeChar]] begin[{]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, call[str.isEmpty, parameter[]]]] begin[{]
return[member[.str]]
... | Keyword[private] identifier[String] identifier[removeEscapeChar] operator[SEP] Keyword[final] identifier[String] identifier[str] , Keyword[final] Keyword[char] identifier[escapeChar] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] identifier[str] operator[SEP] ide... |
public String forecastJsonString(ForecastRequest request) throws ForecastException {
notNull("The ForecastRequest cannot be null.", request);
return new String(forecastJsonBytes(request));
} | class class_name[name] begin[{]
method[forecastJsonString, return_type[type[String]], modifier[public], parameter[request]] begin[{]
call[.notNull, parameter[literal["The ForecastRequest cannot be null."], member[.request]]]
return[ClassCreator(arguments=[MethodInvocation(arguments=[Mem... | Keyword[public] identifier[String] identifier[forecastJsonString] operator[SEP] identifier[ForecastRequest] identifier[request] operator[SEP] Keyword[throws] identifier[ForecastException] {
identifier[notNull] operator[SEP] literal[String] , identifier[request] operator[SEP] operator[SEP] Keyword[return] Keywor... |
public void setOwnerIds(java.util.Collection<String> ownerIds) {
if (ownerIds == null) {
this.ownerIds = null;
return;
}
this.ownerIds = new com.amazonaws.internal.SdkInternalList<String>(ownerIds);
} | class class_name[name] begin[{]
method[setOwnerIds, return_type[void], modifier[public], parameter[ownerIds]] begin[{]
if[binary_operation[member[.ownerIds], ==, literal[null]]] begin[{]
assign[THIS[member[None.ownerIds]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setOwnerIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[ownerIds] operator[SEP] {
Keyword[if] operator[SEP] identifier[ownerIds] operator[==] Other[null] operator... |
public void initKeyAreas(FieldTable table) throws DBException
{
if (m_VKeyList == null)
{
m_VKeyList = new Vector<PKeyArea>();
// Now, copy the keys
for (int iKeyArea = Constants.MAIN_KEY_AREA; iKeyArea <= table.getRecord().getKeyAreaCount() + Constants.MAIN_KEY_A... | class class_name[name] begin[{]
method[initKeyAreas, return_type[void], modifier[public], parameter[table]] begin[{]
if[binary_operation[member[.m_VKeyList], ==, literal[null]]] begin[{]
assign[member[.m_VKeyList], ClassCreator(arguments=[], body=None, constructor_type_a... | Keyword[public] Keyword[void] identifier[initKeyAreas] operator[SEP] identifier[FieldTable] identifier[table] operator[SEP] Keyword[throws] identifier[DBException] {
Keyword[if] operator[SEP] identifier[m_VKeyList] operator[==] Other[null] operator[SEP] {
identifier[m_VKeyList] operator[=] Keyword[new... |
public String getAName(BioPAXElement ele)
{
String name = null;
if (ele instanceof Named)
{
Named n = (Named) ele;
if (n.getDisplayName() != null && n.getDisplayName().length() > 0)
name = n.getDisplayName();
else if (n.getStandardName() != null && n.getStandardName().length() > 0)
name = n... | class class_name[name] begin[{]
method[getAName, return_type[type[String]], modifier[public], parameter[ele]] begin[{]
local_variable[type[String], name]
if[binary_operation[member[.ele], instanceof, type[Named]]] begin[{]
local_variable[type[Named], n]
... | Keyword[public] identifier[String] identifier[getAName] operator[SEP] identifier[BioPAXElement] identifier[ele] operator[SEP] {
identifier[String] identifier[name] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[ele] Keyword[instanceof] identifier[Named] operator[SEP] {
iden... |
public float[][] projToLatLon(float[][] from, float[][] to) {
float[] fromX = from[INDEX_X];
float[] fromY = from[INDEX_Y];
to[INDEX_LAT] = fromY;
to[INDEX_LON] = fromX;
return to;
} | class class_name[name] begin[{]
method[projToLatLon, return_type[type[float]], modifier[public], parameter[from, to]] begin[{]
local_variable[type[float], fromX]
local_variable[type[float], fromY]
assign[member[.to], member[.fromY]]
assign[member[.to], member[.fr... | Keyword[public] Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[projToLatLon] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[from] , Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[to] operator[SEP] {
... |
private void checkDrain() {
if (full && !paused && messages.size() < maxQueueSize / 2) {
full = false;
log.debug(String.format("%s - Connection to %s is drained", this, context.target()));
if (drainHandler != null) {
drainHandler.handle((Void) null);
}
}
} | class class_name[name] begin[{]
method[checkDrain, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.full], &&, member[.paused]], &&, binary_operation[call[messages.size, parameter[]], <, binary_operation[member[.maxQueueSize], /, literal[2... | Keyword[private] Keyword[void] identifier[checkDrain] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[full] operator[&&] operator[!] identifier[paused] operator[&&] identifier[messages] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[maxQueueSize] operator[/] ... |
@Override
public ScanResult scan(ScanRequest request) {
request = beforeClientExecution(request);
return executeScan(request);
} | class class_name[name] begin[{]
method[scan, return_type[type[ScanResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeScan, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ScanResult] identifier[scan] operator[SEP] identifier[ScanRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] iden... |
@SuppressWarnings("fallthrough")
public static int parsePattern(String rule, int pos, int limit,
String pattern, int[] parsedInts) {
// TODO Update this to handle surrogates
int[] p = new int[1];
int intCount = 0; // number of integers parsed
for (int i=0; i<pattern.lengt... | class class_name[name] begin[{]
method[parsePattern, return_type[type[int]], modifier[public static], parameter[rule, pos, limit, pattern, parsedInts]] begin[{]
local_variable[type[int], p]
local_variable[type[int], intCount]
ForStatement(body=BlockStatement(label=None, statements=[Loca... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[int] identifier[parsePattern] operator[SEP] identifier[String] identifier[rule] , Keyword[int] identifier[pos] , Keyword[int] identifier[limit] , identifier[String] identifier[pattern] , Ke... |
public static PactDslJsonRootValue stringMatcher(String regex, String value) {
if (!value.matches(regex)) {
throw new InvalidMatcherException(EXAMPLE + value + "\" does not match regular expression \"" +
regex + "\"");
}
PactDslJsonRootValue rootValue = new PactDslJsonRootValue();
rootValu... | class class_name[name] begin[{]
method[stringMatcher, return_type[type[PactDslJsonRootValue]], modifier[public static], parameter[regex, value]] begin[{]
if[call[value.matches, parameter[member[.regex]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(ope... | Keyword[public] Keyword[static] identifier[PactDslJsonRootValue] identifier[stringMatcher] operator[SEP] identifier[String] identifier[regex] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[value] operator[SEP] identifier[matches] operator[SEP] identifier[... |
public int deleteByTableName(String tableName) throws SQLException {
DeleteBuilder<DataColumns, TableColumnKey> db = deleteBuilder();
db.where().eq(DataColumns.COLUMN_TABLE_NAME, tableName);
PreparedDelete<DataColumns> deleteQuery = db.prepare();
int deleted = delete(deleteQuery);
return deleted;
} | class class_name[name] begin[{]
method[deleteByTableName, return_type[type[int]], modifier[public], parameter[tableName]] begin[{]
local_variable[type[DeleteBuilder], db]
call[db.where, parameter[]]
local_variable[type[PreparedDelete], deleteQuery]
local_variable[type[in... | Keyword[public] Keyword[int] identifier[deleteByTableName] operator[SEP] identifier[String] identifier[tableName] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[DeleteBuilder] operator[<] identifier[DataColumns] , identifier[TableColumnKey] operator[>] identifier[db] operator[=] identifier[... |
@Override
final protected long getLastModified(HttpServletRequest req) {
lastModifiedCount.incrementAndGet();
try {
return reportingGetLastModified(req);
} catch (ThreadDeath err) {
throw err;
} catch (RuntimeException err) {
getLogger().log(Level.SEVERE, null, err);
throw err;
} catch (IOExcepti... | class class_name[name] begin[{]
method[getLastModified, return_type[type[long]], modifier[final protected], parameter[req]] begin[{]
call[lastModifiedCount.incrementAndGet, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=req... | annotation[@] identifier[Override] Keyword[final] Keyword[protected] Keyword[long] identifier[getLastModified] operator[SEP] identifier[HttpServletRequest] identifier[req] operator[SEP] {
identifier[lastModifiedCount] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] Keyword[try... |
public String convertMFCMedCollToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertMFCMedCollToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], quali... | Keyword[public] identifier[String] identifier[convertMFCMedCollToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[ins... |
protected void fireTreeStructureChanged(Object source, Object[] path,
int[] childIndices, Object[] children)
{
for (TreeModelListener listener : treeModelListeners)
{
listener.treeStructureChanged(
new TreeModelEvent(source, path, childIndices, children));
... | class class_name[name] begin[{]
method[fireTreeStructureChanged, return_type[void], modifier[protected], parameter[source, path, childIndices, children]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[... | Keyword[protected] Keyword[void] identifier[fireTreeStructureChanged] operator[SEP] identifier[Object] identifier[source] , identifier[Object] operator[SEP] operator[SEP] identifier[path] , Keyword[int] operator[SEP] operator[SEP] identifier[childIndices] , identifier[Object] operator[SEP] operator[SEP] identifier[c... |
public String getURL(Class<? extends WebPage> clazz, Object param) throws IOException, SQLException {
WebPage page=WebPage.getWebPage(sourcePage.getServletContext(), clazz, param);
return getURL(page, param);
} | class class_name[name] begin[{]
method[getURL, return_type[type[String]], modifier[public], parameter[clazz, param]] begin[{]
local_variable[type[WebPage], page]
return[call[.getURL, parameter[member[.page], member[.param]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getURL] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[WebPage] operator[>] identifier[clazz] , identifier[Object] identifier[param] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SQLException] {
identifier[W... |
public boolean isDone() {
return status == Status.cancelled || status == Status.error
|| status == Status.complete || status == Status.refused;
} | class class_name[name] begin[{]
method[isDone, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[member[.status], ==, member[Status.cancelled]], ||, binary_operation[member[.status], ==, member[Status.error]]],... | Keyword[public] Keyword[boolean] identifier[isDone] operator[SEP] operator[SEP] {
Keyword[return] identifier[status] operator[==] identifier[Status] operator[SEP] identifier[cancelled] operator[||] identifier[status] operator[==] identifier[Status] operator[SEP] identifier[error] operator[||] identifier[status] ... |
private void onFinishLoading() {
// save the current hash
String hashOnStart = this.plugin.getStartRoute(isUsingHash());
// check if the url contains a hash.
// in case it has a hash, use this to route otherwise
// use the startRoute from the annotation
if (hashOnStart != null &&
hashOnS... | class class_name[name] begin[{]
method[onFinishLoading, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], hashOnStart]
if[binary_operation[binary_operation[member[.hashOnStart], !=, literal[null]], &&, binary_operation[call[hashOnStart.trim, parame... | Keyword[private] Keyword[void] identifier[onFinishLoading] operator[SEP] operator[SEP] {
identifier[String] identifier[hashOnStart] operator[=] Keyword[this] operator[SEP] identifier[plugin] operator[SEP] identifier[getStartRoute] operator[SEP] identifier[isUsingHash] operator[SEP] operator[SEP] operator[SEP] op... |
void getBroadcast() {
CmsCoreProvider.getService().getBroadcast(new AsyncCallback<List<CmsBroadcastMessage>>() {
public void onFailure(Throwable caught) {
// in case of a status code exception abort, indicates the session is no longer valid
if ((caught instanceof S... | class class_name[name] begin[{]
method[getBroadcast, return_type[void], modifier[default], parameter[]] begin[{]
call[CmsCoreProvider.getService, parameter[]]
end[}]
END[}] | Keyword[void] identifier[getBroadcast] operator[SEP] operator[SEP] {
identifier[CmsCoreProvider] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[getBroadcast] operator[SEP] Keyword[new] identifier[AsyncCallback] operator[<] identifier[List] operator[<] identifier[CmsBroa... |
public static float[] vLerp(float[] verts, int v1, int v2, float t) {
float[] dest = new float[3];
dest[0] = verts[v1 + 0] + (verts[v2 + 0] - verts[v1 + 0]) * t;
dest[1] = verts[v1 + 1] + (verts[v2 + 1] - verts[v1 + 1]) * t;
dest[2] = verts[v1 + 2] + (verts[v2 + 2] - verts[v1 + 2]) * t;
... | class class_name[name] begin[{]
method[vLerp, return_type[type[float]], modifier[public static], parameter[verts, v1, v2, t]] begin[{]
local_variable[type[float], dest]
assign[member[.dest], binary_operation[member[.verts], +, binary_operation[binary_operation[member[.verts], -, member[... | Keyword[public] Keyword[static] Keyword[float] operator[SEP] operator[SEP] identifier[vLerp] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[verts] , Keyword[int] identifier[v1] , Keyword[int] identifier[v2] , Keyword[float] identifier[t] operator[SEP] {
Keyword[float] operator[SEP] operat... |
public static List<Descriptor<RepositoryBrowser<?>>> filter(Class<? extends RepositoryBrowser> t) {
List<Descriptor<RepositoryBrowser<?>>> r = new ArrayList<>();
for (Descriptor<RepositoryBrowser<?>> d : RepositoryBrowser.all())
if(d.isSubTypeOf(t))
r.add(d);
return r... | class class_name[name] begin[{]
method[filter, return_type[type[List]], modifier[public static], parameter[t]] begin[{]
local_variable[type[List], r]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Descriptor] operator[<] identifier[RepositoryBrowser] operator[<] operator[?] operator[>] operator[>] operator[>] identifier[filter] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[RepositoryBrowser] operator[>] ... |
public Class<?> resolveStatic(String name) {
String className = staticNameMap.get(name);
if (className != null) {
Class<?> c = resolveClassFor(className);
if (c != null) {
return c;
}
}
return null;
} | class class_name[name] begin[{]
method[resolveStatic, return_type[type[Class]], modifier[public], parameter[name]] begin[{]
local_variable[type[String], className]
if[binary_operation[member[.className], !=, literal[null]]] begin[{]
local_variable[type[Class], c]
... | Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[resolveStatic] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[String] identifier[className] operator[=] identifier[staticNameMap] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SE... |
String getAttributeName(Method getter) {
synchronized (attributeNameCache) {
if ( !attributeNameCache.containsKey(getter) ) {
// First check for a hash key annotation
DynamoDBHashKey hashKeyAnnotation = getter.getAnnotation(DynamoDBHashKey.class);
if ... | class class_name[name] begin[{]
method[getAttributeName, return_type[type[String]], modifier[default], parameter[getter]] begin[{]
SYNCHRONIZED[member[.attributeNameCache]] BEGIN[{]
if[call[attributeNameCache.containsKey, parameter[member[.getter]]]] begin[{]
... | identifier[String] identifier[getAttributeName] operator[SEP] identifier[Method] identifier[getter] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[attributeNameCache] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[attributeNameCache] operator[SEP] identifier[containsK... |
public void setMaxDepth(int maxDepth) {
this.maxDepth = maxDepth > UNLIMITED_DEPTH ? maxDepth : UNLIMITED_DEPTH;
getConfig().setProperty(SPIDER_MAX_DEPTH, Integer.toString(this.maxDepth));
} | class class_name[name] begin[{]
method[setMaxDepth, return_type[void], modifier[public], parameter[maxDepth]] begin[{]
assign[THIS[member[None.maxDepth]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=maxDepth, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[void] identifier[setMaxDepth] operator[SEP] Keyword[int] identifier[maxDepth] operator[SEP] {
Keyword[this] operator[SEP] identifier[maxDepth] operator[=] identifier[maxDepth] operator[>] identifier[UNLIMITED_DEPTH] operator[?] identifier[maxDepth] operator[:] identifier[UNLIMITED_DEPTH]... |
private static boolean isIPAdressValid(final String ip){
// InetAddress.getByName() validates 'null' as a valid IP (localhost).
// we do not want that
if (hasValue(ip)) {
return IP_ADDR_PATTERN.matcher(ip).matches();
}
return false;
} | class class_name[name] begin[{]
method[isIPAdressValid, return_type[type[boolean]], modifier[private static], parameter[ip]] begin[{]
if[call[.hasValue, parameter[member[.ip]]]] begin[{]
return[call[IP_ADDR_PATTERN.matcher, parameter[member[.ip]]]]
else begin[{]
None
... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isIPAdressValid] operator[SEP] Keyword[final] identifier[String] identifier[ip] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasValue] operator[SEP] identifier[ip] operator[SEP] operator[SEP] {
Keyword[return] identifier[IP_ADDR_PATT... |
@Override
public void saveRequestedLoginRedirectInfo() {
final String redirectPath = requestManager.getRequestPathAndQuery();
final LoginRedirectBean redirectBean = createLoginRedirectBean(redirectPath);
// not use instance type because it might be extended
// (basically not use it w... | class class_name[name] begin[{]
method[saveRequestedLoginRedirectInfo, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[String], redirectPath]
local_variable[type[LoginRedirectBean], redirectBean]
call[sessionManager.setAttribute, parameter[call[.ge... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[saveRequestedLoginRedirectInfo] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] identifier[redirectPath] operator[=] identifier[requestManager] operator[SEP] identifier[getRequestPathAndQuery] operator[SEP] operator[SEP] ... |
public final void parse(final SelectStatement selectStatement) {
if (!lexerEngine.skipIfEqual(DefaultKeyword.GROUP)) {
return;
}
lexerEngine.accept(DefaultKeyword.BY);
while (true) {
addGroupByItem(basicExpressionParser.parse(selectStatement), selectStatement);
... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[final public], parameter[selectStatement]] begin[{]
if[call[lexerEngine.skipIfEqual, parameter[member[DefaultKeyword.GROUP]]]] begin[{]
return[None]
else begin[{]
None
end[}]
ca... | Keyword[public] Keyword[final] Keyword[void] identifier[parse] operator[SEP] Keyword[final] identifier[SelectStatement] identifier[selectStatement] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[lexerEngine] operator[SEP] identifier[skipIfEqual] operator[SEP] identifier[DefaultKeyword] operator... |
public static boolean isMaximum(InetAddress address) {
byte[] addr = address.getAddress();
for (int i = 0; i < addr.length; i++) {
if (addr[i] != (byte) 0xff) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[isMaximum, return_type[type[boolean]], modifier[public static], parameter[address]] begin[{]
local_variable[type[byte], addr]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=add... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isMaximum] operator[SEP] identifier[InetAddress] identifier[address] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[addr] operator[=] identifier[address] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP... |
public static void convert(String labelmapBase64, int realWidth, int realHeight, String outPath) {
try {
byte[] bytes = Base64Util.decode(labelmapBase64);
InputStream is = new ByteArrayInputStream(bytes);
BufferedImage image = ImageIO.read(is);
BufferedImage newI... | class class_name[name] begin[{]
method[convert, return_type[void], modifier[public static], parameter[labelmapBase64, realWidth, realHeight, outPath]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argume... | Keyword[public] Keyword[static] Keyword[void] identifier[convert] operator[SEP] identifier[String] identifier[labelmapBase64] , Keyword[int] identifier[realWidth] , Keyword[int] identifier[realHeight] , identifier[String] identifier[outPath] operator[SEP] {
Keyword[try] {
Keyword[byte] operator[SEP... |
private void forwardMessage(AbstractMessage aMessage,
SIBUuid8 targetMEUuid)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "forwardMessage",
new Object[]{aMessage, targetMEUuid});
if (TraceComponent.isAnyTracingEnabl... | class class_name[name] begin[{]
method[forwardMessage, return_type[void], modifier[private], parameter[aMessage, targetMEUuid]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, p... | Keyword[private] Keyword[void] identifier[forwardMessage] operator[SEP] identifier[AbstractMessage] identifier[aMessage] , identifier[SIBUuid8] identifier[targetMEUuid] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] ... |
public AbstractNumber multiply(Bruch operand) {
BigInteger z = getZaehler().multiply(operand.getZaehler());
BigInteger n = getNenner().multiply(operand.getNenner());
return Bruch.of(z, n).kuerzen();
} | class class_name[name] begin[{]
method[multiply, return_type[type[AbstractNumber]], modifier[public], parameter[operand]] begin[{]
local_variable[type[BigInteger], z]
local_variable[type[BigInteger], n]
return[call[Bruch.of, parameter[member[.z], member[.n]]]]
end[}]
END[}] | Keyword[public] identifier[AbstractNumber] identifier[multiply] operator[SEP] identifier[Bruch] identifier[operand] operator[SEP] {
identifier[BigInteger] identifier[z] operator[=] identifier[getZaehler] operator[SEP] operator[SEP] operator[SEP] identifier[multiply] operator[SEP] identifier[operand] operator[SEP... |
public <T extends AbstractPutObjectRequest> T withKey(String key) {
setKey(key);
@SuppressWarnings("unchecked") T t = (T)this;
return t;
} | class class_name[name] begin[{]
method[withKey, return_type[type[T]], modifier[public], parameter[key]] begin[{]
call[.setKey, parameter[member[.key]]]
local_variable[type[T], t]
return[member[.t]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[AbstractPutObjectRequest] operator[>] identifier[T] identifier[withKey] operator[SEP] identifier[String] identifier[key] operator[SEP] {
identifier[setKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] annotation[@] identifier[Supp... |
private Element writeModule() {
Element element = doc.createElement("module");
rootElement.appendChild(element);
return element;
} | class class_name[name] begin[{]
method[writeModule, return_type[type[Element]], modifier[private], parameter[]] begin[{]
local_variable[type[Element], element]
call[rootElement.appendChild, parameter[member[.element]]]
return[member[.element]]
end[}]
END[}] | Keyword[private] identifier[Element] identifier[writeModule] operator[SEP] operator[SEP] {
identifier[Element] identifier[element] operator[=] identifier[doc] operator[SEP] identifier[createElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[rootElement] operator[SEP] identifier[appendC... |
public String getWithLog(String key) {
final String value = getStr(key);
if (value == null) {
log.debug("No key define for [{}]!", key);
}
return value;
} | class class_name[name] begin[{]
method[getWithLog, return_type[type[String]], modifier[public], parameter[key]] begin[{]
local_variable[type[String], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[log.debug, parameter[literal["No key... | Keyword[public] identifier[String] identifier[getWithLog] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[final] identifier[String] identifier[value] operator[=] identifier[getStr] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] opera... |
private int compareKinds(Kind kind1, Kind kind2) {
if (kind1 == Kind.LENGTH && kind2 == Kind.DATA) {
return -1;
}
if (kind1 == Kind.DATA && kind2 == Kind.LENGTH) {
return 1;
}
return kind1.compareTo(kind2);
} | class class_name[name] begin[{]
method[compareKinds, return_type[type[int]], modifier[private], parameter[kind1, kind2]] begin[{]
if[binary_operation[binary_operation[member[.kind1], ==, member[Kind.LENGTH]], &&, binary_operation[member[.kind2], ==, member[Kind.DATA]]]] begin[{]
ret... | Keyword[private] Keyword[int] identifier[compareKinds] operator[SEP] identifier[Kind] identifier[kind1] , identifier[Kind] identifier[kind2] operator[SEP] {
Keyword[if] operator[SEP] identifier[kind1] operator[==] identifier[Kind] operator[SEP] identifier[LENGTH] operator[&&] identifier[kind2] operator[==] iden... |
protected ByteCodeAppender.Size apply(MethodVisitor methodVisitor,
Context implementationContext,
MethodDescription instrumentedMethod,
TypeDescription.Generic fixedValueType,
... | class class_name[name] begin[{]
method[apply, return_type[type[ByteCodeAppender]], modifier[protected], parameter[methodVisitor, implementationContext, instrumentedMethod, fixedValueType, valueLoadingInstruction]] begin[{]
local_variable[type[StackManipulation], assignment]
if[call[assi... | Keyword[protected] identifier[ByteCodeAppender] operator[SEP] identifier[Size] identifier[apply] operator[SEP] identifier[MethodVisitor] identifier[methodVisitor] , identifier[Context] identifier[implementationContext] , identifier[MethodDescription] identifier[instrumentedMethod] , identifier[TypeDescription] opera... |
protected String getCurrentValueForGroup(String group) {
Object obj = groupValues.get(group);
if (obj == null) {
return "";
}
return obj.toString();
} | class class_name[name] begin[{]
method[getCurrentValueForGroup, return_type[type[String]], modifier[protected], parameter[group]] begin[{]
local_variable[type[Object], obj]
if[binary_operation[member[.obj], ==, literal[null]]] begin[{]
return[literal[""]]
else begin[... | Keyword[protected] identifier[String] identifier[getCurrentValueForGroup] operator[SEP] identifier[String] identifier[group] operator[SEP] {
identifier[Object] identifier[obj] operator[=] identifier[groupValues] operator[SEP] identifier[get] operator[SEP] identifier[group] operator[SEP] operator[SEP] Keyword[if]... |
private void populateCache() {
if (disableAllCaches || disablePopulateCache) {
return;
}
// Populate Cache
final long ts = System.currentTimeMillis();
for (int index = 1; ((index < storageBlock) && (cacheInternalNodes.size() < readCacheInternal) && (cacheLeafNodes
.size() < readCacheLeaf)); index++) {
... | class class_name[name] begin[{]
method[populateCache, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.disableAllCaches], ||, member[.disablePopulateCache]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable... | Keyword[private] Keyword[void] identifier[populateCache] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[disableAllCaches] operator[||] identifier[disablePopulateCache] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[final] Keyword[long] identifier[ts] operator... |
public static java.util.List<com.liferay.commerce.model.CPDefinitionInventory> getCPDefinitionInventoriesByUuidAndCompanyId(
String uuid, long companyId) {
return getService()
.getCPDefinitionInventoriesByUuidAndCompanyId(uuid, companyId);
} | class class_name[name] begin[{]
method[getCPDefinitionInventoriesByUuidAndCompanyId, return_type[type[java]], modifier[public static], parameter[uuid, companyId]] begin[{]
return[call[.getService, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CPDefinitionInventory] operator[>] identifier[getCPDefi... |
public static FileFilter xor(FileFilter leftOperand, FileFilter rightOperand) {
return compose(LogicalOperator.XOR, leftOperand, rightOperand);
} | class class_name[name] begin[{]
method[xor, return_type[type[FileFilter]], modifier[public static], parameter[leftOperand, rightOperand]] begin[{]
return[call[.compose, parameter[member[LogicalOperator.XOR], member[.leftOperand], member[.rightOperand]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[FileFilter] identifier[xor] operator[SEP] identifier[FileFilter] identifier[leftOperand] , identifier[FileFilter] identifier[rightOperand] operator[SEP] {
Keyword[return] identifier[compose] operator[SEP] identifier[LogicalOperator] operator[SEP] identifier[XOR] , ide... |
@Override
public void processEvents() throws IOException, EncodingException {
if (!getIsConnected()) {
LOGGER.warning("Not connnected...");
}
while (true) {
ByteBuffer block = null;
synchronized (receiveBuffer) {
if (!receiveBuffer.isEmpty()) {
block = receiveBuffer.re... | class class_name[name] begin[{]
method[processEvents, return_type[void], modifier[public], parameter[]] begin[{]
if[call[.getIsConnected, parameter[]]] begin[{]
call[LOGGER.warning, parameter[literal["Not connnected..."]]]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[processEvents] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[EncodingException] {
Keyword[if] operator[SEP] operator[!] identifier[getIsConnected] operator[SEP] operator[SEP] operator[SEP] {
... |
public static String make512Safe(StringBuffer input, String newline) {
StringBuilder result = new StringBuilder();
String content = input.toString();
String rest = content;
while (!rest.isEmpty()) {
if (rest.contains("\n")) {
String line = rest.substring(0, rest.indexOf("\n"));
rest = rest.substring(... | class class_name[name] begin[{]
method[make512Safe, return_type[type[String]], modifier[public static], parameter[input, newline]] begin[{]
local_variable[type[StringBuilder], result]
local_variable[type[String], content]
local_variable[type[String], rest]
while[call[res... | Keyword[public] Keyword[static] identifier[String] identifier[make512Safe] operator[SEP] identifier[StringBuffer] identifier[input] , identifier[String] identifier[newline] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP]... |
public EEnum getIDEStructureFLAGS() {
if (ideStructureFLAGSEEnum == null) {
ideStructureFLAGSEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(119);
}
return ideStructureFLAGSEEnum;
} | class class_name[name] begin[{]
method[getIDEStructureFLAGS, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ideStructureFLAGSEEnum], ==, literal[null]]] begin[{]
assign[member[.ideStructureFLAGSEEnum], Cast(expression=Method... | Keyword[public] identifier[EEnum] identifier[getIDEStructureFLAGS] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ideStructureFLAGSEEnum] operator[==] Other[null] operator[SEP] {
identifier[ideStructureFLAGSEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.