code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void notifyAfterEvaluation(String expr) {
if (getEvaluationListeners() == null)
return;
for (EvaluationListener listener: getEvaluationListeners()) {
listener.afterEvaluation(this, expr);
}
} | class class_name[name] begin[{]
method[notifyAfterEvaluation, return_type[void], modifier[public], parameter[expr]] begin[{]
if[binary_operation[call[.getEvaluationListeners, parameter[]], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStatement(b... | Keyword[public] Keyword[void] identifier[notifyAfterEvaluation] operator[SEP] identifier[String] identifier[expr] operator[SEP] {
Keyword[if] operator[SEP] identifier[getEvaluationListeners] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP... |
@Override
public void update(Object obj) {
lock.writeLock().lock();
try {
populated = true;
this.queueActionLocked(DeltaType.Updated, obj);
} finally {
lock.writeLock().unlock();
}
} | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[obj]] begin[{]
call[lock.writeLock, parameter[]]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=populated, postfix_operators=[], prefix_operato... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[update] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[tr... |
static String downloadFile(String artifactUrl, String checksum) {
LOGGER.entering(new Object[] { artifactUrl, checksum });
Preconditions.checkArgument(StringUtils.isNotBlank(artifactUrl), "Invalid URL: Cannot be null or empty");
Preconditions.checkArgument(StringUtils.isNotBlank(checksum), "Inva... | class class_name[name] begin[{]
method[downloadFile, return_type[type[String]], modifier[static], parameter[artifactUrl, checksum]] begin[{]
call[LOGGER.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=artifactUrl, postfix_ope... | Keyword[static] identifier[String] identifier[downloadFile] operator[SEP] identifier[String] identifier[artifactUrl] , identifier[String] identifier[checksum] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[entering] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
... |
protected void register(final Class<? extends Component<?>> interfaceClass, final Class<? extends Component<?>> implClass, final PriorityLevel priority, final int weight) {
preloadClass(interfaceClass);
getFacade().componentFactory().register(
Registrati... | class class_name[name] begin[{]
method[register, return_type[void], modifier[protected], parameter[interfaceClass, implClass, priority, weight]] begin[{]
call[.preloadClass, parameter[member[.interfaceClass]]]
call[.getFacade, parameter[]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[register] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Component] operator[<] operator[?] operator[>] operator[>] identifier[interfaceClass] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] iden... |
public static Certificate getCertificate(KeyStore keyStore, String alias) {
try {
return keyStore.getCertificate(alias);
} catch (Exception e) {
throw new CryptoException(e);
}
} | class class_name[name] begin[{]
method[getCertificate, return_type[type[Certificate]], modifier[public static], parameter[keyStore, alias]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=alias, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[static] identifier[Certificate] identifier[getCertificate] operator[SEP] identifier[KeyStore] identifier[keyStore] , identifier[String] identifier[alias] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[keyStore] operator[SEP] identifier[getCertificate] operator[SEP] ... |
public <T> Select<T> SELECT_FROM(DomainObjectMatch<T> start) {
DomainObjectMatch<?> delegate = APIAccess.getDelegate(start);
DomainObjectMatch<?> match = delegate != null ? delegate : start;
SelectExpression<T> se = new SelectExpression<T>(APIAccess.getDomainObjectType(start),
match, this.getIntAccess());
t... | class class_name[name] begin[{]
method[SELECT_FROM, return_type[type[Select]], modifier[public], parameter[start]] begin[{]
local_variable[type[DomainObjectMatch], delegate]
local_variable[type[DomainObjectMatch], match]
local_variable[type[SelectExpression], se]
THIS[me... | Keyword[public] operator[<] identifier[T] operator[>] identifier[Select] operator[<] identifier[T] operator[>] identifier[SELECT_FROM] operator[SEP] identifier[DomainObjectMatch] operator[<] identifier[T] operator[>] identifier[start] operator[SEP] {
identifier[DomainObjectMatch] operator[<] operator[?] operator... |
private TreeMap<Integer, Pair<String, String>> loadFeatureName(Map<String, Integer> featureIndex, BufferedReader br) throws Exception {
TreeMap<Integer, Pair<String, String>> featureNames = new TreeMap<Integer, Pair<String, String>>();
String temp = null;
while (StringUtil.isNotBlank(temp = br.readLine())) {
... | class class_name[name] begin[{]
method[loadFeatureName, return_type[type[TreeMap]], modifier[private], parameter[featureIndex, br]] begin[{]
local_variable[type[TreeMap], featureNames]
local_variable[type[String], temp]
while[call[StringUtil.isNotBlank, parameter[assign[member[.... | Keyword[private] identifier[TreeMap] operator[<] identifier[Integer] , identifier[Pair] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[loadFeatureName] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[featureIndex] , id... |
public void setTunnelOptions(java.util.Collection<VpnTunnelOptionsSpecification> tunnelOptions) {
if (tunnelOptions == null) {
this.tunnelOptions = null;
return;
}
this.tunnelOptions = new com.amazonaws.internal.SdkInternalList<VpnTunnelOptionsSpecification>(tunnelOption... | class class_name[name] begin[{]
method[setTunnelOptions, return_type[void], modifier[public], parameter[tunnelOptions]] begin[{]
if[binary_operation[member[.tunnelOptions], ==, literal[null]]] begin[{]
assign[THIS[member[None.tunnelOptions]], literal[null]]
r... | Keyword[public] Keyword[void] identifier[setTunnelOptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[VpnTunnelOptionsSpecification] operator[>] identifier[tunnelOptions] operator[SEP] {
Keyword[if] operator[SEP] identifier[tunnelOpti... |
public int getEnd(int index) {
// Test if the last beginning is the new end
if(index == (pastIndex - 1))
{
return previousBegin - 1;
}
// Otherwise find it!
int new_end = 0;
for(int i = 0; i < index + 1; i++) {
new_end += getNodeCount(i);
}
pastIndex = index;
previousEnd ... | class class_name[name] begin[{]
method[getEnd, return_type[type[int]], modifier[public], parameter[index]] begin[{]
if[binary_operation[member[.index], ==, binary_operation[member[.pastIndex], -, literal[1]]]] begin[{]
return[binary_operation[member[.previousBegin], -, literal[1]]]
... | Keyword[public] Keyword[int] identifier[getEnd] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[index] operator[==] operator[SEP] identifier[pastIndex] operator[-] Other[1] operator[SEP] operator[SEP] {
Keyword[return] identifier[previousBegin] operato... |
private Component createUserInfoDropDown() {
PopupView pv = new PopupView(new PopupView.Content() {
private static final long serialVersionUID = 1L;
public String getMinimizedValueAsHTML() {
CmsObject cms = A_CmsUI.getCmsObject();
return getDropDownBut... | class class_name[name] begin[{]
method[createUserInfoDropDown, return_type[type[Component]], modifier[private], parameter[]] begin[{]
local_variable[type[PopupView], pv]
call[pv.setDescription, parameter[call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USER_INFO_TITLE_0... | Keyword[private] identifier[Component] identifier[createUserInfoDropDown] operator[SEP] operator[SEP] {
identifier[PopupView] identifier[pv] operator[=] Keyword[new] identifier[PopupView] operator[SEP] Keyword[new] identifier[PopupView] operator[SEP] identifier[Content] operator[SEP] operator[SEP] {
K... |
public int threads() {
int threads = reader.getInteger(THREADS, DEFAULT_THREADS);
if (threads == -1) {
return Runtime.getRuntime().availableProcessors();
}
return threads;
} | class class_name[name] begin[{]
method[threads, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], threads]
if[binary_operation[member[.threads], ==, literal[1]]] begin[{]
return[call[Runtime.getRuntime, parameter[]]]
else begin... | Keyword[public] Keyword[int] identifier[threads] operator[SEP] operator[SEP] {
Keyword[int] identifier[threads] operator[=] identifier[reader] operator[SEP] identifier[getInteger] operator[SEP] identifier[THREADS] , identifier[DEFAULT_THREADS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[thr... |
public void getAndSetNodeDataSize(String nodePath)
{
try
{
long dataSize = getNodeDataSizeDirectly(nodePath);
quotaPersister.setNodeDataSizeIfQuotaExists(rName, wsName, nodePath, dataSize);
}
catch (QuotaManagerException e)
{
LOG.warn("Can't calculate node dat... | class class_name[name] begin[{]
method[getAndSetNodeDataSize, return_type[void], modifier[public], parameter[nodePath]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=nod... | Keyword[public] Keyword[void] identifier[getAndSetNodeDataSize] operator[SEP] identifier[String] identifier[nodePath] operator[SEP] {
Keyword[try] {
Keyword[long] identifier[dataSize] operator[=] identifier[getNodeDataSizeDirectly] operator[SEP] identifier[nodePath] operator[SEP] operator[SEP] identif... |
public String getLabel() {
if (SemanticRole_Type.featOkTst && ((SemanticRole_Type)jcasType).casFeat_label == null)
jcasType.jcas.throwFeatMissing("label", "edu.cmu.lti.oaqa.type.nlp.SemanticRole");
return jcasType.ll_cas.ll_getStringValue(addr, ((SemanticRole_Type)jcasType).casFeatCode_label);} | class class_name[name] begin[{]
method[getLabel, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[SemanticRole_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] identifier[String] identifier[getLabel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[SemanticRole_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[SemanticRole_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] i... |
public String getProp(String key) {
if (this.specProperties.containsKey(key)) {
return this.specProperties.getProperty(key);
}
return this.commonProperties.getProperty(key);
} | class class_name[name] begin[{]
method[getProp, return_type[type[String]], modifier[public], parameter[key]] begin[{]
if[THIS[member[None.specProperties]call[None.containsKey, parameter[member[.key]]]]] begin[{]
return[THIS[member[None.specProperties]call[None.getProperty, parameter... | Keyword[public] identifier[String] identifier[getProp] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[specProperties] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
Key... |
public static DenseVector fromCSV(String csv) {
return Vector.fromCSV(csv).to(Vectors.DENSE);
} | class class_name[name] begin[{]
method[fromCSV, return_type[type[DenseVector]], modifier[public static], parameter[csv]] begin[{]
return[call[Vector.fromCSV, parameter[member[.csv]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[DenseVector] identifier[fromCSV] operator[SEP] identifier[String] identifier[csv] operator[SEP] {
Keyword[return] identifier[Vector] operator[SEP] identifier[fromCSV] operator[SEP] identifier[csv] operator[SEP] operator[SEP] identifier[to] operator[SEP] identifier[Vecto... |
public static String[] tokenize(String s) {
List<String> tokens = new ArrayList<String>();
StringTokenizer toker = new StringTokenizer(s);
while (toker.hasMoreTokens())
tokens.add(toker.nextToken());
return tokens.toArray(new String[tokens.size()]);
} | class class_name[name] begin[{]
method[tokenize, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
local_variable[type[List], tokens]
local_variable[type[StringTokenizer], toker]
while[call[toker.hasMoreTokens, parameter[]]] begin[{]
call[tok... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[tokenize] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[tokens] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[S... |
public static IntList range(int start, int end, int step)
{
IntList l = new IntList((end-start)/step +1);
for(int i = start; i < end; i++)
l.add(i);
return l;
} | class class_name[name] begin[{]
method[range, return_type[type[IntList]], modifier[public static], parameter[start, end, step]] begin[{]
local_variable[type[IntList], l]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], ... | Keyword[public] Keyword[static] identifier[IntList] identifier[range] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] , Keyword[int] identifier[step] operator[SEP] {
identifier[IntList] identifier[l] operator[=] Keyword[new] identifier[IntList] operator[SEP] operator[SEP] identifier... |
public void addOrgUnitResource(String resourceName) {
if ((m_throwable != null) || (m_orgUnitName == null)) {
return;
}
if (m_orgUnitResources == null) {
m_orgUnitResources = new HashMap<String, List<String>>();
}
List<String> resources = m_orgUnitResourc... | class class_name[name] begin[{]
method[addOrgUnitResource, return_type[void], modifier[public], parameter[resourceName]] begin[{]
if[binary_operation[binary_operation[member[.m_throwable], !=, literal[null]], ||, binary_operation[member[.m_orgUnitName], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[addOrgUnitResource] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[m_throwable] operator[!=] Other[null] operator[SEP] operator[||] operator[SEP] identifier[m_orgUnitName] operator[==] Other[nul... |
@Override
public CollectionAttribute<X, ?> getDeclaredCollection(String paramName)
{
PluralAttribute<X, ?, ?> declaredAttrib = getDeclaredPluralAttribute(paramName);
if (isCollectionAttribute(declaredAttrib))
{
return (CollectionAttribute<X, ?>) declaredAttrib;
}
... | class class_name[name] begin[{]
method[getDeclaredCollection, return_type[type[CollectionAttribute]], modifier[public], parameter[paramName]] begin[{]
local_variable[type[PluralAttribute], declaredAttrib]
if[call[.isCollectionAttribute, parameter[member[.declaredAttrib]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[CollectionAttribute] operator[<] identifier[X] , operator[?] operator[>] identifier[getDeclaredCollection] operator[SEP] identifier[String] identifier[paramName] operator[SEP] {
identifier[PluralAttribute] operator[<] identifier[X] , operator[?] , ... |
private boolean isBareS3NBucketWithoutTrailingSlash(String s) {
String s2 = s.toLowerCase();
Matcher m = Pattern.compile("s3n://[^/]*").matcher(s2);
return m.matches();
} | class class_name[name] begin[{]
method[isBareS3NBucketWithoutTrailingSlash, return_type[type[boolean]], modifier[private], parameter[s]] begin[{]
local_variable[type[String], s2]
local_variable[type[Matcher], m]
return[call[m.matches, parameter[]]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[isBareS3NBucketWithoutTrailingSlash] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[String] identifier[s2] operator[=] identifier[s] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifi... |
protected Entity cacheLoadOrStore(Entity entity) {
Entity cachedEntity = entityCache.findInCache(entity.getClass(),
entity.getId());
if (cachedEntity != null) {
return cachedEntity;
}
entityCache.put(entity,
... | class class_name[name] begin[{]
method[cacheLoadOrStore, return_type[type[Entity]], modifier[protected], parameter[entity]] begin[{]
local_variable[type[Entity], cachedEntity]
if[binary_operation[member[.cachedEntity], !=, literal[null]]] begin[{]
return[member[.cachedEntity... | Keyword[protected] identifier[Entity] identifier[cacheLoadOrStore] operator[SEP] identifier[Entity] identifier[entity] operator[SEP] {
identifier[Entity] identifier[cachedEntity] operator[=] identifier[entityCache] operator[SEP] identifier[findInCache] operator[SEP] identifier[entity] operator[SEP] identifier[ge... |
@Override
public void include(Readable in, String source) throws IOException
{
if (cursor != end)
{
release();
}
if (includeStack == null)
{
includeStack = new ArrayDeque<>();
}
includeStack.push(includeLevel);
i... | class class_name[name] begin[{]
method[include, return_type[void], modifier[public], parameter[in, source]] begin[{]
if[binary_operation[member[.cursor], !=, member[.end]]] begin[{]
call[.release, parameter[]]
else begin[{]
None
end[}]
if[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[include] operator[SEP] identifier[Readable] identifier[in] , identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[cursor] operator[!=] identifier[end] operato... |
private int[] alignCategoricals(String[] longerDomain, String[] shorterDomain) {
String[] sortedLongerDomain = Arrays.copyOf(longerDomain, longerDomain.length);
//Sort to make sure binary search is possible
Arrays.sort(sortedLongerDomain);
int[] transformedIndices = MemoryManager.malloc4(shorterDomain.... | class class_name[name] begin[{]
method[alignCategoricals, return_type[type[int]], modifier[private], parameter[longerDomain, shorterDomain]] begin[{]
local_variable[type[String], sortedLongerDomain]
call[Arrays.sort, parameter[member[.sortedLongerDomain]]]
local_variable[type[in... | Keyword[private] Keyword[int] operator[SEP] operator[SEP] identifier[alignCategoricals] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[longerDomain] , identifier[String] operator[SEP] operator[SEP] identifier[shorterDomain] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] ... |
@Override
public V getAndPut(K key, ValueProvider<? super K, ? extends V> valueProvider) {
return getAndPut(key, valueProvider, true);
} | class class_name[name] begin[{]
method[getAndPut, return_type[type[V]], modifier[public], parameter[key, valueProvider]] begin[{]
return[call[.getAndPut, parameter[member[.key], member[.valueProvider], literal[true]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[getAndPut] operator[SEP] identifier[K] identifier[key] , identifier[ValueProvider] operator[<] operator[?] Keyword[super] identifier[K] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[valueProvider] operator[SEP] {
... |
@Override
public Result get(Get get) throws IOException {
LOG.trace("get(Get)");
try (Scope scope = TRACER.spanBuilder("BigtableTable.get").startScopedSpan()) {
return convertToResult(getResults(get, "get"));
}
} | class class_name[name] begin[{]
method[get, return_type[type[Result]], modifier[public], parameter[get]] begin[{]
call[LOG.trace, parameter[literal["get(Get)"]]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member... | annotation[@] identifier[Override] Keyword[public] identifier[Result] identifier[get] operator[SEP] identifier[Get] identifier[get] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] operat... |
@SuppressWarnings("unchecked")
static Iterator<MarkerRange.Builder> add(
In constraint, List<FieldPartitioner> fps,
Iterator<MarkerRange.Builder> inner) {
Iterator<MarkerRange.Builder> current = inner;
List<FieldPartitioner> compatible = Lists.newArrayList();
for (FieldPartitioner fp : fps) {... | class class_name[name] begin[{]
method[add, return_type[type[Iterator]], modifier[static], parameter[constraint, fps, inner]] begin[{]
local_variable[type[Iterator], current]
local_variable[type[List], compatible]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDec... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] identifier[Iterator] operator[<] identifier[MarkerRange] operator[SEP] identifier[Builder] operator[>] identifier[add] operator[SEP] identifier[In] identifier[constraint] , identifier[List] operator[<] identifier[Fie... |
void reduceVocab()
{
table = new int[vocabSize];
int j = 0;
for (int i = 0; i < vocabSize; i++)
{
if (vocab[i].cn > minReduce)
{
vocab[j].cn = vocab[i].cn;
vocab[j].word = vocab[i].word;
table[vocabIndexMap.get(v... | class class_name[name] begin[{]
method[reduceVocab, return_type[void], modifier[default], parameter[]] begin[{]
assign[member[.table], ArrayCreator(dimensions=[MemberReference(member=vocabSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_oper... | Keyword[void] identifier[reduceVocab] operator[SEP] operator[SEP] {
identifier[table] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[vocabSize] operator[SEP] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[... |
public long minTimestamp()
{
return ranges == null
? topLevel.markedForDeleteAt
: Math.min(topLevel.markedForDeleteAt, ranges.minMarkedAt());
} | class class_name[name] begin[{]
method[minTimestamp, return_type[type[long]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ranges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix... | Keyword[public] Keyword[long] identifier[minTimestamp] operator[SEP] operator[SEP] {
Keyword[return] identifier[ranges] operator[==] Other[null] operator[?] identifier[topLevel] operator[SEP] identifier[markedForDeleteAt] operator[:] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[topLev... |
static final List<String> split(String value) {
List<String> result = new ArrayList<String>();
SplitState state = SplitState.NEW;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
stateSwitch:
... | class class_name[name] begin[{]
method[split, return_type[type[List]], modifier[final static], parameter[value]] begin[{]
local_variable[type[List], result]
local_variable[type[SplitState], state]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=Non... | Keyword[static] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[split] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<]... |
@SuppressWarnings("PMD.AvoidCatchingThrowable")
private static String newString(char[] buf) {
if (STRING_CONSTRUCTOR != null) {
try {
return (String) STRING_CONSTRUCTOR.invokeExact(buf, true);
} catch (Throwable t) {
// Note: `invokeExact` explicitly throws Throwable to propagate any e... | class class_name[name] begin[{]
method[newString, return_type[type[String]], modifier[private static], parameter[buf]] begin[{]
if[binary_operation[member[.STRING_CONSTRUCTOR], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocati... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[String] identifier[newString] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[buf] operator[SEP] {
Keyword[if] operator[SEP] identifier[STRING_CONSTRUCTOR] operato... |
public M setOrPut(String attrOrNot, Object value) {
Table table = _getTable();
if (table != null && table.hasColumnLabel(attrOrNot)) {
_getModifyFlag().add(attrOrNot); // Add modify flag, update() need this flag.
}
attrs.put(attrOrNot, value);
return (M)this;
} | class class_name[name] begin[{]
method[setOrPut, return_type[type[M]], modifier[public], parameter[attrOrNot, value]] begin[{]
local_variable[type[Table], table]
if[binary_operation[binary_operation[member[.table], !=, literal[null]], &&, call[table.hasColumnLabel, parameter[member[.att... | Keyword[public] identifier[M] identifier[setOrPut] operator[SEP] identifier[String] identifier[attrOrNot] , identifier[Object] identifier[value] operator[SEP] {
identifier[Table] identifier[table] operator[=] identifier[_getTable] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ta... |
public static String fixCapitalization(String string)
{
if (string != null)
{
for (int i = 0; i < string.length(); i++)
{
if (Character.isLowerCase(string.charAt(i)))
return string; // Already lower case
}
StringBuf... | class class_name[name] begin[{]
method[fixCapitalization, return_type[type[String]], modifier[public static], parameter[string]] begin[{]
if[binary_operation[member[.string], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=... | Keyword[public] Keyword[static] identifier[String] identifier[fixCapitalization] operator[SEP] identifier[String] identifier[string] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] O... |
public boolean isWordMoreGeneral(String source, String target) throws MatcherLibraryException {
try {
List<ISense> sSenses = linguisticOracle.getSenses(source);
List<ISense> tSenses = linguisticOracle.getSenses(target);
for (ISense sSense : sSenses) {
for... | class class_name[name] begin[{]
method[isWordMoreGeneral, return_type[type[boolean]], modifier[public], parameter[source, target]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference... | Keyword[public] Keyword[boolean] identifier[isWordMoreGeneral] operator[SEP] identifier[String] identifier[source] , identifier[String] identifier[target] operator[SEP] Keyword[throws] identifier[MatcherLibraryException] {
Keyword[try] {
identifier[List] operator[<] identifier[ISense] operator[>] ide... |
public static <M> M getFieldValue(Class<?> containingClass, String fieldName, Class<M> fieldClass) {
return getFieldValue(containingClass, null, fieldName, fieldClass);
} | class class_name[name] begin[{]
method[getFieldValue, return_type[type[M]], modifier[public static], parameter[containingClass, fieldName, fieldClass]] begin[{]
return[call[.getFieldValue, parameter[member[.containingClass], literal[null], member[.fieldName], member[.fieldClass]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[M] operator[>] identifier[M] identifier[getFieldValue] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[containingClass] , identifier[String] identifier[fieldName] , identifier[Class] operator[<] identifier[M] operator[>] identifier[... |
public synchronized static void initConfig(ISuite suite) {
SeLionLogger.getLogger().entering(suite);
Map<ConfigProperty, String> initialValues = new HashMap<>();
for (ConfigProperty prop : ConfigProperty.values()) {
String paramValue = suite.getParameter(prop.getName());
... | class class_name[name] begin[{]
method[initConfig, return_type[void], modifier[synchronized public static], parameter[suite]] begin[{]
call[SeLionLogger.getLogger, parameter[]]
local_variable[type[Map], initialValues]
ForStatement(body=BlockStatement(label=None, statements=[Loca... | Keyword[public] Keyword[synchronized] Keyword[static] Keyword[void] identifier[initConfig] operator[SEP] identifier[ISuite] identifier[suite] operator[SEP] {
identifier[SeLionLogger] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[entering] operator[SEP] identifier[suite]... |
public Rule Inlines() {
return NodeSequence(
InlineOrIntermediateEndline(), push(new SuperNode(popAsNode())),
ZeroOrMore(InlineOrIntermediateEndline(), addAsChild()),
Optional(Endline(), drop())
);
} | class class_name[name] begin[{]
method[Inlines, return_type[type[Rule]], modifier[public], parameter[]] begin[{]
return[call[.NodeSequence, parameter[call[.InlineOrIntermediateEndline, parameter[]], call[.push, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=popAsNode, postfix_o... | Keyword[public] identifier[Rule] identifier[Inlines] operator[SEP] operator[SEP] {
Keyword[return] identifier[NodeSequence] operator[SEP] identifier[InlineOrIntermediateEndline] operator[SEP] operator[SEP] , identifier[push] operator[SEP] Keyword[new] identifier[SuperNode] operator[SEP] identifier[popAsNode] op... |
public java.lang.String getOwner() {
java.lang.Object ref = owner_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isVal... | class class_name[name] begin[{]
method[getOwner, return_type[type[java]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
return[Cast(expression=MemberReference(member=ref, postfix_op... | Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getOwner] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[owner_] operator[SEP] Keyword[if] operator[SE... |
private Node parseParametersType(JsDocToken token) {
Node paramsType = newNode(Token.PARAM_LIST);
boolean isVarArgs = false;
Node paramType = null;
if (token != JsDocToken.RIGHT_PAREN) {
do {
if (paramType != null) {
// skip past the comma
next();
skipEOLs();
... | class class_name[name] begin[{]
method[parseParametersType, return_type[type[Node]], modifier[private], parameter[token]] begin[{]
local_variable[type[Node], paramsType]
local_variable[type[boolean], isVarArgs]
local_variable[type[Node], paramType]
if[binary_operation[me... | Keyword[private] identifier[Node] identifier[parseParametersType] operator[SEP] identifier[JsDocToken] identifier[token] operator[SEP] {
identifier[Node] identifier[paramsType] operator[=] identifier[newNode] operator[SEP] identifier[Token] operator[SEP] identifier[PARAM_LIST] operator[SEP] operator[SEP] Keyword... |
private boolean isQueryBeanPackage(String domainPackage) {
for (int i = 0; i < packages.length; i++) {
if (domainPackage.startsWith(packages[i])) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[isQueryBeanPackage, return_type[type[boolean]], modifier[private], parameter[domainPackage]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=packages, postfix_operators=[], ... | Keyword[private] Keyword[boolean] identifier[isQueryBeanPackage] operator[SEP] identifier[String] identifier[domainPackage] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[packages] operator[SEP] identifier[length] oper... |
public static BufferedImage resizeToWidth(BufferedImage originalImage, int widthOut) {
int width = originalImage.getWidth();
int height = originalImage.getHeight();
int widthPercent = (widthOut * 100) / width;
int newHeight = (height * widthPercent) / 100;
BufferedImage resi... | class class_name[name] begin[{]
method[resizeToWidth, return_type[type[BufferedImage]], modifier[public static], parameter[originalImage, widthOut]] begin[{]
local_variable[type[int], width]
local_variable[type[int], height]
local_variable[type[int], widthPercent]
local_variable... | Keyword[public] Keyword[static] identifier[BufferedImage] identifier[resizeToWidth] operator[SEP] identifier[BufferedImage] identifier[originalImage] , Keyword[int] identifier[widthOut] operator[SEP] {
Keyword[int] identifier[width] operator[=] identifier[originalImage] operator[SEP] identifier[getWidth] operat... |
public AssessmentRunInProgressException withAssessmentRunArns(String... assessmentRunArns) {
if (this.assessmentRunArns == null) {
setAssessmentRunArns(new java.util.ArrayList<String>(assessmentRunArns.length));
}
for (String ele : assessmentRunArns) {
this.assessmentRunA... | class class_name[name] begin[{]
method[withAssessmentRunArns, return_type[type[AssessmentRunInProgressException]], modifier[public], parameter[assessmentRunArns]] begin[{]
if[binary_operation[THIS[member[None.assessmentRunArns]], ==, literal[null]]] begin[{]
call[.setAss... | Keyword[public] identifier[AssessmentRunInProgressException] identifier[withAssessmentRunArns] operator[SEP] identifier[String] operator[...] identifier[assessmentRunArns] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[assessmentRunArns] operator[==] Other[null] operator[SEP] {... |
@Override
public Thread newThread(Runnable runnable) {
Thread t = new Thread(group, runnable, namePrefix + threadNumber.getAndIncrement());
t.setDaemon(true);
t.setPriority(threadPriority);
// optional handler for uncaught exceptions
if (exceptionHandler != null) {
t.setUncaughtExceptionHandler(exceptio... | class class_name[name] begin[{]
method[newThread, return_type[type[Thread]], modifier[public], parameter[runnable]] begin[{]
local_variable[type[Thread], t]
call[t.setDaemon, parameter[literal[true]]]
call[t.setPriority, parameter[member[.threadPriority]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[Thread] identifier[newThread] operator[SEP] identifier[Runnable] identifier[runnable] operator[SEP] {
identifier[Thread] identifier[t] operator[=] Keyword[new] identifier[Thread] operator[SEP] identifier[group] , identifier[runnable] , identifier[na... |
public static boolean isEqualCollection(Collection<String> list1, Collection<String> list2) {
Validate.notNull(list1);
Validate.notNull(list2);
boolean result = true;
if (list1.size() == list2.size()) {
for (final String currentString : list1) {
if (!list2.c... | class class_name[name] begin[{]
method[isEqualCollection, return_type[type[boolean]], modifier[public static], parameter[list1, list2]] begin[{]
call[Validate.notNull, parameter[member[.list1]]]
call[Validate.notNull, parameter[member[.list2]]]
local_variable[type[boolea... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isEqualCollection] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[list1] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[list2] operator[SEP] {
identifier[Validate] operator[SEP... |
public static byte[] expandKey(byte[] K, byte[] H, byte[] key, MessageDigest hash, int requiredLength) {
byte[] result = key;
while (result.length < requiredLength) {
SshPacketBuilder buf = new SshPacketBuilder();
buf.writeMpInt(K);
buf.append(H);
buf.append(result);
hash.update(buf.finish());
byt... | class class_name[name] begin[{]
method[expandKey, return_type[type[byte]], modifier[public static], parameter[K, H, key, hash, requiredLength]] begin[{]
local_variable[type[byte], result]
while[binary_operation[member[result.length], <, member[.requiredLength]]] begin[{]
loc... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[expandKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[K] , Keyword[byte] operator[SEP] operator[SEP] identifier[H] , Keyword[byte] operator[SEP] operator[SEP] identifier[key] , identifier[MessageDigest] ident... |
public final static List<PolymerNotation> getCHEMPolymers(List<PolymerNotation> polymers) {
List<PolymerNotation> chemPolymers = new ArrayList<PolymerNotation>();
for (PolymerNotation polymer : polymers) {
if (polymer.getPolymerID() instanceof ChemEntity) {
chemPolymers.add(polymer);
}
... | class class_name[name] begin[{]
method[getCHEMPolymers, return_type[type[List]], modifier[final public static], parameter[polymers]] begin[{]
local_variable[type[List], chemPolymers]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodIn... | Keyword[public] Keyword[final] Keyword[static] identifier[List] operator[<] identifier[PolymerNotation] operator[>] identifier[getCHEMPolymers] operator[SEP] identifier[List] operator[<] identifier[PolymerNotation] operator[>] identifier[polymers] operator[SEP] {
identifier[List] operator[<] identifier[PolymerNo... |
protected Pair<Set<Event>, Collection<MultifactorAuthenticationProvider>> filterEventsByMultifactorAuthenticationProvider(
final Set<Event> resolveEvents, final Authentication authentication,
final RegisteredService registeredService, final HttpServletRequest request) {
LOGGER.debug("Locating mu... | class class_name[name] begin[{]
method[filterEventsByMultifactorAuthenticationProvider, return_type[type[Pair]], modifier[protected], parameter[resolveEvents, authentication, registeredService, request]] begin[{]
call[LOGGER.debug, parameter[literal["Locating multifactor providers to determine ... | Keyword[protected] identifier[Pair] operator[<] identifier[Set] operator[<] identifier[Event] operator[>] , identifier[Collection] operator[<] identifier[MultifactorAuthenticationProvider] operator[>] operator[>] identifier[filterEventsByMultifactorAuthenticationProvider] operator[SEP] Keyword[final] identifier[Set] o... |
public Set<SortedSet<T>> allSubsets(final SortedSet<T> set) {
final Set<SortedSet<T>> subsets = new LinkedHashSet<>();
allSubsets(set, this.rootNodes, subsets);
return subsets;
} | class class_name[name] begin[{]
method[allSubsets, return_type[type[Set]], modifier[public], parameter[set]] begin[{]
local_variable[type[Set], subsets]
call[.allSubsets, parameter[member[.set], THIS[member[None.rootNodes]], member[.subsets]]]
return[member[.subsets]]
end[}]... | Keyword[public] identifier[Set] operator[<] identifier[SortedSet] operator[<] identifier[T] operator[>] operator[>] identifier[allSubsets] operator[SEP] Keyword[final] identifier[SortedSet] operator[<] identifier[T] operator[>] identifier[set] operator[SEP] {
Keyword[final] identifier[Set] operator[<] identifier... |
public Schema field(String fieldName, String fieldType) {
if (tableSchema.containsKey(fieldName)) {
throw new ValidationException("Duplicate field name $fieldName.");
}
LinkedHashMap<String, String> fieldProperties = new LinkedHashMap<>();
fieldProperties.put(SCHEMA_TYPE, fieldType);
tableSchema.put(fiel... | class class_name[name] begin[{]
method[field, return_type[type[Schema]], modifier[public], parameter[fieldName, fieldType]] begin[{]
if[call[tableSchema.containsKey, parameter[member[.fieldName]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=... | Keyword[public] identifier[Schema] identifier[field] operator[SEP] identifier[String] identifier[fieldName] , identifier[String] identifier[fieldType] operator[SEP] {
Keyword[if] operator[SEP] identifier[tableSchema] operator[SEP] identifier[containsKey] operator[SEP] identifier[fieldName] operator[SEP] operato... |
Task<Tuple2<String, List<String>>> createFullSummary(int id) {
return Task.par(createMailboxSummary(id), createConnectionsSummaries(id));
} | class class_name[name] begin[{]
method[createFullSummary, return_type[type[Task]], modifier[default], parameter[id]] begin[{]
return[call[Task.par, parameter[call[.createMailboxSummary, parameter[member[.id]]], call[.createConnectionsSummaries, parameter[member[.id]]]]]]
end[}]
END[}] | identifier[Task] operator[<] identifier[Tuple2] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] operator[>] identifier[createFullSummary] operator[SEP] Keyword[int] identifier[id] operator[SEP] {
Keyword[return] identifier[Task] operator[SEP] identifier[p... |
public static boolean areValuesEqual( Object lhsValue, Object rhsValue )
{
//
// Note we do *not* verify the compatibility of the lhs & rhs types. That
// is too much overhead. Instead compare the types only when you need to.
//
if( lhsValue == null && rhsValue == null )
{
return true;
... | class class_name[name] begin[{]
method[areValuesEqual, return_type[type[boolean]], modifier[public static], parameter[lhsValue, rhsValue]] begin[{]
if[binary_operation[binary_operation[member[.lhsValue], ==, literal[null]], &&, binary_operation[member[.rhsValue], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[areValuesEqual] operator[SEP] identifier[Object] identifier[lhsValue] , identifier[Object] identifier[rhsValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[lhsValue] operator[==] Other[null] operator[&&] identifier[rhsValue] operator[==] Other... |
private void removeUselessDefiners(final int reg) {
Map<JavaClass, List<MethodInfo>> definers = parameterDefiners.get(Integer.valueOf(reg));
if (CollectionUtils.isEmpty(definers)) {
return;
}
String methodSig = getSigConstantOperand();
String methodName = getNameCons... | class class_name[name] begin[{]
method[removeUselessDefiners, return_type[void], modifier[private], parameter[reg]] begin[{]
local_variable[type[Map], definers]
if[call[CollectionUtils.isEmpty, parameter[member[.definers]]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[removeUselessDefiners] operator[SEP] Keyword[final] Keyword[int] identifier[reg] operator[SEP] {
identifier[Map] operator[<] identifier[JavaClass] , identifier[List] operator[<] identifier[MethodInfo] operator[>] operator[>] identifier[definers] operator[=] identifier[p... |
public void setResolverRuleAssociations(java.util.Collection<ResolverRuleAssociation> resolverRuleAssociations) {
if (resolverRuleAssociations == null) {
this.resolverRuleAssociations = null;
return;
}
this.resolverRuleAssociations = new java.util.ArrayList<ResolverRuleA... | class class_name[name] begin[{]
method[setResolverRuleAssociations, return_type[void], modifier[public], parameter[resolverRuleAssociations]] begin[{]
if[binary_operation[member[.resolverRuleAssociations], ==, literal[null]]] begin[{]
assign[THIS[member[None.resolverRule... | Keyword[public] Keyword[void] identifier[setResolverRuleAssociations] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ResolverRuleAssociation] operator[>] identifier[resolverRuleAssociations] operator[SEP] {
Keyword[if] operator[SEP] ident... |
public static <A> Iterator<Pair<Integer, A>> indexed(final Iterator<? extends A> iterator) {
if (iterator == null)
throw new NullPointerException("iterator");
return new AbstractIterator<Pair<Integer, A>>() {
int i = 0;
@Override
protected Pair<Integer, A> computeNext() {
if (iterator.hasNext()) {
... | class class_name[name] begin[{]
method[indexed, return_type[type[Iterator]], modifier[public static], parameter[iterator]] begin[{]
if[binary_operation[member[.iterator], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operator... | Keyword[public] Keyword[static] operator[<] identifier[A] operator[>] identifier[Iterator] operator[<] identifier[Pair] operator[<] identifier[Integer] , identifier[A] operator[>] operator[>] identifier[indexed] operator[SEP] Keyword[final] identifier[Iterator] operator[<] operator[?] Keyword[extends] identifier[A] op... |
protected void parseBracketCreateMatrix(TokenList tokens, Sequence sequence) {
List<TokenList.Token> left = new ArrayList<TokenList.Token>();
TokenList.Token t = tokens.getFirst();
while( t != null ) {
TokenList.Token next = t.next;
if( t.getSymbol() == Symbol.BRACKET_L... | class class_name[name] begin[{]
method[parseBracketCreateMatrix, return_type[void], modifier[protected], parameter[tokens, sequence]] begin[{]
local_variable[type[List], left]
local_variable[type[TokenList], t]
while[binary_operation[member[.t], !=, literal[null]]] begin[{]
... | Keyword[protected] Keyword[void] identifier[parseBracketCreateMatrix] operator[SEP] identifier[TokenList] identifier[tokens] , identifier[Sequence] identifier[sequence] operator[SEP] {
identifier[List] operator[<] identifier[TokenList] operator[SEP] identifier[Token] operator[>] identifier[left] operator[=] Key... |
public V remove(Object key) {
final int index = indexOfKey(key);
if (index >= 0) {
return removeAt(index);
}
return null;
} | class class_name[name] begin[{]
method[remove, return_type[type[V]], modifier[public], parameter[key]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[.index], >=, literal[0]]] begin[{]
return[call[.removeAt, parameter[member[.index]]]]
else begi... | Keyword[public] identifier[V] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] {
Keyword[final] Keyword[int] identifier[index] operator[=] identifier[indexOfKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[>=] Oth... |
public GetLifecyclePolicyPreviewResult withPreviewResults(LifecyclePolicyPreviewResult... previewResults) {
if (this.previewResults == null) {
setPreviewResults(new java.util.ArrayList<LifecyclePolicyPreviewResult>(previewResults.length));
}
for (LifecyclePolicyPreviewResult ele : pr... | class class_name[name] begin[{]
method[withPreviewResults, return_type[type[GetLifecyclePolicyPreviewResult]], modifier[public], parameter[previewResults]] begin[{]
if[binary_operation[THIS[member[None.previewResults]], ==, literal[null]]] begin[{]
call[.setPreviewResult... | Keyword[public] identifier[GetLifecyclePolicyPreviewResult] identifier[withPreviewResults] operator[SEP] identifier[LifecyclePolicyPreviewResult] operator[...] identifier[previewResults] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[previewResults] operator[==] Other[null] oper... |
AmqpClient closeOkConnection(Continuation callback, ErrorHandler error) {
Object[] args = {};
AmqpBuffer bodyArg = null;
String methodName = "closeOkConnection";
String methodId = "10" + "50";
AmqpMethod amqpMethod = MethodLookup.LookupMethod(methodId);
Object[] argument... | class class_name[name] begin[{]
method[closeOkConnection, return_type[type[AmqpClient]], modifier[default], parameter[callback, error]] begin[{]
local_variable[type[Object], args]
local_variable[type[AmqpBuffer], bodyArg]
local_variable[type[String], methodName]
local_variable[t... | identifier[AmqpClient] identifier[closeOkConnection] operator[SEP] identifier[Continuation] identifier[callback] , identifier[ErrorHandler] identifier[error] operator[SEP] {
identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[=] {
} operator[SEP] identifier[AmqpBuffer] ide... |
private long toLong(byte[] data)
{
if (data == null || data.length != 8)
return 0x0;
// ----------
return (long) (
// (Below) convert to longs before shift because digits
// are lost with ints beyond the 32-bit limit
(long) (0xff & data[0]) << 56 | (long) ... | class class_name[name] begin[{]
method[toLong, return_type[type[long]], modifier[private], parameter[data]] begin[{]
if[binary_operation[binary_operation[member[.data], ==, literal[null]], ||, binary_operation[member[data.length], !=, literal[8]]]] begin[{]
return[literal[0x0]]
else beg... | Keyword[private] Keyword[long] identifier[toLong] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[||] identifier[data] operator[SEP] identifier[length] operator[!=] Other[8] operator[SEP] Keyword... |
public static void addToListIfNotExists(List<String> list, String value) {
boolean found = false;
for (String item : list) {
if (item.equalsIgnoreCase(value)) {
found = true;
break;
}
}
if (!found) {
list.add(value);
... | class class_name[name] begin[{]
method[addToListIfNotExists, return_type[void], modifier[public static], parameter[list, value]] begin[{]
local_variable[type[boolean], found]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReferen... | Keyword[public] Keyword[static] Keyword[void] identifier[addToListIfNotExists] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[list] , identifier[String] identifier[value] operator[SEP] {
Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[f... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.EBC__BCDO_NAME:
return getBCdoName();
case AfplibPackage.EBC__TRIPLETS:
return getTriplets();
}
return super.eGet(featureID, resolve, coreType);
} | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=EBC__BCDO_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selecto... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
K... |
@Override
public <M extends Enum<M>> ServiceMilestone.Recommendation evaluate(Class<M> type, String name, DataBinder binder, Reifier dict, Persistence persist) {
if (first.evaluate(type, name, binder, dict, persist) == ServiceMilestone.Recommendation.CONTINUE) {
return second.evaluate(type, name... | class class_name[name] begin[{]
method[evaluate, return_type[type[ServiceMilestone]], modifier[public], parameter[type, name, binder, dict, persist]] begin[{]
if[binary_operation[call[first.evaluate, parameter[member[.type], member[.name], member[.binder], member[.dict], member[.persist]]], ==,... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[M] Keyword[extends] identifier[Enum] operator[<] identifier[M] operator[>] operator[>] identifier[ServiceMilestone] operator[SEP] identifier[Recommendation] identifier[evaluate] operator[SEP] identifier[Class] operator[<] identifier[M] operator[>... |
public void setChaincodeName(String chaincodeName) throws InvalidArgumentException {
if (Utils.isNullOrEmpty(chaincodeName)) {
throw new InvalidArgumentException("The chaincodeName parameter can not be null or empty.");
}
this.chaincodeName = chaincodeName;
} | class class_name[name] begin[{]
method[setChaincodeName, return_type[void], modifier[public], parameter[chaincodeName]] begin[{]
if[call[Utils.isNullOrEmpty, parameter[member[.chaincodeName]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], ... | Keyword[public] Keyword[void] identifier[setChaincodeName] operator[SEP] identifier[String] identifier[chaincodeName] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] {
Keyword[if] operator[SEP] identifier[Utils] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[chaincodeName] op... |
private String escapeSockJsSpecialChars(char[] characters) {
StringBuilder result = new StringBuilder();
for (char c : characters) {
if (isSockJsSpecialChar(c)) {
result.append('\\').append('u');
String hex = Integer.toHexString(c).toLowerCase();
... | class class_name[name] begin[{]
method[escapeSockJsSpecialChars, return_type[type[String]], modifier[private], parameter[characters]] begin[{]
local_variable[type[StringBuilder], result]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[M... | Keyword[private] identifier[String] identifier[escapeSockJsSpecialChars] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[characters] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword... |
public JvmIdentifiableElement getVisibleType(JvmMember context, String name) {
if (context == null)
return null;
Map<String, JvmIdentifiableElement> map = visibleElements.get(context);
if (map == null) {
map = create(context);
}
return map.get(name);
} | class class_name[name] begin[{]
method[getVisibleType, return_type[type[JvmIdentifiableElement]], modifier[public], parameter[context, name]] begin[{]
if[binary_operation[member[.context], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local... | Keyword[public] identifier[JvmIdentifiableElement] identifier[getVisibleType] operator[SEP] identifier[JvmMember] identifier[context] , identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SE... |
public CertificateOperation getCertificateOperation(String vaultBaseUrl, String certificateName) {
return getCertificateOperationWithServiceResponseAsync(vaultBaseUrl, certificateName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getCertificateOperation, return_type[type[CertificateOperation]], modifier[public], parameter[vaultBaseUrl, certificateName]] begin[{]
return[call[.getCertificateOperationWithServiceResponseAsync, parameter[member[.vaultBaseUrl], member[.certificateName]]]]
en... | Keyword[public] identifier[CertificateOperation] identifier[getCertificateOperation] operator[SEP] identifier[String] identifier[vaultBaseUrl] , identifier[String] identifier[certificateName] operator[SEP] {
Keyword[return] identifier[getCertificateOperationWithServiceResponseAsync] operator[SEP] identifier[vau... |
public static <K, V, M extends Map<K, V>> M merge(Stream<? extends Map<K, V>> stream,
BinaryOperator<V> mergeFunction,
Supplier<M> mapSupplier) {
Assert.notNull(stream, "Missing map merge function!");
Assert.notNu... | class class_name[name] begin[{]
method[merge, return_type[type[M]], modifier[public static], parameter[stream, mergeFunction, mapSupplier]] begin[{]
call[Assert.notNull, parameter[member[.stream], literal["Missing map merge function!"]]]
call[Assert.notNull, parameter[member[.me... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] , identifier[M] Keyword[extends] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[M] identifier[merge] operator[SEP] identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[Map] operat... |
public void setToState(State state, @FloatRange(from = 0f, to = 1f) float position) {
if (position <= 0) {
throw new IllegalArgumentException("'To' position cannot be <= 0");
}
if (position > 1f) {
throw new IllegalArgumentException("'To' position cannot be > 1");
... | class class_name[name] begin[{]
method[setToState, return_type[void], modifier[public], parameter[state, position]] begin[{]
if[binary_operation[member[.position], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operat... | Keyword[public] Keyword[void] identifier[setToState] operator[SEP] identifier[State] identifier[state] , annotation[@] identifier[FloatRange] operator[SEP] identifier[from] operator[=] literal[Float] , identifier[to] operator[=] literal[Float] operator[SEP] Keyword[float] identifier[position] operator[SEP] {
K... |
public Observable<ElasticPoolInner> updateAsync(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) {
return updateWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters).map(new Func1<ServiceResponse<ElasticPoolInner>, ElasticPoolInner... | class class_name[name] begin[{]
method[updateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, elasticPoolName, parameters]] begin[{]
return[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.elasticPoo... | Keyword[public] identifier[Observable] operator[<] identifier[ElasticPoolInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[elasticPoolName] , identifier[ElasticPoolUpdate] identifier[pa... |
public static boolean onBeforeBlocking() {
BooleanSupplier f = onBeforeBlocking;
if (f != null) {
try {
return f.getAsBoolean();
} catch (Throwable ex) {
throw ExceptionHelper.wrapOrThrow(ex);
}
}
return false;
} | class class_name[name] begin[{]
method[onBeforeBlocking, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
local_variable[type[BooleanSupplier], f]
if[binary_operation[member[.f], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expre... | Keyword[public] Keyword[static] Keyword[boolean] identifier[onBeforeBlocking] operator[SEP] operator[SEP] {
identifier[BooleanSupplier] identifier[f] operator[=] identifier[onBeforeBlocking] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
... |
public void doClearExampleQueries(String unused)
{
for (Long corpusId : corpusList)
{
System.out.println("delete example queries for " + corpusId);
queriesGenerator.delExampleQueries(corpusId);
}
} | class class_name[name] begin[{]
method[doClearExampleQueries, return_type[void], modifier[public], parameter[unused]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[doClearExampleQueries] operator[SEP] identifier[String] identifier[unused] operator[SEP] {
Keyword[for] operator[SEP] identifier[Long] identifier[corpusId] operator[:] identifier[corpusList] operator[SEP] {
identifier[System] operator[SEP] identifier[out] oper... |
public static SpecificErrorCondition getSpecificErrorCondition(StanzaError error) {
// This method is implemented to provide an easy way of getting a packet
// extension of the XMPPError.
for (SpecificErrorCondition condition : SpecificErrorCondition.values()) {
if (error.getExtensio... | class class_name[name] begin[{]
method[getSpecificErrorCondition, return_type[type[SpecificErrorCondition]], modifier[public static], parameter[error]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvo... | Keyword[public] Keyword[static] identifier[SpecificErrorCondition] identifier[getSpecificErrorCondition] operator[SEP] identifier[StanzaError] identifier[error] operator[SEP] {
Keyword[for] operator[SEP] identifier[SpecificErrorCondition] identifier[condition] operator[:] identifier[SpecificErrorCondition] oper... |
public static MtasDataCollector<?, ?> getCollector(String collectorType,
String dataType, String statsType, SortedSet<String> statsItems,
String sortType, String sortDirection, Integer start, Integer number,
String[] subCollectorTypes, String[] subDataTypes, String[] subStatsTypes,
SortedSet<Str... | class class_name[name] begin[{]
method[getCollector, return_type[type[MtasDataCollector]], modifier[public static], parameter[collectorType, dataType, statsType, statsItems, sortType, sortDirection, start, number, subCollectorTypes, subDataTypes, subStatsTypes, subStatsItems, subSortTypes, subSortDirections, s... | Keyword[public] Keyword[static] identifier[MtasDataCollector] operator[<] operator[?] , operator[?] operator[>] identifier[getCollector] operator[SEP] identifier[String] identifier[collectorType] , identifier[String] identifier[dataType] , identifier[String] identifier[statsType] , identifier[SortedSet] operator[<]... |
public PutObjectResponse putObject(String bucketName, String key, String value) {
try {
return this.putObject(bucketName, key, value.getBytes(DEFAULT_ENCODING), new ObjectMetadata());
} catch (UnsupportedEncodingException e) {
throw new BceClientException("Fail to get bytes.", e)... | class class_name[name] begin[{]
method[putObject, return_type[type[PutObjectResponse]], modifier[public], parameter[bucketName, key, value]] begin[{]
TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Mem... | Keyword[public] identifier[PutObjectResponse] identifier[putObject] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
Keyword[try] {
Keyword[return] Keyword[this] operator[SEP] identifier[putObject] ope... |
public SparseDoubleVector generateContext(DependencyTreeNode[] tree,
int focusIndex) {
DependencyTreeNode focusNode = tree[focusIndex];
SparseDoubleVector meaning = new CompactSparseVector(indexVectorLength);
Iterator<DependencyPath> paths = new Fi... | class class_name[name] begin[{]
method[generateContext, return_type[type[SparseDoubleVector]], modifier[public], parameter[tree, focusIndex]] begin[{]
local_variable[type[DependencyTreeNode], focusNode]
local_variable[type[SparseDoubleVector], meaning]
local_variable[type[Iterator], pat... | Keyword[public] identifier[SparseDoubleVector] identifier[generateContext] operator[SEP] identifier[DependencyTreeNode] operator[SEP] operator[SEP] identifier[tree] , Keyword[int] identifier[focusIndex] operator[SEP] {
identifier[DependencyTreeNode] identifier[focusNode] operator[=] identifier[tree] operator[SE... |
@Override
public RuntimeEventListener register(Controllable controllable, ControllableType type)
throws AlreadyRegisteredException, SIBExceptionInvalidValue {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "register", new Object[] { controlla... | class class_name[name] begin[{]
method[register, return_type[type[RuntimeEventListener]], modifier[public], parameter[controllable, type]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Sib... | annotation[@] identifier[Override] Keyword[public] identifier[RuntimeEventListener] identifier[register] operator[SEP] identifier[Controllable] identifier[controllable] , identifier[ControllableType] identifier[type] operator[SEP] Keyword[throws] identifier[AlreadyRegisteredException] , identifier[SIBExceptionInvalid... |
public java.util.List<KeyListEntry> getKeys() {
if (keys == null) {
keys = new com.ibm.cloud.objectstorage.internal.SdkInternalList<KeyListEntry>();
}
return keys;
} | class class_name[name] begin[{]
method[getKeys, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.keys], ==, literal[null]]] begin[{]
assign[member[.keys], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, p... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[KeyListEntry] operator[>] identifier[getKeys] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[keys] operator[==] Other[null] operator[SEP] {
identifier[keys] operato... |
public static <T, X extends Throwable> Tuple3<CompletableFuture<Subscription>, Runnable, CompletableFuture<Boolean>> forEachX(
final FutureStream<T> stream, final long x, final Consumer<? super T> consumerElement) {
final CompletableFuture<Subscription> subscription = new CompletableFuture<>();
... | class class_name[name] begin[{]
method[forEachX, return_type[type[Tuple3]], modifier[public static], parameter[stream, x, consumerElement]] begin[{]
local_variable[type[CompletableFuture], subscription]
local_variable[type[CompletableFuture], streamCompleted]
return[call[.tuple, paramet... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[X] Keyword[extends] identifier[Throwable] operator[>] identifier[Tuple3] operator[<] identifier[CompletableFuture] operator[<] identifier[Subscription] operator[>] , identifier[Runnable] , identifier[CompletableFuture] operator[<] identifier[Bool... |
@Override
public CreateScriptResult createScript(CreateScriptRequest request) {
request = beforeClientExecution(request);
return executeCreateScript(request);
} | class class_name[name] begin[{]
method[createScript, return_type[type[CreateScriptResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateScript, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[CreateScriptResult] identifier[createScript] operator[SEP] identifier[CreateScriptRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S... |
public void addOauth(Oauth oauth) {
StringBuilder builder;
builder = new StringBuilder();
arg(builder, "OAuth oauth_nonce", UUID.randomUUID().toString());
arg(builder, "oauth_token", oauth.tokenId);
arg(builder, "oauth_consumer_key", oauth.consumerKey);
arg(builder, "oau... | class class_name[name] begin[{]
method[addOauth, return_type[void], modifier[public], parameter[oauth]] begin[{]
local_variable[type[StringBuilder], builder]
assign[member[.builder], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[void] identifier[addOauth] operator[SEP] identifier[Oauth] identifier[oauth] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[SEP] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[arg] operato... |
public static Rational getDefaultTimeBase() {
long cPtr = VideoJNI.Global_getDefaultTimeBase();
return (cPtr == 0) ? null : new Rational(cPtr, false);
} | class class_name[name] begin[{]
method[getDefaultTimeBase, return_type[type[Rational]], modifier[public static], parameter[]] begin[{]
local_variable[type[long], cPtr]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cPtr, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] identifier[Rational] identifier[getDefaultTimeBase] operator[SEP] operator[SEP] {
Keyword[long] identifier[cPtr] operator[=] identifier[VideoJNI] operator[SEP] identifier[Global_getDefaultTimeBase] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[... |
public <T> T get(final Class<T> type, final Consumer<HttpConfig> configuration) {
return type.cast(interceptors.get(HttpVerb.GET).apply(configureRequest(type, HttpVerb.GET, configuration), this::doGet));
} | class class_name[name] begin[{]
method[get, return_type[type[T]], modifier[public], parameter[type, configuration]] begin[{]
return[call[type.cast, parameter[call[interceptors.get, parameter[member[HttpVerb.GET]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Consumer] operator[<] identifier[HttpConfig] operator[>] identifier[configuration] operator[SEP] {
... |
public Observable<ServiceResponse<WorkflowRunActionRepetitionDefinitionCollectionInner>> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.cli... | class class_name[name] begin[{]
method[listWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workflowName, runName, actionName]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[WorkflowRunActionRepetitionDefinitionCollectionInner] operator[>] operator[>] identifier[listWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[wor... |
@SuppressWarnings("unused")
@Internal
@UsedByGeneratedCode
protected final AbstractBeanDefinition<T> addExecutableMethod(ExecutableMethod<T, ?> executableMethod) {
MethodKey key = new MethodKey(executableMethod.getMethodName(), executableMethod.getArgumentTypes());
executableMethodMap.put(ke... | class class_name[name] begin[{]
method[addExecutableMethod, return_type[type[AbstractBeanDefinition]], modifier[final protected], parameter[executableMethod]] begin[{]
local_variable[type[MethodKey], key]
call[executableMethodMap.put, parameter[member[.key], member[.executableMethod]]]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Internal] annotation[@] identifier[UsedByGeneratedCode] Keyword[protected] Keyword[final] identifier[AbstractBeanDefinition] operator[<] identifier[T] operator[>] identifier[addExecutableMethod] operator[SEP]... |
public <EXTYPE extends Exception> void writeLockedThrowing (@Nonnull final IThrowingRunnable <EXTYPE> aRunnable) throws EXTYPE
{
writeLock ().lock ();
try
{
aRunnable.run ();
}
finally
{
writeLock ().unlock ();
}
} | class class_name[name] begin[{]
method[writeLockedThrowing, return_type[void], modifier[public], parameter[aRunnable]] begin[{]
call[.writeLock, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=run, postfix_operators=[], prefix_operat... | Keyword[public] operator[<] identifier[EXTYPE] Keyword[extends] identifier[Exception] operator[>] Keyword[void] identifier[writeLockedThrowing] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IThrowingRunnable] operator[<] identifier[EXTYPE] operator[>] identifier[aRunnable] operator[SEP] Keyw... |
private void invokeSessionSynchMethod(Method method, Object[] parameters)
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isDebugEnabled())
{
StringBuilder traceMsg = new StringBuilder("invoking session synchronization method : ");
... | class class_name[name] begin[{]
method[invokeSessionSynchMethod, return_type[void], modifier[private], parameter[method, parameters]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
... | Keyword[private] Keyword[void] identifier[invokeSessionSynchMethod] operator[SEP] identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SE... |
String showScriptContextHTML( String s, int lineNo, int context )
{
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader( new StringReader(s) );
int beginLine = Math.max( 1, lineNo-context );
int endLine = lineNo + context;
for( int i=1; i<=lineNo+c... | class class_name[name] begin[{]
method[showScriptContextHTML, return_type[type[String]], modifier[default], parameter[s, lineNo, context]] begin[{]
local_variable[type[StringBuilder], sb]
local_variable[type[BufferedReader], br]
local_variable[type[int], beginLine]
local_variabl... | identifier[String] identifier[showScriptContextHTML] operator[SEP] identifier[String] identifier[s] , Keyword[int] identifier[lineNo] , Keyword[int] identifier[context] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operat... |
public long addBoxObstacle(float[] bmin, float[] bmax) {
TileCacheObstacle ob = allocObstacle();
ob.type = TileCacheObstacleType.BOX;
vCopy(ob.bmin, bmin);
vCopy(ob.bmax, bmax);
return addObstacleRequest(ob).ref;
} | class class_name[name] begin[{]
method[addBoxObstacle, return_type[type[long]], modifier[public], parameter[bmin, bmax]] begin[{]
local_variable[type[TileCacheObstacle], ob]
assign[member[ob.type], member[TileCacheObstacleType.BOX]]
call[.vCopy, parameter[member[ob.bmin]... | Keyword[public] Keyword[long] identifier[addBoxObstacle] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[bmin] , Keyword[float] operator[SEP] operator[SEP] identifier[bmax] operator[SEP] {
identifier[TileCacheObstacle] identifier[ob] operator[=] identifier[allocObstacle] operator[SEP] operat... |
public static Field getField(final Class<?> cls, final String fieldName) {
final Field field = getField(cls, fieldName, false);
MemberUtils.setAccessibleWorkaround(field);
return field;
} | class class_name[name] begin[{]
method[getField, return_type[type[Field]], modifier[public static], parameter[cls, fieldName]] begin[{]
local_variable[type[Field], field]
call[MemberUtils.setAccessibleWorkaround, parameter[member[.field]]]
return[member[.field]]
end[}]
END[}... | Keyword[public] Keyword[static] identifier[Field] identifier[getField] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] , Keyword[final] identifier[String] identifier[fieldName] operator[SEP] {
Keyword[final] identifier[Field] identifier[field] operator[=] ident... |
protected String replaceSimpleGroupNameVariables(String str, List<String> groupNames,
List<String> groupValues, boolean debugPrint) {
String result = str;
int length = Math.min(groupNames.size(), groupValues.size());
for (int i=0; i < length; i++) {
if (groupNames != nul... | class class_name[name] begin[{]
method[replaceSimpleGroupNameVariables, return_type[type[String]], modifier[protected], parameter[str, groupNames, groupValues, debugPrint]] begin[{]
local_variable[type[String], result]
local_variable[type[int], length]
ForStatement(body=BlockStatement(l... | Keyword[protected] identifier[String] identifier[replaceSimpleGroupNameVariables] operator[SEP] identifier[String] identifier[str] , identifier[List] operator[<] identifier[String] operator[>] identifier[groupNames] , identifier[List] operator[<] identifier[String] operator[>] identifier[groupValues] , Keyword[boole... |
public Extractor getExtractor() {
try {
this.rawSourceExtractor = getSource().getExtractor(this.taskState);
boolean throttlingEnabled = this.taskState.getPropAsBoolean(ConfigurationKeys.EXTRACT_LIMIT_ENABLED_KEY,
ConfigurationKeys.DEFAULT_EXTRACT_LIMIT_ENABLED);
if (throttlingEnabled) {
... | class class_name[name] begin[{]
method[getExtractor, return_type[type[Extractor]], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rawSourc... | Keyword[public] identifier[Extractor] identifier[getExtractor] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[rawSourceExtractor] operator[=] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] identifier[getExtractor] operator[SEP] Keyword[this] operat... |
public static JsonNode toNode(String value, ObjectMapper mapper) {
try {
return mapper.readTree(value);
} catch (IOException ex) {
throw new FacebookException(ex);
}
} | class class_name[name] begin[{]
method[toNode, return_type[type[JsonNode]], modifier[public static], parameter[value, mapper]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[static] identifier[JsonNode] identifier[toNode] operator[SEP] identifier[String] identifier[value] , identifier[ObjectMapper] identifier[mapper] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[mapper] operator[SEP] identifier[readTree] operator[SEP] identifier[value]... |
public static final Class<?> resolve(Class<?> genericType) {
assertNotNull(genericType);
try {
Class<?> entityType = HttpEntity.class.isAssignableFrom(genericType)? HttpEntity.class :
(byte[].class.isAssignableFrom(genericType)
|| Byte[].class.isAssignableFrom(genericType... | class class_name[name] begin[{]
method[resolve, return_type[type[Class]], modifier[final public static], parameter[genericType]] begin[{]
call[.assertNotNull, parameter[member[.genericType]]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(di... | Keyword[public] Keyword[static] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[resolve] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[genericType] operator[SEP] {
identifier[assertNotNull] operator[SEP] identifier[genericType] operator[SEP] operat... |
public static void addJarToClasspath(ClassLoader loader, URL url) throws IOException,
IllegalAccessException, IllegalArgumentException, InvocationTargetException,
NoSuchMethodException, SecurityException {
URLClassLoader sysloader = (URLClassLoader) loader;
Class<?> sysclass = URLClassLoader.class;
... | class class_name[name] begin[{]
method[addJarToClasspath, return_type[void], modifier[public static], parameter[loader, url]] begin[{]
local_variable[type[URLClassLoader], sysloader]
local_variable[type[Class], sysclass]
local_variable[type[Method], method]
call[method.s... | Keyword[public] Keyword[static] Keyword[void] identifier[addJarToClasspath] operator[SEP] identifier[ClassLoader] identifier[loader] , identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] , identifier[IllegalAccessException] , identifier[IllegalArgumentException] , identifier[Invoca... |
public void setUnprocessedTraceIds(java.util.Collection<String> unprocessedTraceIds) {
if (unprocessedTraceIds == null) {
this.unprocessedTraceIds = null;
return;
}
this.unprocessedTraceIds = new java.util.ArrayList<String>(unprocessedTraceIds);
} | class class_name[name] begin[{]
method[setUnprocessedTraceIds, return_type[void], modifier[public], parameter[unprocessedTraceIds]] begin[{]
if[binary_operation[member[.unprocessedTraceIds], ==, literal[null]]] begin[{]
assign[THIS[member[None.unprocessedTraceIds]], lite... | Keyword[public] Keyword[void] identifier[setUnprocessedTraceIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[unprocessedTraceIds] operator[SEP] {
Keyword[if] operator[SEP] identifier[unprocessedTraceIds] ... |
public <V,E extends Throwable> V act(Callable<V,E> callable) throws IOException, InterruptedException, E {
if(channel!=null) {
// run this on a remote system
return channel.call(callable);
} else {
// the file is on the local machine
return callable.call()... | class class_name[name] begin[{]
method[act, return_type[type[V]], modifier[public], parameter[callable]] begin[{]
if[binary_operation[member[.channel], !=, literal[null]]] begin[{]
return[call[channel.call, parameter[member[.callable]]]]
else begin[{]
return[call... | Keyword[public] operator[<] identifier[V] , identifier[E] Keyword[extends] identifier[Throwable] operator[>] identifier[V] identifier[act] operator[SEP] identifier[Callable] operator[<] identifier[V] , identifier[E] operator[>] identifier[callable] operator[SEP] Keyword[throws] identifier[IOException] , identifier[I... |
protected CmsFormRow createRow(I_CmsFormField field) {
return createRow(
field.getLabel(),
field.getDescription(),
(Widget)field.getWidget(),
field.getLayoutData().get("info"),
Boolean.parseBoolean(field.getLayoutData().get("htmlinfo")));
} | class class_name[name] begin[{]
method[createRow, return_type[type[CmsFormRow]], modifier[protected], parameter[field]] begin[{]
return[call[.createRow, parameter[call[field.getLabel, parameter[]], call[field.getDescription, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=getWidget,... | Keyword[protected] identifier[CmsFormRow] identifier[createRow] operator[SEP] identifier[I_CmsFormField] identifier[field] operator[SEP] {
Keyword[return] identifier[createRow] operator[SEP] identifier[field] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] , identifier[field] operator[SEP] identi... |
public static <A, B, M extends Map<A, B>> Codec<M, EnumGene<Integer>>
ofMapping(
final ISeq<? extends A> source,
final ISeq<? extends B> target,
final Supplier<M> mapSupplier
) {
requireNonNull(mapSupplier);
return ofPermutation(target.size())
.map(perm -> toMapping(perm, source, target, mapSupplier));
... | class class_name[name] begin[{]
method[ofMapping, return_type[type[Codec]], modifier[public static], parameter[source, target, mapSupplier]] begin[{]
call[.requireNonNull, parameter[member[.mapSupplier]]]
return[call[.ofPermutation, parameter[call[target.size, parameter[]]]]]
end[}]... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] , identifier[M] Keyword[extends] identifier[Map] operator[<] identifier[A] , identifier[B] operator[>] operator[>] identifier[Codec] operator[<] identifier[M] , identifier[EnumGene] operator[<] identifier[Integer] operator[>] operator[>] iden... |
public Observable<SnapshotInner> getByResourceGroupAsync(String resourceGroupName, String snapshotName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1<ServiceResponse<SnapshotInner>, SnapshotInner>() {
@Override
public SnapshotInner cal... | class class_name[name] begin[{]
method[getByResourceGroupAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, snapshotName]] begin[{]
return[call[.getByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.snapshotName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[SnapshotInner] operator[>] identifier[getByResourceGroupAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[snapshotName] operator[SEP] {
Keyword[return] identifier[getByResourceGroupWithServiceRespon... |
public static void setModel(IRubyObject p, IRubyObject input, IRubyObject model) {
Ruby runtime = p.getRuntime();
Parser parser = (Parser)p.dataGetStructChecked();
parser.handler(new RubyLoadHandler(runtime, ((YAMLExtra)runtime.getModule("YAML").dataGetStruct())));
if(model == runtime.ne... | class class_name[name] begin[{]
method[setModel, return_type[void], modifier[public static], parameter[p, input, model]] begin[{]
local_variable[type[Ruby], runtime]
local_variable[type[Parser], parser]
call[parser.handler, parameter[ClassCreator(arguments=[MemberReference(membe... | Keyword[public] Keyword[static] Keyword[void] identifier[setModel] operator[SEP] identifier[IRubyObject] identifier[p] , identifier[IRubyObject] identifier[input] , identifier[IRubyObject] identifier[model] operator[SEP] {
identifier[Ruby] identifier[runtime] operator[=] identifier[p] operator[SEP] identifier[... |
public static @CheckForNull
ObjectType[] findDeclaredExceptions(InvokeInstruction inv, ConstantPoolGen cpg) {
XMethod method = findInvocationLeastUpperBound(inv, cpg, inv instanceof INVOKESTATIC ? STATIC_METHOD : INSTANCE_METHOD);
if (method == null) {
return null;
}
St... | class class_name[name] begin[{]
method[findDeclaredExceptions, return_type[type[ObjectType]], modifier[public static], parameter[inv, cpg]] begin[{]
local_variable[type[XMethod], method]
if[binary_operation[member[.method], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[public] Keyword[static] annotation[@] identifier[CheckForNull] identifier[ObjectType] operator[SEP] operator[SEP] identifier[findDeclaredExceptions] operator[SEP] identifier[InvokeInstruction] identifier[inv] , identifier[ConstantPoolGen] identifier[cpg] operator[SEP] {
identifier[XMethod] identifier[me... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.