code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String convert(final StringBuilder holder, final String text, final String ... vars) {
StringBuilder sb = null;
int idx,index=0,prev = 0;
if(text.contains("%s")) {
sb = new StringBuilder();
}
StringBuilder[] sbs = new StringBuilder[] {sb,holder};
boolean replace, clearIndex = false;
... | class class_name[name] begin[{]
method[convert, return_type[type[String]], modifier[public static], parameter[holder, text, vars]] begin[{]
local_variable[type[StringBuilder], sb]
local_variable[type[int], idx]
if[call[text.contains, parameter[literal["%s"]]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[convert] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[holder] , Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] operator[...] identifier[vars] operator[SEP] {
identifier[StringBuilder] iden... |
@Override
public void prepare(FeatureProvider provider)
{
super.prepare(provider);
transformable = provider.getFeature(Transformable.class);
transformable.addListener(this);
if (provider instanceof CollidableListener)
{
addListener((CollidableListe... | class class_name[name] begin[{]
method[prepare, return_type[void], modifier[public], parameter[provider]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepare, postfix_operators=[], prefi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[prepare] operator[SEP] identifier[FeatureProvider] identifier[provider] operator[SEP] {
Keyword[super] operator[SEP] identifier[prepare] operator[SEP] identifier[provider] operator[SEP] operator[SEP] identifier[transformable] operator[=]... |
@Override
public void close() {
if(jdbcReader != null) {
try {
jdbcReader.close();
} catch(Exception e) {
LOG.error("Unable to close jdbcReader", e);
}
}
if(jdbcWriter != null) {
try {
jdbcWriter.... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.jdbcReader], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_oper... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[jdbcReader] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[jdbcReader] operator[SEP] identifier[close] operator[SEP] ... |
private static int[] lift(int[] path, int[] mapping) {
for (int i = 0; i < path.length; i++) {
path[i] = mapping[path[i]];
}
return path;
} | class class_name[name] begin[{]
method[lift, return_type[type[int]], modifier[private static], parameter[path, mapping]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=path, postfix_operators=[], prefix_oper... | Keyword[private] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[lift] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[path] , Keyword[int] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Othe... |
public synchronized void add(GenericKeys key) {
KeyBucket bucket = makeBucket(key.getName().charAt(0));
if (null != bucket) {
bucket.add(key);
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[synchronized public], parameter[key]] begin[{]
local_variable[type[KeyBucket], bucket]
if[binary_operation[literal[null], !=, member[.bucket]]] begin[{]
call[bucket.add, parameter[member[.key... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] identifier[GenericKeys] identifier[key] operator[SEP] {
identifier[KeyBucket] identifier[bucket] operator[=] identifier[makeBucket] operator[SEP] identifier[key] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operato... |
public static String stacktraceToString(Throwable throwable, int limit, Map<Character, String> replaceCharToStrMap) {
final FastByteArrayOutputStream baos = new FastByteArrayOutputStream();
throwable.printStackTrace(new PrintStream(baos));
String exceptionStr = baos.toString();
int length = exceptionStr.length(... | class class_name[name] begin[{]
method[stacktraceToString, return_type[type[String]], modifier[public static], parameter[throwable, limit, replaceCharToStrMap]] begin[{]
local_variable[type[FastByteArrayOutputStream], baos]
call[throwable.printStackTrace, parameter[ClassCreator(argument... | Keyword[public] Keyword[static] identifier[String] identifier[stacktraceToString] operator[SEP] identifier[Throwable] identifier[throwable] , Keyword[int] identifier[limit] , identifier[Map] operator[<] identifier[Character] , identifier[String] operator[>] identifier[replaceCharToStrMap] operator[SEP] {
Keyw... |
public Version nextBuildMetaData() {
final String[] newBuildMetaData = incrementIdentifier(this.buildMetaDataParts);
return new Version(this.major, this.minor, this.patch, this.preReleaseParts,
newBuildMetaData);
} | class class_name[name] begin[{]
method[nextBuildMetaData, return_type[type[Version]], modifier[public], parameter[]] begin[{]
local_variable[type[String], newBuildMetaData]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(... | Keyword[public] identifier[Version] identifier[nextBuildMetaData] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[newBuildMetaData] operator[=] identifier[incrementIdentifier] operator[SEP] Keyword[this] operator[SEP] identifier[buildMetaDataParts] operator[... |
public void marshall(CreateTaskRequest createTaskRequest, ProtocolMarshaller protocolMarshaller) {
if (createTaskRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createTaskRequest.getSourceL... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createTaskRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createTaskRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateTaskRequest] identifier[createTaskRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createTaskRequest] operator[==] Other[null] operator[SEP] {
... |
public static ElasticSearch getElasticSearchSink(String elasticSearch){
init();
if(elasticSearch == null || elasticSearch.equals("")) {
return elasticSearchSink;
}
ElasticSearch elasticSearchSink = elasticSearchMap.get(elasticSearch);
if(elasticSearchSink == null) {
synchronized (elasticSearchMap) {
... | class class_name[name] begin[{]
method[getElasticSearchSink, return_type[type[ElasticSearch]], modifier[public static], parameter[elasticSearch]] begin[{]
call[.init, parameter[]]
if[binary_operation[binary_operation[member[.elasticSearch], ==, literal[null]], ||, call[elasticSe... | Keyword[public] Keyword[static] identifier[ElasticSearch] identifier[getElasticSearchSink] operator[SEP] identifier[String] identifier[elasticSearch] operator[SEP] {
identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elasticSearch] operator[==] Other[null] operator[||... |
public static ExecutableScript parseCamundaScript(Element scriptElement) {
String scriptLanguage = scriptElement.attribute("scriptFormat");
if (scriptLanguage == null || scriptLanguage.isEmpty()) {
throw new BpmnParseException("Missing attribute 'scriptFormatAttribute' for 'script' element", scriptElement... | class class_name[name] begin[{]
method[parseCamundaScript, return_type[type[ExecutableScript]], modifier[public static], parameter[scriptElement]] begin[{]
local_variable[type[String], scriptLanguage]
if[binary_operation[binary_operation[member[.scriptLanguage], ==, literal[null]], ||, ... | Keyword[public] Keyword[static] identifier[ExecutableScript] identifier[parseCamundaScript] operator[SEP] identifier[Element] identifier[scriptElement] operator[SEP] {
identifier[String] identifier[scriptLanguage] operator[=] identifier[scriptElement] operator[SEP] identifier[attribute] operator[SEP] literal[Str... |
@SuppressWarnings("checkstyle:npathcomplexity")
protected void copyNonStaticPublicJvmOperations(JvmGenericType source, JvmGenericType target,
Set<ActionPrototype> createdActions, Procedure2<? super JvmOperation, ? super ITreeAppendable> bodyBuilder) {
final Iterable<JvmOperation> operations = Iterables.transform(... | class class_name[name] begin[{]
method[copyNonStaticPublicJvmOperations, return_type[void], modifier[protected], parameter[source, target, createdActions, bodyBuilder]] begin[{]
local_variable[type[Iterable], operations]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDecl... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[copyNonStaticPublicJvmOperations] operator[SEP] identifier[JvmGenericType] identifier[source] , identifier[JvmGenericType] identifier[target] , identifier[Set] operator[<] identifier[Acti... |
public static Map<String, Object> onInExpression(Expression expression, EntityMetadata m,
KunderaMetadata kunderaMetadata, KunderaQuery kunderaQuery)
{
InExpression inExp = (InExpression) expression;
Expression sfpExp = inExp.getExpression();
Map<String, Object> map = KunderaQuer... | class class_name[name] begin[{]
method[onInExpression, return_type[type[Map]], modifier[public static], parameter[expression, m, kunderaMetadata, kunderaQuery]] begin[{]
local_variable[type[InExpression], inExp]
local_variable[type[Expression], sfpExp]
local_variable[type[Map], map]
... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[onInExpression] operator[SEP] identifier[Expression] identifier[expression] , identifier[EntityMetadata] identifier[m] , identifier[KunderaMetadata] identifier[kunderaMetadata] , identifier[Kun... |
private void textFieldKeyCodeKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldKeyCodeKeyPressed
if (this.buttonEditKeyCode.isSelected()){
switch(evt.getKeyCode()){
case KeyEvent.VK_META:
case KeyEvent.VK_ALT:
case KeyEvent.VK_SHIFT:
case KeyEvent.VK_CONTROL: ... | class class_name[name] begin[{]
method[textFieldKeyCodeKeyPressed, return_type[void], modifier[private], parameter[evt]] begin[{]
if[THIS[member[None.buttonEditKeyCode]call[None.isSelected, parameter[]]]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(memb... | Keyword[private] Keyword[void] identifier[textFieldKeyCodeKeyPressed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyEvent] identifier[evt] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[buttonEditKeyCode]... |
@Get("/header")
public HttpResponse header(@Header String xArmeriaText, /* no conversion */
@Header List<Integer> xArmeriaSequence, /* converted into integer */
Cookies cookies /* converted into Cookies object */)
... | class class_name[name] begin[{]
method[header, return_type[type[HttpResponse]], modifier[public], parameter[xArmeriaText, xArmeriaSequence, cookies]] begin[{]
return[call[HttpResponse.of, parameter[member[HttpStatus.OK], member[MediaType.JSON_UTF_8], call[mapper.writeValueAsBytes, parameter[call[Arrays... | annotation[@] identifier[Get] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[HttpResponse] identifier[header] operator[SEP] annotation[@] identifier[Header] identifier[String] identifier[xArmeriaText] , annotation[@] identifier[Header] identifier[List] operator[<] identifier[Integer] operator[>... |
public PointList calcPoints() {
final PointList points = new PointList(edgeIds.size() + 1, nodeAccess.is3D());
if (edgeIds.isEmpty()) {
if (isFound()) {
points.add(graph.getNodeAccess(), endNode);
}
return points;
}
int tmpNode = getFr... | class class_name[name] begin[{]
method[calcPoints, return_type[type[PointList]], modifier[public], parameter[]] begin[{]
local_variable[type[PointList], points]
if[call[edgeIds.isEmpty, parameter[]]] begin[{]
if[call[.isFound, parameter[]]] begin[{]
... | Keyword[public] identifier[PointList] identifier[calcPoints] operator[SEP] operator[SEP] {
Keyword[final] identifier[PointList] identifier[points] operator[=] Keyword[new] identifier[PointList] operator[SEP] identifier[edgeIds] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] , id... |
@XmlElementDecl(namespace = "http://www.drugbank.ca", name = "adverse-reaction", scope = SnpAdverseDrugReactionType.class)
public JAXBElement<String> createSnpAdverseDrugReactionTypeAdverseReaction(String value) {
return new JAXBElement<String>(_SnpAdverseDrugReactionTypeAdverseReaction_QNAME, String.class,... | class class_name[name] begin[{]
method[createSnpAdverseDrugReactionTypeAdverseReaction, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_SnpAdverseDrugReactionTypeAdverseReaction_QNAME, postfix_operators=[], prefix_opera... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[SnpAdverseDrugReactionType] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] ... |
public void setEnabled(boolean bEnable)
{
if (m_vScreenField != null)
{
for (Enumeration<Object> e = m_vScreenField.elements() ; e.hasMoreElements() ;)
{
((ScreenComponent)e.nextElement()).setEnabled(bEnable);
}
}
} | class class_name[name] begin[{]
method[setEnabled, return_type[void], modifier[public], parameter[bEnable]] begin[{]
if[binary_operation[member[.m_vScreenField], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast... | Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[bEnable] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_vScreenField] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Enumeration] operator[<] identifier[Object] operat... |
public static boolean isPotentiallyEncryptedBytes(byte[] bytes) {
checkNotNull(bytes, "bytes");
// The number of bytes is a non-zero multiple of the block size.
try {
return bytes.length != 0 && bytes.length % Cipher.getInstance(CIPHER).getBlockSize() == 0;
} catch (Throwabl... | class class_name[name] begin[{]
method[isPotentiallyEncryptedBytes, return_type[type[boolean]], modifier[public static], parameter[bytes]] begin[{]
call[.checkNotNull, parameter[member[.bytes], literal["bytes"]]]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=Bi... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isPotentiallyEncryptedBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[bytes] , literal[String] operator[SEP] operator[SEP] Keyword[try] {
Keyw... |
public GCBOXRES createGCBOXRESFromString(EDataType eDataType, String initialValue) {
GCBOXRES result = GCBOXRES.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
} | class class_name[name] begin[{]
method[createGCBOXRESFromString, return_type[type[GCBOXRES]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[GCBOXRES], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(expression... | Keyword[public] identifier[GCBOXRES] identifier[createGCBOXRESFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[GCBOXRES] identifier[result] operator[=] identifier[GCBOXRES] operator[SEP] identifier[get] operator[SEP] i... |
public void setDisks(java.util.Collection<Disk> disks) {
if (disks == null) {
this.disks = null;
return;
}
this.disks = new java.util.ArrayList<Disk>(disks);
} | class class_name[name] begin[{]
method[setDisks, return_type[void], modifier[public], parameter[disks]] begin[{]
if[binary_operation[member[.disks], ==, literal[null]]] begin[{]
assign[THIS[member[None.disks]], literal[null]]
return[None]
else begin[{... | Keyword[public] Keyword[void] identifier[setDisks] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Disk] operator[>] identifier[disks] operator[SEP] {
Keyword[if] operator[SEP] identifier[disks] operator[==] Other[null] operator[SEP] {
... |
public void add(Item item)
{
Item innerItem = trie.get(item.key);
if (innerItem == null)
{
innerItem = item;
trie.put(innerItem.key, innerItem);
}
else
{
innerItem.combine(item);
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[item]] begin[{]
local_variable[type[Item], innerItem]
if[binary_operation[member[.innerItem], ==, literal[null]]] begin[{]
assign[member[.innerItem], member[.item]]
... | Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Item] identifier[item] operator[SEP] {
identifier[Item] identifier[innerItem] operator[=] identifier[trie] operator[SEP] identifier[get] operator[SEP] identifier[item] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] oper... |
@Override
public CProduct findByGroupId_Last(long groupId,
OrderByComparator<CProduct> orderByComparator)
throws NoSuchCProductException {
CProduct cProduct = fetchByGroupId_Last(groupId, orderByComparator);
if (cProduct != null) {
return cProduct;
}
StringBundler msg = new StringBundler(4);
msg.ap... | class class_name[name] begin[{]
method[findByGroupId_Last, return_type[type[CProduct]], modifier[public], parameter[groupId, orderByComparator]] begin[{]
local_variable[type[CProduct], cProduct]
if[binary_operation[member[.cProduct], !=, literal[null]]] begin[{]
return[membe... | annotation[@] identifier[Override] Keyword[public] identifier[CProduct] identifier[findByGroupId_Last] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CProduct] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchCProductExcept... |
@Override
public Iterator<Tree> iterator() {
return new Iterator<Tree>() {
@Override
public boolean hasNext() {
return next != null;
}
@Override
public Tree next() {
Tree t = next.leaf;
next = next.p... | class class_name[name] begin[{]
method[iterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MemberReferenc... | annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[Tree] operator[>] identifier[iterator] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Iterator] operator[<] identifier[Tree] operator[>] operator[SEP] operator[SEP] {
annotation[@] ide... |
public void checkExpand(int _hash) {
int si = _hash & LOCK_MASK;
long _size = segmentSize[si].get();
if (_size > segmentMaxFill) {
eventuallyExpand(si);
}
} | class class_name[name] begin[{]
method[checkExpand, return_type[void], modifier[public], parameter[_hash]] begin[{]
local_variable[type[int], si]
local_variable[type[long], _size]
if[binary_operation[member[._size], >, member[.segmentMaxFill]]] begin[{]
c... | Keyword[public] Keyword[void] identifier[checkExpand] operator[SEP] Keyword[int] identifier[_hash] operator[SEP] {
Keyword[int] identifier[si] operator[=] identifier[_hash] operator[&] identifier[LOCK_MASK] operator[SEP] Keyword[long] identifier[_size] operator[=] identifier[segmentSize] operator[SEP] identifier... |
protected void saveData() throws CmsException {
CmsObject cms = m_context.getCms();
for (CmsResource resource : m_context.getResources()) {
CmsLockActionRecord actionRecord = null;
try {
actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource);
... | class class_name[name] begin[{]
method[saveData, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[CmsObject], cms]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | Keyword[protected] Keyword[void] identifier[saveData] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsObject] identifier[cms] operator[=] identifier[m_context] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Cms... |
public Collection<Object> collectAll(InputStream inputStream, JsonPath... paths) {
return collectAll(inputStream, Object.class, paths);
} | class class_name[name] begin[{]
method[collectAll, return_type[type[Collection]], modifier[public], parameter[inputStream, paths]] begin[{]
return[call[.collectAll, parameter[member[.inputStream], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arg... | Keyword[public] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[collectAll] operator[SEP] identifier[InputStream] identifier[inputStream] , identifier[JsonPath] operator[...] identifier[paths] operator[SEP] {
Keyword[return] identifier[collectAll] operator[SEP] identifier[inputStrea... |
protected void validate(String operationType) throws Exception
{
super.validate(operationType);
MPSString id_validator = new MPSString();
id_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);
id_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);
id_validator.validate... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[protected], parameter[operationType]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=operationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validate, postfix_oper... | Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[operationType] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[super] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] operator[SEP] operator[SEP] identifier[MPSString] identi... |
public void addListeners()
{
super.addListeners();
this.addMainKeyBehavior();
this.getMainRecord().getField(ClassInfo.CLASS_NAME).addListener(new MainFieldHandler(ClassInfo.CLASS_NAME_KEY));
this.getMainRecord().addListener(new EnableOnPhysicalHandler(null));
this.getMainReco... | class class_name[name] begin[{]
method[addListeners, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=addListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
THIS[call[None.a... | Keyword[public] Keyword[void] identifier[addListeners] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[addListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addMainKeyBehavior] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] ide... |
protected boolean removeConnection( WebSocket ws ) {
boolean removed = false;
synchronized ( connections ) {
if (this.connections.contains( ws )) {
removed = this.connections.remove( ws );
} else {
//Don't throw an assert error if the ws is not in the list. e.g. when the other endpoint did not send an... | class class_name[name] begin[{]
method[removeConnection, return_type[type[boolean]], modifier[protected], parameter[ws]] begin[{]
local_variable[type[boolean], removed]
SYNCHRONIZED[member[.connections]] BEGIN[{]
if[THIS[member[None.connections]call[None.contains... | Keyword[protected] Keyword[boolean] identifier[removeConnection] operator[SEP] identifier[WebSocket] identifier[ws] operator[SEP] {
Keyword[boolean] identifier[removed] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[connections] operator[SEP] {
Keyword[if] op... |
@Nullable
public OAuthConnection parse(String email) {
String domain = extractDomain(email);
if (domain == null) {
return null;
}
domain = domain.toLowerCase();
for (OAuthConnection c : connections) {
String mainDomain = domainForConnection(c);
... | class class_name[name] begin[{]
method[parse, return_type[type[OAuthConnection]], modifier[public], parameter[email]] begin[{]
local_variable[type[String], domain]
if[binary_operation[member[.domain], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
N... | annotation[@] identifier[Nullable] Keyword[public] identifier[OAuthConnection] identifier[parse] operator[SEP] identifier[String] identifier[email] operator[SEP] {
identifier[String] identifier[domain] operator[=] identifier[extractDomain] operator[SEP] identifier[email] operator[SEP] operator[SEP] Keyword[if] o... |
private void dateFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_dateFocusLost
String date = jTextField2.getText();
setDate(date);
} | class class_name[name] begin[{]
method[dateFocusLost, return_type[void], modifier[private], parameter[evt]] begin[{]
local_variable[type[String], date]
call[.setDate, parameter[member[.date]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[dateFocusLost] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusEvent] identifier[evt] operator[SEP] {
identifier[String] identifier[date] operator[=] identifier[jTextField2] operator[SEP] identifi... |
public KeyRestoreParameters withKeyBundleBackup(byte[] keyBundleBackup) {
if (keyBundleBackup == null) {
this.keyBundleBackup = null;
} else {
this.keyBundleBackup = Base64Url.encode(keyBundleBackup);
}
return this;
} | class class_name[name] begin[{]
method[withKeyBundleBackup, return_type[type[KeyRestoreParameters]], modifier[public], parameter[keyBundleBackup]] begin[{]
if[binary_operation[member[.keyBundleBackup], ==, literal[null]]] begin[{]
assign[THIS[member[None.keyBundleBackup]... | Keyword[public] identifier[KeyRestoreParameters] identifier[withKeyBundleBackup] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[keyBundleBackup] operator[SEP] {
Keyword[if] operator[SEP] identifier[keyBundleBackup] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP... |
@Nonnull
public FineUploader5Request setEndpoint (@Nonnull final ISimpleURL aRequestEndpoint)
{
ValueEnforcer.notNull (aRequestEndpoint, "RequestEndpoint");
m_aRequestEndpoint = aRequestEndpoint;
return this;
} | class class_name[name] begin[{]
method[setEndpoint, return_type[type[FineUploader5Request]], modifier[public], parameter[aRequestEndpoint]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aRequestEndpoint], literal["RequestEndpoint"]]]
assign[member[.m_aRequestEndpoint], ... | annotation[@] identifier[Nonnull] Keyword[public] identifier[FineUploader5Request] identifier[setEndpoint] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[ISimpleURL] identifier[aRequestEndpoint] operator[SEP] {
identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] i... |
public void consumeUntilGreedy(Parser recognizer, IntervalSet follow, CSSLexerState.RecoveryMode mode, CSSLexerState ls) {
consumeUntil(recognizer, follow, mode, ls);
recognizer.getInputStream().consume();
} | class class_name[name] begin[{]
method[consumeUntilGreedy, return_type[void], modifier[public], parameter[recognizer, follow, mode, ls]] begin[{]
call[.consumeUntil, parameter[member[.recognizer], member[.follow], member[.mode], member[.ls]]]
call[recognizer.getInputStream, para... | Keyword[public] Keyword[void] identifier[consumeUntilGreedy] operator[SEP] identifier[Parser] identifier[recognizer] , identifier[IntervalSet] identifier[follow] , identifier[CSSLexerState] operator[SEP] identifier[RecoveryMode] identifier[mode] , identifier[CSSLexerState] identifier[ls] operator[SEP] {
ident... |
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
inventory_responses result = (inventory_responses) service.get_payload_formatter().string_to_resource(inventory_responses.class, response);
if(result.errorcode != 0)
{
if (result.errorcode == SESS... | class class_name[name] begin[{]
method[get_nitro_bulk_response, return_type[type[base_resource]], modifier[protected], parameter[service, response]] begin[{]
local_variable[type[inventory_responses], result]
if[binary_operation[member[result.errorcode], !=, literal[0]]] begin[{]
... | Keyword[protected] identifier[base_resource] operator[SEP] operator[SEP] identifier[get_nitro_bulk_response] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[inventory_responses] identifier[resu... |
public static <T> T newInstance(String className, Site site) {
return newInstance(className, null, site, site != null ? site.getConfig() : null);
} | class class_name[name] begin[{]
method[newInstance, return_type[type[T]], modifier[public static], parameter[className, site]] begin[{]
return[call[.newInstance, parameter[member[.className], literal[null], member[.site], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=site,... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[newInstance] operator[SEP] identifier[String] identifier[className] , identifier[Site] identifier[site] operator[SEP] {
Keyword[return] identifier[newInstance] operator[SEP] identifier[className] , Other[null] , ide... |
public static void assertTrueOrInvalidTypeForAnnotationMethodParameterException(boolean expression,
Element classElement, ExecutableElement methodElement, VariableElement parameterElement,
Class<? extends Annotation> annotationClazz) {
if (!expression) {
String msg = String.format("In method '%s.%s', paramet... | class class_name[name] begin[{]
method[assertTrueOrInvalidTypeForAnnotationMethodParameterException, return_type[void], modifier[public static], parameter[expression, classElement, methodElement, parameterElement, annotationClazz]] begin[{]
if[member[.expression]] begin[{]
local_var... | Keyword[public] Keyword[static] Keyword[void] identifier[assertTrueOrInvalidTypeForAnnotationMethodParameterException] operator[SEP] Keyword[boolean] identifier[expression] , identifier[Element] identifier[classElement] , identifier[ExecutableElement] identifier[methodElement] , identifier[VariableElement] identifie... |
public<V> Future<V> submit(Callable<V> task)
{
Preconditions.checkState(isOpen.get(), "CloseableExecutorService is closed");
InternalFutureTask<V> futureTask = new InternalFutureTask<V>(new FutureTask<V>(task));
executorService.execute(futureTask);
return futureTask;
} | class class_name[name] begin[{]
method[submit, return_type[type[Future]], modifier[public], parameter[task]] begin[{]
call[Preconditions.checkState, parameter[call[isOpen.get, parameter[]], literal["CloseableExecutorService is closed"]]]
local_variable[type[InternalFutureTask], futureTa... | Keyword[public] operator[<] identifier[V] operator[>] identifier[Future] operator[<] identifier[V] operator[>] identifier[submit] operator[SEP] identifier[Callable] operator[<] identifier[V] operator[>] identifier[task] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] ... |
public void marshall(Organization organization, ProtocolMarshaller protocolMarshaller) {
if (organization == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(organization.getId(), ID_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[organization, protocolMarshaller]] begin[{]
if[binary_operation[member[.organization], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Organization] identifier[organization] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[organization] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
private TerminalBindingCondition getTerminalBindingCondition(
final int respCode,
final AbstractBody respBody) {
assertLocked();
if (isTermination(respBody)) {
String str = respBody.getAttribute(Attributes.CONDITION);
return TerminalBindingCondition.forSt... | class class_name[name] begin[{]
method[getTerminalBindingCondition, return_type[type[TerminalBindingCondition]], modifier[private], parameter[respCode, respBody]] begin[{]
call[.assertLocked, parameter[]]
if[call[.isTermination, parameter[member[.respBody]]]] begin[{]
... | Keyword[private] identifier[TerminalBindingCondition] identifier[getTerminalBindingCondition] operator[SEP] Keyword[final] Keyword[int] identifier[respCode] , Keyword[final] identifier[AbstractBody] identifier[respBody] operator[SEP] {
identifier[assertLocked] operator[SEP] operator[SEP] operator[SEP] Keyword[i... |
private Set<String> doGetActiveProfiles() {
synchronized (activeProfiles) {
if (activeProfiles.isEmpty()) {
String[] profiles = getProfilesFromSystemProperty(ACTIVE_PROFILES_PROPERTY_NAME);
if (profiles != null) {
setActiveProfiles(profiles);
... | class class_name[name] begin[{]
method[doGetActiveProfiles, return_type[type[Set]], modifier[private], parameter[]] begin[{]
SYNCHRONIZED[member[.activeProfiles]] BEGIN[{]
if[call[activeProfiles.isEmpty, parameter[]]] begin[{]
local_variable[type[String],... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[doGetActiveProfiles] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[activeProfiles] operator[SEP] {
Keyword[if] operator[SEP] identifier[activeProfiles] operator[SEP] identifier[isEmpty... |
@Reference(name = KEY_DESTINATION_ADDRESS_FACTORY, service = SIDestinationAddressFactory.class)
protected void setDestinationAddressFactory(ServiceReference<SIDestinationAddressFactory> ref) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.entry(tc, "setDestinationAddress... | class class_name[name] begin[{]
method[setDestinationAddressFactory, return_type[void], modifier[protected], parameter[ref]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.entry, para... | annotation[@] identifier[Reference] operator[SEP] identifier[name] operator[=] identifier[KEY_DESTINATION_ADDRESS_FACTORY] , identifier[service] operator[=] identifier[SIDestinationAddressFactory] operator[SEP] Keyword[class] operator[SEP] Keyword[protected] Keyword[void] identifier[setDestinationAddressFactory] opera... |
private void getInitialCroppingParameter(
final String resourcePath,
final I_CmsSimpleCallback<CmsCroppingParamBean> callback) {
getImageInfo(resourcePath, new I_CmsSimpleCallback<CmsImageInfoBean>() {
public void execute(CmsImageInfoBean imageInfo) {
CmsImageForma... | class class_name[name] begin[{]
method[getInitialCroppingParameter, return_type[void], modifier[private], parameter[resourcePath, callback]] begin[{]
call[.getImageInfo, parameter[member[.resourcePath], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclar... | Keyword[private] Keyword[void] identifier[getInitialCroppingParameter] operator[SEP] Keyword[final] identifier[String] identifier[resourcePath] , Keyword[final] identifier[I_CmsSimpleCallback] operator[<] identifier[CmsCroppingParamBean] operator[>] identifier[callback] operator[SEP] {
identifier[getImageInfo] ... |
private static void clearOneAndTwoButtonClicked(ActionEvent e) {
// Clear the date pickers.
datePicker1.clear();
datePicker2.clear();
// Display message.
String message = "The datePicker1 and datePicker2 dates were cleared!\n\n";
message += getDatePickerOneDateText() + "\... | class class_name[name] begin[{]
method[clearOneAndTwoButtonClicked, return_type[void], modifier[private static], parameter[e]] begin[{]
call[datePicker1.clear, parameter[]]
call[datePicker2.clear, parameter[]]
local_variable[type[String], message]
assign[... | Keyword[private] Keyword[static] Keyword[void] identifier[clearOneAndTwoButtonClicked] operator[SEP] identifier[ActionEvent] identifier[e] operator[SEP] {
identifier[datePicker1] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[datePicker2] operator[SEP] identifier[clear] oper... |
@Process(actionType = ModifyStandardRole.class)
public void modifyStandardRole(final ModifyStandardRole action, final Channel channel) {
Role role = action.getRole();
new Async<FunctionContext>().waterfall(new FunctionContext(), new ReloadOutcome(channel),
new AccessControlFunctions.... | class class_name[name] begin[{]
method[modifyStandardRole, return_type[void], modifier[public], parameter[action, channel]] begin[{]
local_variable[type[Role], role]
ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifi... | annotation[@] identifier[Process] operator[SEP] identifier[actionType] operator[=] identifier[ModifyStandardRole] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[void] identifier[modifyStandardRole] operator[SEP] Keyword[final] identifier[ModifyStandardRole] identifier[action] , Keyword[final] ident... |
public byte[] unbind(int sequenceNumber) {
PDUByteBuffer buf = new PDUByteBuffer(SMPPConstant.CID_UNBIND, 0,
sequenceNumber);
return buf.toBytes();
} | class class_name[name] begin[{]
method[unbind, return_type[type[byte]], modifier[public], parameter[sequenceNumber]] begin[{]
local_variable[type[PDUByteBuffer], buf]
return[call[buf.toBytes, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[unbind] operator[SEP] Keyword[int] identifier[sequenceNumber] operator[SEP] {
identifier[PDUByteBuffer] identifier[buf] operator[=] Keyword[new] identifier[PDUByteBuffer] operator[SEP] identifier[SMPPConstant] operator[SEP] identifier[CID_UNBIN... |
protected void restoreSubActionViewAfterAnimation(FloatingActionMenu.Item subActionItem, ActionType actionType) {
ViewGroup.LayoutParams params = subActionItem.view.getLayoutParams();
subActionItem.view.setTranslationX(0);
subActionItem.view.setTranslationY(0);
subActionItem.view.setRota... | class class_name[name] begin[{]
method[restoreSubActionViewAfterAnimation, return_type[void], modifier[protected], parameter[subActionItem, actionType]] begin[{]
local_variable[type[ViewGroup], params]
call[subActionItem.view.setTranslationX, parameter[literal[0]]]
call[... | Keyword[protected] Keyword[void] identifier[restoreSubActionViewAfterAnimation] operator[SEP] identifier[FloatingActionMenu] operator[SEP] identifier[Item] identifier[subActionItem] , identifier[ActionType] identifier[actionType] operator[SEP] {
identifier[ViewGroup] operator[SEP] identifier[LayoutParams] ident... |
protected void estimateCase1( double betas[] ) {
betas[0] = matchScale(nullPts[0], controlWorldPts);
betas[0] = adjustBetaSign(betas[0],nullPts[0]);
betas[1] = 0; betas[2] = 0; betas[3] = 0;
} | class class_name[name] begin[{]
method[estimateCase1, return_type[void], modifier[protected], parameter[betas]] begin[{]
assign[member[.betas], call[.matchScale, parameter[member[.nullPts], member[.controlWorldPts]]]]
assign[member[.betas], call[.adjustBetaSign, parameter[member... | Keyword[protected] Keyword[void] identifier[estimateCase1] operator[SEP] Keyword[double] identifier[betas] operator[SEP] operator[SEP] operator[SEP] {
identifier[betas] operator[SEP] Other[0] operator[SEP] operator[=] identifier[matchScale] operator[SEP] identifier[nullPts] operator[SEP] Other[0] operator[SEP] ,... |
synchronized public void setEnabledProtocols(String[] protocols) {
enabledProtocols = new ProtocolList(protocols);
if ((handshaker != null) && !handshaker.activated()) {
handshaker.setEnabledProtocols(enabledProtocols);
}
} | class class_name[name] begin[{]
method[setEnabledProtocols, return_type[void], modifier[synchronized public], parameter[protocols]] begin[{]
assign[member[.enabledProtocols], ClassCreator(arguments=[MemberReference(member=protocols, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[synchronized] Keyword[public] Keyword[void] identifier[setEnabledProtocols] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[protocols] operator[SEP] {
identifier[enabledProtocols] operator[=] Keyword[new] identifier[ProtocolList] operator[SEP] identifier[protocols] operator[SEP] o... |
public SearchParams between(final Date start, final Date end) {
return this.creationGte(start).creationLte(end);
} | class class_name[name] begin[{]
method[between, return_type[type[SearchParams]], modifier[public], parameter[start, end]] begin[{]
return[THIS[call[None.creationGte, parameter[member[.start]]]call[None.creationLte, parameter[member[.end]]]]]
end[}]
END[}] | Keyword[public] identifier[SearchParams] identifier[between] operator[SEP] Keyword[final] identifier[Date] identifier[start] , Keyword[final] identifier[Date] identifier[end] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[creationGte] operator[SEP] identifier[start] operator[SEP] operato... |
@Indexable(type = IndexableType.REINDEX)
@Override
public CommerceAvailabilityEstimate addCommerceAvailabilityEstimate(
CommerceAvailabilityEstimate commerceAvailabilityEstimate) {
commerceAvailabilityEstimate.setNew(true);
return commerceAvailabilityEstimatePersistence.update(commerceAvailabilityEstimate);
} | class class_name[name] begin[{]
method[addCommerceAvailabilityEstimate, return_type[type[CommerceAvailabilityEstimate]], modifier[public], parameter[commerceAvailabilityEstimate]] begin[{]
call[commerceAvailabilityEstimate.setNew, parameter[literal[true]]]
return[call[commerceAvailabili... | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[REINDEX] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CommerceAvailabilityEstimate] identifier[addCommerceAvailabilityEstimate] operator[SEP] identifier[Commer... |
private double parseDouble()
throws IOException
{
long b64 = read();
long b56 = read();
long b48 = read();
long b40 = read();
long b32 = read();
long b24 = read();
long b16 = read();
long b8 = read();
long bits = ((b64 << 56) +
... | class class_name[name] begin[{]
method[parseDouble, return_type[type[double]], modifier[private], parameter[]] begin[{]
local_variable[type[long], b64]
local_variable[type[long], b56]
local_variable[type[long], b48]
local_variable[type[long], b40]
local_variable[type[lon... | Keyword[private] Keyword[double] identifier[parseDouble] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[long] identifier[b64] operator[=] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[b56] operator[=] identifier[read] operator[SEP] operator[SEP... |
private static String getString(Object value) {
// The logic here is slightly icky, as getValue may or may not exist,
// and must be called reflectively if it does exist
if (!(value instanceof Enum)) {
return value.toString();
}
Method method = null;
try {
... | class class_name[name] begin[{]
method[getString, return_type[type[String]], modifier[private static], parameter[value]] begin[{]
if[binary_operation[member[.value], instanceof, type[Enum]]] begin[{]
return[call[value.toString, parameter[]]]
else begin[{]
None
end[}]... | Keyword[private] Keyword[static] identifier[String] identifier[getString] operator[SEP] identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[value] Keyword[instanceof] identifier[Enum] operator[SEP] operator[SEP] {
Keyword[return] identifi... |
public static Timestamp fromMillis(long epochMilli) {
long secs = floorDiv(epochMilli, MILLIS_PER_SECOND);
int mos = (int) floorMod(epochMilli, MILLIS_PER_SECOND);
return create(secs, (int) (mos * NANOS_PER_MILLI)); // Safe int * NANOS_PER_MILLI
} | class class_name[name] begin[{]
method[fromMillis, return_type[type[Timestamp]], modifier[public static], parameter[epochMilli]] begin[{]
local_variable[type[long], secs]
local_variable[type[int], mos]
return[call[.create, parameter[member[.secs], Cast(expression=BinaryOperation(operand... | Keyword[public] Keyword[static] identifier[Timestamp] identifier[fromMillis] operator[SEP] Keyword[long] identifier[epochMilli] operator[SEP] {
Keyword[long] identifier[secs] operator[=] identifier[floorDiv] operator[SEP] identifier[epochMilli] , identifier[MILLIS_PER_SECOND] operator[SEP] operator[SEP] Keyword... |
@Override
public ODocument getRecord() {
if (rawElement == null) {
// CREATE AT THE FLY
final ODocument tmp = new ODocument(getClassName(label)).setTrackingChanges(false);
tmp.field(OrientBaseGraph.CONNECTION_IN, vIn.getIdentity());
tmp.field(OrientBaseGraph.CONNECTION_OUT, vOut.getIdentit... | class class_name[name] begin[{]
method[getRecord, return_type[type[ODocument]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.rawElement], ==, literal[null]]] begin[{]
local_variable[type[ODocument], tmp]
call[tmp.field, parameter[member... | annotation[@] identifier[Override] Keyword[public] identifier[ODocument] identifier[getRecord] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[rawElement] operator[==] Other[null] operator[SEP] {
Keyword[final] identifier[ODocument] identifier[tmp] operator[=] Keyword[new] identifie... |
@NotNull
public OptionalInt mapToInt(@NotNull ToIntFunction<? super T> mapper) {
if (!isPresent()) return OptionalInt.empty();
return OptionalInt.of(mapper.applyAsInt(value));
} | class class_name[name] begin[{]
method[mapToInt, return_type[type[OptionalInt]], modifier[public], parameter[mapper]] begin[{]
if[call[.isPresent, parameter[]]] begin[{]
return[call[OptionalInt.empty, parameter[]]]
else begin[{]
None
end[}]
return[call[OptionalInt.of, pa... | annotation[@] identifier[NotNull] Keyword[public] identifier[OptionalInt] identifier[mapToInt] operator[SEP] annotation[@] identifier[NotNull] identifier[ToIntFunction] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[mapper] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identi... |
public Object next()
{
int iOldKeyOrder = m_recFieldData.getDefaultOrder();
try {
if (m_bFirstTime)
this.scanSharedFields();
if (m_iCurrentIndex >= m_vFieldList.size())
return null; // EOF
FieldSummary fieldSummary = (FieldSumma... | class class_name[name] begin[{]
method[next, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[int], iOldKeyOrder]
TryStatement(block=[IfStatement(condition=MemberReference(member=m_bFirstTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] identifier[Object] identifier[next] operator[SEP] operator[SEP] {
Keyword[int] identifier[iOldKeyOrder] operator[=] identifier[m_recFieldData] operator[SEP] identifier[getDefaultOrder] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[m_bFirs... |
public String createContainingBase64Value(String basename, String key) {
String file;
Object value = value(key);
if (value == null) {
throw new SlimFixtureException(false, "No value for key: " + key);
} else if (value instanceof String) {
file = createFileFromBase... | class class_name[name] begin[{]
method[createContainingBase64Value, return_type[type[String]], modifier[public], parameter[basename, key]] begin[{]
local_variable[type[String], file]
local_variable[type[Object], value]
if[binary_operation[member[.value], ==, literal[null]]] begi... | Keyword[public] identifier[String] identifier[createContainingBase64Value] operator[SEP] identifier[String] identifier[basename] , identifier[String] identifier[key] operator[SEP] {
identifier[String] identifier[file] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[value] operator[SEP]... |
public static List<weka.core.Attribute> buildAttributes(DataDictionary dataDict) {
ImmutableList.Builder<weka.core.Attribute> attribuesBuilder = ImmutableList.builder();
for (DataField dataField : dataDict.getDataFields()) {
attribuesBuilder.add(buildAttribute(dataField));
}
... | class class_name[name] begin[{]
method[buildAttributes, return_type[type[List]], modifier[public static], parameter[dataDict]] begin[{]
local_variable[type[ImmutableList], attribuesBuilder]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[weka] operator[SEP] identifier[core] operator[SEP] identifier[Attribute] operator[>] identifier[buildAttributes] operator[SEP] identifier[DataDictionary] identifier[dataDict] operator[SEP] {
identifier[ImmutableList] operator[SEP] identifier... |
private void printDetailBandForEmptyData() throws QueryException {
printRowsForEmptyData = true;
printBand(null, null, false);
printRowsForEmptyData = false;
} | class class_name[name] begin[{]
method[printDetailBandForEmptyData, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.printRowsForEmptyData], literal[true]]
call[.printBand, parameter[literal[null], literal[null], literal[false]]]
assign[... | Keyword[private] Keyword[void] identifier[printDetailBandForEmptyData] operator[SEP] operator[SEP] Keyword[throws] identifier[QueryException] {
identifier[printRowsForEmptyData] operator[=] literal[boolean] operator[SEP] identifier[printBand] operator[SEP] Other[null] , Other[null] , literal[boolean] operator[... |
public ResponseBuilder addDirective(Directive directive) {
if (directiveList == null) {
directiveList = new ArrayList<>();
}
directiveList.add(directive);
return this;
} | class class_name[name] begin[{]
method[addDirective, return_type[type[ResponseBuilder]], modifier[public], parameter[directive]] begin[{]
if[binary_operation[member[.directiveList], ==, literal[null]]] begin[{]
assign[member[.directiveList], ClassCreator(arguments=[], bo... | Keyword[public] identifier[ResponseBuilder] identifier[addDirective] operator[SEP] identifier[Directive] identifier[directive] operator[SEP] {
Keyword[if] operator[SEP] identifier[directiveList] operator[==] Other[null] operator[SEP] {
identifier[directiveList] operator[=] Keyword[new] identifier[Arra... |
@Override
public void serialize(Callback value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
if (StringUtils.isBlank(value.getRef())) {
jgen.writeStartObject();
for (Entry<String, PathItem> entry : value.entrySet()) {
jgen.writeObjectField(ent... | class class_name[name] begin[{]
method[serialize, return_type[void], modifier[public], parameter[value, jgen, provider]] begin[{]
if[call[StringUtils.isBlank, parameter[call[value.getRef, parameter[]]]]] begin[{]
call[jgen.writeStartObject, parameter[]]
ForSt... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serialize] operator[SEP] identifier[Callback] identifier[value] , identifier[JsonGenerator] identifier[jgen] , identifier[SerializerProvider] identifier[provider] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] oper... |
@Indexable(type = IndexableType.DELETE)
@Override
public CPDefinitionVirtualSetting deleteCPDefinitionVirtualSetting(
long CPDefinitionVirtualSettingId) throws PortalException {
return cpDefinitionVirtualSettingPersistence.remove(CPDefinitionVirtualSettingId);
} | class class_name[name] begin[{]
method[deleteCPDefinitionVirtualSetting, return_type[type[CPDefinitionVirtualSetting]], modifier[public], parameter[CPDefinitionVirtualSettingId]] begin[{]
return[call[cpDefinitionVirtualSettingPersistence.remove, parameter[member[.CPDefinitionVirtualSettingId]]]]
en... | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionVirtualSetting] identifier[deleteCPDefinitionVirtualSetting] operator[SEP] Keyword[long] ident... |
public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE(String billingAccount, String serviceName, Long dialplanId) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}";
StringBuilder sb = path(qPath, billingAccount, serviceName, dialplanId)... | class class_name[name] begin[{]
method[billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE, return_type[void], modifier[public], parameter[billingAccount, serviceName, dialplanId]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
cal... | Keyword[public] Keyword[void] identifier[billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[Long] identifier[dialplanId] operator[SEP] Keyword[throws] identifier[IOException] {
iden... |
private void fireOnClosed(ChannelEvent e) {
if (readyState == ReadyState.CLOSED) {
// If the channel has been closed, then we should not fire events.
return;
}
readyState = ReadyState.CLOSED;
List<EventListener> listeners = changes.getListenerList(AMQP);
... | class class_name[name] begin[{]
method[fireOnClosed, return_type[void], modifier[private], parameter[e]] begin[{]
if[binary_operation[member[.readyState], ==, member[ReadyState.CLOSED]]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[member[.r... | Keyword[private] Keyword[void] identifier[fireOnClosed] operator[SEP] identifier[ChannelEvent] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[readyState] operator[==] identifier[ReadyState] operator[SEP] identifier[CLOSED] operator[SEP] {
Keyword[return] operator[SEP]
}
... |
public synchronized boolean setPools(Collection<HostConnectionPool<CL>> newPools) {
Set<HostConnectionPool<CL>> toRemove = Sets.newHashSet(this.pools);
// Add new pools not previously seen
boolean didChange = false;
for (HostConnectionPool<CL> pool : newPools) {
if (... | class class_name[name] begin[{]
method[setPools, return_type[type[boolean]], modifier[synchronized public], parameter[newPools]] begin[{]
local_variable[type[Set], toRemove]
local_variable[type[boolean], didChange]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(con... | Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[setPools] operator[SEP] identifier[Collection] operator[<] identifier[HostConnectionPool] operator[<] identifier[CL] operator[>] operator[>] identifier[newPools] operator[SEP] {
identifier[Set] operator[<] identifier[HostConnectionPool] operator[<... |
@Override
public void destroy() {
try {
super.destroy();
} finally {
if (myOwnJdbcHelper && defaultJdbcHelper != null
&& defaultJdbcHelper instanceof AbstractJdbcHelper) {
try {
((AbstractJdbcHelper) defaultJdbcHelper).d... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=SuperMethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[super] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[finally] {
Keyword[if] operator[SEP] identifie... |
public List<SiteNode> getNodesInContextFromSiteTree() {
List<SiteNode> nodes = new LinkedList<>();
SiteNode rootNode = session.getSiteTree().getRoot();
fillNodesInContext(rootNode, nodes);
return nodes;
} | class class_name[name] begin[{]
method[getNodesInContextFromSiteTree, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], nodes]
local_variable[type[SiteNode], rootNode]
call[.fillNodesInContext, parameter[member[.rootNode], member[.nodes]... | Keyword[public] identifier[List] operator[<] identifier[SiteNode] operator[>] identifier[getNodesInContextFromSiteTree] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[SiteNode] operator[>] identifier[nodes] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SE... |
public static base_response delete(nitro_service client, application resource) throws Exception {
application deleteresource = new application();
deleteresource.appname = resource.appname;
return deleteresource.delete_resource(client);
} | class class_name[name] begin[{]
method[delete, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[application], deleteresource]
assign[member[deleteresource.appname], member[resource.appname]]
return[call[deletere... | Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[application] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[application] identifier[deleteresource] operator[=] Keyword[new]... |
public static Measurement first(final Iterable<Measurement> ms, final String k, final String v) {
return first(ms, value -> v.equals(getTagValue(value.id(), k)));
} | class class_name[name] begin[{]
method[first, return_type[type[Measurement]], modifier[public static], parameter[ms, k, v]] begin[{]
return[call[.first, parameter[member[.ms], LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=id, postfix... | Keyword[public] Keyword[static] identifier[Measurement] identifier[first] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[Measurement] operator[>] identifier[ms] , Keyword[final] identifier[String] identifier[k] , Keyword[final] identifier[String] identifier[v] operator[SEP] {
Keyword[... |
@WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C straightJoin() {
return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN);
} | class class_name[name] begin[{]
method[straightJoin, return_type[type[C]], modifier[public], parameter[]] begin[{]
return[call[.addFlag, parameter[member[Position.AFTER_SELECT], member[.STRAIGHT_JOIN]]]]
end[}]
END[}] | annotation[@] identifier[WithBridgeMethods] operator[SEP] identifier[value] operator[=] identifier[MySQLQuery] operator[SEP] Keyword[class] , identifier[castRequired] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[C] identifier[straightJoin] operator[SEP] operator[SEP] {
Keyword[return] i... |
public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) {
return new DummyFuture<>(handler.getChampion(id, champData, version, locale));
} | class class_name[name] begin[{]
method[getChampion, return_type[type[Future]], modifier[public], parameter[id, champData, version, locale]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] identifier[Future] operator[<] identifier[Champion] operator[>] identifier[getChampion] operator[SEP] Keyword[int] identifier[id] , identifier[ChampData] identifier[champData] , identifier[String] identifier[version] , identifier[String] identifier[locale] operator[SEP] {
Keyword[return] Keywo... |
public SecurityWebFilterChain build() {
if (this.built != null) {
throw new IllegalStateException("This has already been built with the following stacktrace. " + buildToString());
}
this.built = new RuntimeException("First Build Invocation").fillInStackTrace();
if (this.headers != null) {
this.headers.con... | class class_name[name] begin[{]
method[build, return_type[type[SecurityWebFilterChain]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.built]], !=, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Lite... | Keyword[public] identifier[SecurityWebFilterChain] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[built] operator[!=] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String... |
public static CommerceWishList fetchByUserId_First(long userId,
OrderByComparator<CommerceWishList> orderByComparator) {
return getPersistence().fetchByUserId_First(userId, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByUserId_First, return_type[type[CommerceWishList]], modifier[public static], parameter[userId, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceWishList] identifier[fetchByUserId_First] operator[SEP] Keyword[long] identifier[userId] , identifier[OrderByComparator] operator[<] identifier[CommerceWishList] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[return] identifier[getPersistence... |
public final boolean synpred3_DSLMap() {
state.backtracking++;
int start = input.mark();
try {
synpred3_DSLMap_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
boolean success = !state.failed;
input.rewind(start);
state.backtrack... | class class_name[name] begin[{]
method[synpred3_DSLMap, return_type[type[boolean]], modifier[final public], parameter[]] begin[{]
member[state.backtracking]
local_variable[type[int], start]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=... | Keyword[public] Keyword[final] Keyword[boolean] identifier[synpred3_DSLMap] operator[SEP] operator[SEP] {
identifier[state] operator[SEP] identifier[backtracking] operator[++] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[input] operator[SEP] identifier[mark] operator[SEP] operator[SEP] ope... |
@SuppressWarnings("ReferenceEquality") // need to use a reference check to ensure it is a constant
private static SanitizedContent fromConstant(
@CompileTimeConstant final String constant, ContentKind kind, @Nullable Dir dir) {
// Extra runtime check in case the compile-time check doesn't work.
Precondi... | class class_name[name] begin[{]
method[fromConstant, return_type[type[SanitizedContent]], modifier[private static], parameter[constant, kind, dir]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[call[constant.intern, parameter[]], ==, member[.constant]], literal["The prov... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[SanitizedContent] identifier[fromConstant] operator[SEP] annotation[@] identifier[CompileTimeConstant] Keyword[final] identifier[String] identifier[constant] , identifier[ContentKind] iden... |
public Method[] findMethods( Pattern methodNamePattern ) {
final Method[] allMethods = this.targetClass.getMethods();
final List<Method> result = new ArrayList<Method>();
for (int i = 0; i < allMethods.length; i++) {
final Method m = allMethods[i];
if (methodNamePattern.m... | class class_name[name] begin[{]
method[findMethods, return_type[type[Method]], modifier[public], parameter[methodNamePattern]] begin[{]
local_variable[type[Method], allMethods]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDecla... | Keyword[public] identifier[Method] operator[SEP] operator[SEP] identifier[findMethods] operator[SEP] identifier[Pattern] identifier[methodNamePattern] operator[SEP] {
Keyword[final] identifier[Method] operator[SEP] operator[SEP] identifier[allMethods] operator[=] Keyword[this] operator[SEP] identifier[targetClas... |
public void billingAccount_easyHunting_serviceName_timeConditions_PUT(String billingAccount, String serviceName, OvhEasyHuntingTimeConditionsSettings body) throws IOException {
String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/timeConditions";
StringBuilder sb = path(qPath, billingAccount, servi... | class class_name[name] begin[{]
method[billingAccount_easyHunting_serviceName_timeConditions_PUT, return_type[void], modifier[public], parameter[billingAccount, serviceName, body]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, p... | Keyword[public] Keyword[void] identifier[billingAccount_easyHunting_serviceName_timeConditions_PUT] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[OvhEasyHuntingTimeConditionsSettings] identifier[body] operator[SEP] Keyword[throws] identifier[IOEx... |
@Override
public void start(int mode) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "start, mode ", mode);
// _eventNotificationEnabled = isEventNotificationPropertySet();
// notifyMessagingEngineStarting(getName(), getUuid().toString(), "STAND... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[mode]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], litera... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[int] identifier[mode] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] i... |
public int getMaxConnections() throws GuacamoleException {
// Pull default from environment if connection limit is unset
Integer value = getModel().getMaxConnections();
if (value == null)
return environment.getDefaultMaxConnections();
// Otherwise use defined value
... | class class_name[name] begin[{]
method[getMaxConnections, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[Integer], value]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[call[environment.getDefaultMaxConnections, parameter[]]]... | Keyword[public] Keyword[int] identifier[getMaxConnections] operator[SEP] operator[SEP] Keyword[throws] identifier[GuacamoleException] {
identifier[Integer] identifier[value] operator[=] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxConnections] operator[SEP] operator[SEP] operat... |
public Link target(String t)
{
if (t!=null && t.length()>0)
attribute("target",t);
return this;
} | class class_name[name] begin[{]
method[target, return_type[type[Link]], modifier[public], parameter[t]] begin[{]
if[binary_operation[binary_operation[member[.t], !=, literal[null]], &&, binary_operation[call[t.length, parameter[]], >, literal[0]]]] begin[{]
call[.attribute, paramete... | Keyword[public] identifier[Link] identifier[target] operator[SEP] identifier[String] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[&&] identifier[t] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier... |
public static admin_ns_config modify(nitro_service client, admin_ns_config resource) throws Exception
{
resource.validate("modify");
return ((admin_ns_config[]) resource.update_resource(client))[0];
} | class class_name[name] begin[{]
method[modify, return_type[type[admin_ns_config]], modifier[public static], parameter[client, resource]] begin[{]
call[resource.validate, parameter[literal["modify"]]]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postf... | Keyword[public] Keyword[static] identifier[admin_ns_config] identifier[modify] operator[SEP] identifier[nitro_service] identifier[client] , identifier[admin_ns_config] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[resource] operator[SEP] identifier[validate] operator[SEP]... |
public Map<String, TableContext> listTablesForConfig(
DatabaseVendor vendor,
PushSource.Context context,
List<Stage.ConfigIssue> issues,
Connection connection,
TableConfigBean tableConfigBean,
TableJdbcELEvalContext tableJdbcELEvalContext,
QuoteChar quoteChar
) throws SQLExce... | class class_name[name] begin[{]
method[listTablesForConfig, return_type[type[Map]], modifier[public], parameter[vendor, context, issues, connection, tableConfigBean, tableJdbcELEvalContext, quoteChar]] begin[{]
local_variable[type[Map], tableContextMap]
local_variable[type[Pattern], tableExclus... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[TableContext] operator[>] identifier[listTablesForConfig] operator[SEP] identifier[DatabaseVendor] identifier[vendor] , identifier[PushSource] operator[SEP] identifier[Context] identifier[context] , identifier[List] operator[<] identifier[St... |
public static void checkBothNotNull(Object object1, Object object2, String errorMsg) {
check(!(object1 == null && object2 == null), errorMsg);
} | class class_name[name] begin[{]
method[checkBothNotNull, return_type[void], modifier[public static], parameter[object1, object2, errorMsg]] begin[{]
call[.check, parameter[binary_operation[binary_operation[member[.object1], ==, literal[null]], &&, binary_operation[member[.object2], ==, literal[... | Keyword[public] Keyword[static] Keyword[void] identifier[checkBothNotNull] operator[SEP] identifier[Object] identifier[object1] , identifier[Object] identifier[object2] , identifier[String] identifier[errorMsg] operator[SEP] {
identifier[check] operator[SEP] operator[!] operator[SEP] identifier[object1] operat... |
@POST
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public Response submit(@Context HttpServletRequest request) {
if (LOG.isDebugEnabled()) {
LOG.debug("==> EntityResource.submit()");
}
String entityJson = null;
... | class class_name[name] begin[{]
method[submit, return_type[type[Response]], modifier[public], parameter[request]] begin[{]
if[call[LOG.isDebugEnabled, parameter[]]] begin[{]
call[LOG.debug, parameter[literal["==> EntityResource.submit()"]]]
else begin[{]
None
... | annotation[@] identifier[POST] annotation[@] identifier[Consumes] operator[SEP] {
identifier[Servlets] operator[SEP] identifier[JSON_MEDIA_TYPE] , identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON]
} operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[Servlets] operator[SE... |
@Override
public PurchaseReservedElasticsearchInstanceOfferingResult purchaseReservedElasticsearchInstanceOffering(
PurchaseReservedElasticsearchInstanceOfferingRequest request) {
request = beforeClientExecution(request);
return executePurchaseReservedElasticsearchInstanceOffering(reques... | class class_name[name] begin[{]
method[purchaseReservedElasticsearchInstanceOffering, return_type[type[PurchaseReservedElasticsearchInstanceOfferingResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[PurchaseReservedElasticsearchInstanceOfferingResult] identifier[purchaseReservedElasticsearchInstanceOffering] operator[SEP] identifier[PurchaseReservedElasticsearchInstanceOfferingRequest] identifier[request] operator[SEP] {
identifier[request] opera... |
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception {
HttpResponseStatus result;
try {
result = parseLine(status);
if (result == HttpResponseStatus.SWITCHING_PROTOCOLS) {
throw connectionError(PROTOCOL_ERROR, "Invalid HTTP/2 sta... | class class_name[name] begin[{]
method[parseStatus, return_type[type[HttpResponseStatus]], modifier[public static], parameter[status]] begin[{]
local_variable[type[HttpResponseStatus], result]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resul... | Keyword[public] Keyword[static] identifier[HttpResponseStatus] identifier[parseStatus] operator[SEP] identifier[CharSequence] identifier[status] operator[SEP] Keyword[throws] identifier[Http2Exception] {
identifier[HttpResponseStatus] identifier[result] operator[SEP] Keyword[try] {
identifier[result] ... |
@Deprecated
public List<ServerDescription> getSecondaries(final TagSet tagSet) {
return getServersByPredicate(new Predicate() {
public boolean apply(final ServerDescription serverDescription) {
return serverDescription.isSecondary() && serverDescription.hasTags(tagSet);
... | class class_name[name] begin[{]
method[getSecondaries, return_type[type[List]], modifier[public], parameter[tagSet]] begin[{]
return[call[.getServersByPredicate, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=BinaryOperation(operandl=Method... | annotation[@] identifier[Deprecated] Keyword[public] identifier[List] operator[<] identifier[ServerDescription] operator[>] identifier[getSecondaries] operator[SEP] Keyword[final] identifier[TagSet] identifier[tagSet] operator[SEP] {
Keyword[return] identifier[getServersByPredicate] operator[SEP] Keyword[new] id... |
public void validate() {
// AutoResetToZero
if (niceMinValue > 0 || niceMaxValue < 0) {
autoResetToZero = false;
}
// Threshold
if (threshold < niceMinValue || threshold > niceMaxValue) {
threshold = niceMaxValue;
}
// MinMeasuredValue
... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.niceMinValue], >, literal[0]], ||, binary_operation[member[.niceMaxValue], <, literal[0]]]] begin[{]
assign[member[.au... | Keyword[public] Keyword[void] identifier[validate] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[niceMinValue] operator[>] Other[0] operator[||] identifier[niceMaxValue] operator[<] Other[0] operator[SEP] {
identifier[autoResetToZero] operator[=] literal[boolean] operator[SEP]
... |
@Override
public boolean containsKey(Object key) {
return key instanceof String ? members.containsKey(Key.of((String)key)) : false;
} | class class_name[name] begin[{]
method[containsKey, return_type[type[boolean]], modifier[public], parameter[key]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[Object] identifier[key] operator[SEP] {
Keyword[return] identifier[key] Keyword[instanceof] identifier[String] operator[?] identifier[members] operator[SEP] identifier[containsKey] operator[SEP] i... |
public static boolean isBindable(Class<?> subClass) {
return !subClass.isInterface() && !Modifier.isAbstract(
subClass.getModifiers()) && subClass.getTypeParameters().length == 0;
} | class class_name[name] begin[{]
method[isBindable, return_type[type[boolean]], modifier[public static], parameter[subClass]] begin[{]
return[binary_operation[binary_operation[call[subClass.isInterface, parameter[]], &&, call[Modifier.isAbstract, parameter[call[subClass.getModifiers, parameter[]]]]], &&... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isBindable] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[subClass] operator[SEP] {
Keyword[return] operator[!] identifier[subClass] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[&&] operator... |
public List<io.motown.vas.v10.soap.schema.ConnectorType> getConnectorTypes(ChargingStation chargingStation) {
List<io.motown.vas.v10.soap.schema.ConnectorType> connectorTypes = new ArrayList<>();
for (ConnectorType connectorType : chargingStation.getConnectorTypes()) {
if(connectorType.equa... | class class_name[name] begin[{]
method[getConnectorTypes, return_type[type[List]], modifier[public], parameter[chargingStation]] begin[{]
local_variable[type[List], connectorTypes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberR... | Keyword[public] identifier[List] operator[<] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[vas] operator[SEP] identifier[v10] operator[SEP] identifier[soap] operator[SEP] identifier[schema] operator[SEP] identifier[ConnectorType] operator[>] identifier[getConnectorTypes] operator[SEP] identif... |
protected boolean shouldCloseConnection(HttpConnection conn) {
// Connection must be closed due to an abnormal circumstance
if (isConnectionCloseForced()) {
LOG.debug("Should force-close connection.");
return true;
}
Header connectionHeader = null;
// In... | class class_name[name] begin[{]
method[shouldCloseConnection, return_type[type[boolean]], modifier[protected], parameter[conn]] begin[{]
if[call[.isConnectionCloseForced, parameter[]]] begin[{]
call[LOG.debug, parameter[literal["Should force-close connection."]]]
... | Keyword[protected] Keyword[boolean] identifier[shouldCloseConnection] operator[SEP] identifier[HttpConnection] identifier[conn] operator[SEP] {
Keyword[if] operator[SEP] identifier[isConnectionCloseForced] operator[SEP] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[debug] oper... |
@VisibleForTesting
static boolean isPghp(String line) {
if (line == null)
return false;
else
// return Pattern.matches("^(\\\\.*\\\\)?\\$PGHP.*$", line);
return pghpPattern.matcher(line).matches();
} | class class_name[name] begin[{]
method[isPghp, return_type[type[boolean]], modifier[static], parameter[line]] begin[{]
if[binary_operation[member[.line], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
return[call[pghpPattern.matcher, parameter[member[.line]]]]
... | annotation[@] identifier[VisibleForTesting] Keyword[static] Keyword[boolean] identifier[isPghp] operator[SEP] identifier[String] identifier[line] operator[SEP] {
Keyword[if] operator[SEP] identifier[line] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[else] Keyword[... |
@SuppressWarnings("unchecked")
public EList<IfcSurfaceStyleElementSelect> getStyles() {
return (EList<IfcSurfaceStyleElementSelect>) eGet(Ifc2x3tc1Package.Literals.IFC_SURFACE_STYLE__STYLES, true);
} | class class_name[name] begin[{]
method[getStyles, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_SURFACE_STYLE__STYLES, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package.Literals, select... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[EList] operator[<] identifier[IfcSurfaceStyleElementSelect] operator[>] identifier[getStyles] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcS... |
public void waitTask(String taskID, long timeToWait) throws AlgoliaException {
this.waitTask(taskID, timeToWait, RequestOptions.empty);
} | class class_name[name] begin[{]
method[waitTask, return_type[void], modifier[public], parameter[taskID, timeToWait]] begin[{]
THIS[call[None.waitTask, parameter[member[.taskID], member[.timeToWait], member[RequestOptions.empty]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[waitTask] operator[SEP] identifier[String] identifier[taskID] , Keyword[long] identifier[timeToWait] operator[SEP] Keyword[throws] identifier[AlgoliaException] {
Keyword[this] operator[SEP] identifier[waitTask] operator[SEP] identifier[taskID] , identifier[timeToWait] ,... |
public Integer getAllocationSize()
{
if(childNode.getAttribute("allocation-size") != null && !childNode.getAttribute("allocation-size").equals("null"))
{
return Integer.valueOf(childNode.getAttribute("allocation-size"));
}
return null;
} | class class_name[name] begin[{]
method[getAllocationSize, return_type[type[Integer]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[call[childNode.getAttribute, parameter[literal["allocation-size"]]], !=, literal[null]], &&, call[childNode.getAttribute, parameter[... | Keyword[public] identifier[Integer] identifier[getAllocationSize] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[childNode] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[childNode] operator[SEP] ... |
public void addAnonymousFunctions() {
TreeSet<SymbolScope> scopes = new TreeSet<>(lexicalScopeOrdering);
for (SymbolScope scope : getAllScopes()) {
if (scope.isLexicalScope()) {
scopes.add(scope);
}
}
for (SymbolScope scope : scopes) {
addAnonymousFunctionsInScope(scope);
... | class class_name[name] begin[{]
method[addAnonymousFunctions, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[TreeSet], scopes]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isLexicalScope, pos... | Keyword[public] Keyword[void] identifier[addAnonymousFunctions] operator[SEP] operator[SEP] {
identifier[TreeSet] operator[<] identifier[SymbolScope] operator[>] identifier[scopes] operator[=] Keyword[new] identifier[TreeSet] operator[<] operator[>] operator[SEP] identifier[lexicalScopeOrdering] operator[SEP] op... |
synchronized public LHS toLHS(
CallStack callstack, Interpreter interpreter )
throws UtilEvalError
{
// Should clean this up to a single return statement
reset();
LHS lhs;
// Simple (non-compound) variable assignment e.g. x=5;
if ( !isCompound(evalName) )
... | class class_name[name] begin[{]
method[toLHS, return_type[type[LHS]], modifier[synchronized public], parameter[callstack, interpreter]] begin[{]
call[.reset, parameter[]]
local_variable[type[LHS], lhs]
if[call[.isCompound, parameter[member[.evalName]]]] begin[{]
... | Keyword[synchronized] Keyword[public] identifier[LHS] identifier[toLHS] operator[SEP] identifier[CallStack] identifier[callstack] , identifier[Interpreter] identifier[interpreter] operator[SEP] Keyword[throws] identifier[UtilEvalError] {
identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[LHS... |
public int controlledPoll(final ControlledFragmentHandler handler, final int fragmentLimit)
{
if (isClosed)
{
return 0;
}
int fragmentsRead = 0;
long initialPosition = subscriberPosition.get();
int initialOffset = (int)initialPosition & termLengthMask;
... | class class_name[name] begin[{]
method[controlledPoll, return_type[type[int]], modifier[public], parameter[handler, fragmentLimit]] begin[{]
if[member[.isClosed]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
local_variable[type[int], fragmentsRead]
... | Keyword[public] Keyword[int] identifier[controlledPoll] operator[SEP] Keyword[final] identifier[ControlledFragmentHandler] identifier[handler] , Keyword[final] Keyword[int] identifier[fragmentLimit] operator[SEP] {
Keyword[if] operator[SEP] identifier[isClosed] operator[SEP] {
Keyword[return] Other[0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.