code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static void close(@Nullable Object object) throws IOException {
if (object instanceof Closeable) {
((Closeable) object).close();
}
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public static], parameter[object]] begin[{]
if[binary_operation[member[.object], instanceof, type[Closeable]]] begin[{]
Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_o... | Keyword[public] Keyword[static] Keyword[void] identifier[close] operator[SEP] annotation[@] identifier[Nullable] identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[Closeable] operator[SEP] {
... |
public Object opt(String key) {
return key == null ? null : m_map.get(key);
} | class class_name[name] begin[{]
method[opt, return_type[type[Object]], modifier[public], parameter[key]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operat... | Keyword[public] identifier[Object] identifier[opt] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[return] identifier[key] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[m_map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SE... |
private synchronized void pushRequestContext(ServletContext context,
ServletRequest req,
ServletResponse resp)
{
getRequestStack().push(new RequestContext(context, req, resp));
} | class class_name[name] begin[{]
method[pushRequestContext, return_type[void], modifier[synchronized private], parameter[context, req, resp]] begin[{]
call[.getRequestStack, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[synchronized] Keyword[void] identifier[pushRequestContext] operator[SEP] identifier[ServletContext] identifier[context] , identifier[ServletRequest] identifier[req] , identifier[ServletResponse] identifier[resp] operator[SEP] {
identifier[getRequestStack] operator[SEP] operator[SEP] op... |
private long[] calcBucketOffset(long timestampMs) {
long bucketOffset = toTimeSeriesPoint(timestampMs);
long delta = bucketOffset % (RESOLUTION_MS * BUCKET_SIZE);
long bucketId = bucketOffset - delta;
return new long[] { bucketId, bucketOffset };
} | class class_name[name] begin[{]
method[calcBucketOffset, return_type[type[long]], modifier[private], parameter[timestampMs]] begin[{]
local_variable[type[long], bucketOffset]
local_variable[type[long], delta]
local_variable[type[long], bucketId]
return[ArrayCreator(dimensions=[N... | Keyword[private] Keyword[long] operator[SEP] operator[SEP] identifier[calcBucketOffset] operator[SEP] Keyword[long] identifier[timestampMs] operator[SEP] {
Keyword[long] identifier[bucketOffset] operator[=] identifier[toTimeSeriesPoint] operator[SEP] identifier[timestampMs] operator[SEP] operator[SEP] Keyword[lo... |
public static String randomString(Long numberOfLetters, boolean useNumbers, TestContext context) {
return randomString(numberOfLetters, RandomStringFunction.MIXED, useNumbers, context);
} | class class_name[name] begin[{]
method[randomString, return_type[type[String]], modifier[public static], parameter[numberOfLetters, useNumbers, context]] begin[{]
return[call[.randomString, parameter[member[.numberOfLetters], member[RandomStringFunction.MIXED], member[.useNumbers], member[.context]]]]
... | Keyword[public] Keyword[static] identifier[String] identifier[randomString] operator[SEP] identifier[Long] identifier[numberOfLetters] , Keyword[boolean] identifier[useNumbers] , identifier[TestContext] identifier[context] operator[SEP] {
Keyword[return] identifier[randomString] operator[SEP] identifier[number... |
public void setMinDateLastModified(String minDateLastModified) {
m_parameters.setMinDateLastModified(
CmsStringUtil.getLongValue(minDateLastModified, Long.MIN_VALUE, "minDateLastModified"));
} | class class_name[name] begin[{]
method[setMinDateLastModified, return_type[void], modifier[public], parameter[minDateLastModified]] begin[{]
call[m_parameters.setMinDateLastModified, parameter[call[CmsStringUtil.getLongValue, parameter[member[.minDateLastModified], member[Long.MIN_VALUE], liter... | Keyword[public] Keyword[void] identifier[setMinDateLastModified] operator[SEP] identifier[String] identifier[minDateLastModified] operator[SEP] {
identifier[m_parameters] operator[SEP] identifier[setMinDateLastModified] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[getLongValue] operator[SEP] ... |
public <T> T[] toArrayCached(T[] a) {
T[] readCacheArray = generatedCacheMap.values().toArray(a);
T[] writeCacheArray = resultSetCacheMap.values().toArray(a);
T[] combinedCacheArray = (T[]) java.lang.reflect.Array.
newInstance(a.getClass().getComponentType(), readCacheArray.leng... | class class_name[name] begin[{]
method[toArrayCached, return_type[type[T]], modifier[public], parameter[a]] begin[{]
local_variable[type[T], readCacheArray]
local_variable[type[T], writeCacheArray]
local_variable[type[T], combinedCacheArray]
call[System.arraycopy, parame... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[toArrayCached] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[a] operator[SEP] {
identifier[T] operator[SEP] operator[SEP] identifier[readCacheArray] operator[=] identifier[generatedCach... |
private int restart(final boolean basic, final Destination dst, final int eraseCode,
final int channel) throws KNXTimeoutException, KNXRemoteException, KNXLinkClosedException,
KNXDisconnectException, InterruptedException
{
int time = 0;
if (basic) {
send(dst, priority, DataUnitBuilder.createLengthOptimizedA... | class class_name[name] begin[{]
method[restart, return_type[type[int]], modifier[private], parameter[basic, dst, eraseCode, channel]] begin[{]
local_variable[type[int], time]
if[member[.basic]] begin[{]
call[.send, parameter[member[.dst], member[.priority], call[... | Keyword[private] Keyword[int] identifier[restart] operator[SEP] Keyword[final] Keyword[boolean] identifier[basic] , Keyword[final] identifier[Destination] identifier[dst] , Keyword[final] Keyword[int] identifier[eraseCode] , Keyword[final] Keyword[int] identifier[channel] operator[SEP] Keyword[throws] identifier[KNX... |
public ArrayList<OvhStack> project_serviceName_stack_GET(String serviceName) throws IOException {
String qPath = "/cloud/project/{serviceName}/stack";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t15);
} | class class_name[name] begin[{]
method[project_serviceName_stack_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[call[.conv... | Keyword[public] identifier[ArrayList] operator[<] identifier[OvhStack] operator[>] identifier[project_serviceName_stack_GET] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[S... |
public OvhExchangeExternalContact organizationName_service_exchangeService_externalContact_externalEmailAddress_GET(String organizationName, String exchangeService, String externalEmailAddress) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/externalContact/{externalE... | class class_name[name] begin[{]
method[organizationName_service_exchangeService_externalContact_externalEmailAddress_GET, return_type[type[OvhExchangeExternalContact]], modifier[public], parameter[organizationName, exchangeService, externalEmailAddress]] begin[{]
local_variable[type[String], qPath]
... | Keyword[public] identifier[OvhExchangeExternalContact] identifier[organizationName_service_exchangeService_externalContact_externalEmailAddress_GET] operator[SEP] identifier[String] identifier[organizationName] , identifier[String] identifier[exchangeService] , identifier[String] identifier[externalEmailAddress] oper... |
public void load() throws IOException
{
try
{
Future<Void> task = loadNB();
task.get();
}
catch (ExecutionException e)
{
Throwable t = e.getCause();
if (t instanceof IOException)
{
throw... | class class_name[name] begin[{]
method[load, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=loadNB, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[void] identifier[load] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[Future] operator[<] identifier[Void] operator[>] identifier[task] operator[=] identifier[loadNB] operator[SEP] operator[SEP] operator[SEP] identifier[task] ope... |
final public void saveAsync(final OnSavedCallback callback) {
new AsyncTask<Model, Void, Boolean>() {
protected Boolean doInBackground(Model... params) {
return params[0].save();
}
protected void onPostExecute(Boolean result) {
if (result && callback != null) {
callback.onSaved();
}
}
... | class class_name[name] begin[{]
method[saveAsync, return_type[void], modifier[final public], parameter[callback]] begin[{]
ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MemberReference(member=params, postfix_operators=[], prefix_operators=[]... | Keyword[final] Keyword[public] Keyword[void] identifier[saveAsync] operator[SEP] Keyword[final] identifier[OnSavedCallback] identifier[callback] operator[SEP] {
Keyword[new] identifier[AsyncTask] operator[<] identifier[Model] , identifier[Void] , identifier[Boolean] operator[>] operator[SEP] operator[SEP] {
... |
private void writeReport(final OutputStream outputStream) {
Transformer transformer;
try {
transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(doc), new StreamResult(outputStream));
} catch (Exception e) {
throw WroRuntimeException.wrap(e, "... | class class_name[name] begin[{]
method[writeReport, return_type[void], modifier[private], parameter[outputStream]] begin[{]
local_variable[type[Transformer], transformer]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=transformer, postfix_operat... | Keyword[private] Keyword[void] identifier[writeReport] operator[SEP] Keyword[final] identifier[OutputStream] identifier[outputStream] operator[SEP] {
identifier[Transformer] identifier[transformer] operator[SEP] Keyword[try] {
identifier[transformer] operator[=] identifier[TransformerFactory] operator... |
public BatchGetRepositoriesResult withRepositoriesNotFound(String... repositoriesNotFound) {
if (this.repositoriesNotFound == null) {
setRepositoriesNotFound(new java.util.ArrayList<String>(repositoriesNotFound.length));
}
for (String ele : repositoriesNotFound) {
this.re... | class class_name[name] begin[{]
method[withRepositoriesNotFound, return_type[type[BatchGetRepositoriesResult]], modifier[public], parameter[repositoriesNotFound]] begin[{]
if[binary_operation[THIS[member[None.repositoriesNotFound]], ==, literal[null]]] begin[{]
call[.set... | Keyword[public] identifier[BatchGetRepositoriesResult] identifier[withRepositoriesNotFound] operator[SEP] identifier[String] operator[...] identifier[repositoriesNotFound] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[repositoriesNotFound] operator[==] Other[null] operator[SEP]... |
private TlvHeader readHeader() throws IOException {
int firstByte = in.read();
if (firstByte < 0) {
// no data to read
throw new EOFException();
}
boolean tlv16 = (firstByte & TLV16_FLAG) != 0;
boolean nonCritical = (firstByte & NON_CRITICAL_FLAG) != 0;
... | class class_name[name] begin[{]
method[readHeader, return_type[type[TlvHeader]], modifier[private], parameter[]] begin[{]
local_variable[type[int], firstByte]
if[binary_operation[member[.firstByte], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[]... | Keyword[private] identifier[TlvHeader] identifier[readHeader] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[firstByte] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[firstByte... |
public void registerExistingChecksums(File featureDir, String symbolicName, String fileName) {
ChecksumData checksums = checksumsMap.get(featureDir);
if (checksums == null) {
checksums = new ChecksumData();
checksumsMap.put(featureDir, checksums);
}
checksums.regi... | class class_name[name] begin[{]
method[registerExistingChecksums, return_type[void], modifier[public], parameter[featureDir, symbolicName, fileName]] begin[{]
local_variable[type[ChecksumData], checksums]
if[binary_operation[member[.checksums], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[registerExistingChecksums] operator[SEP] identifier[File] identifier[featureDir] , identifier[String] identifier[symbolicName] , identifier[String] identifier[fileName] operator[SEP] {
identifier[ChecksumData] identifier[checksums] operator[=] identifier[checksumsMap] o... |
@Override
public Group getGroupByPDB(ResidueNumber resNum) throws StructureException {
String pdbresnum = resNum.toString();
if ( pdbResnumMap.containsKey(pdbresnum)) {
Integer pos = pdbResnumMap.get(pdbresnum);
return groups.get(pos);
} else {
throw new StructureException("unknown PDB residue number " ... | class class_name[name] begin[{]
method[getGroupByPDB, return_type[type[Group]], modifier[public], parameter[resNum]] begin[{]
local_variable[type[String], pdbresnum]
if[call[pdbResnumMap.containsKey, parameter[member[.pdbresnum]]]] begin[{]
local_variable[type[Integer], pos]... | annotation[@] identifier[Override] Keyword[public] identifier[Group] identifier[getGroupByPDB] operator[SEP] identifier[ResidueNumber] identifier[resNum] operator[SEP] Keyword[throws] identifier[StructureException] {
identifier[String] identifier[pdbresnum] operator[=] identifier[resNum] operator[SEP] identifier... |
public WhiteSpaceInfo getWhiteSpaceInfo(
XPathContext support, int targetElement, DTM dtm) throws TransformerException
{
if (null != m_whiteSpaceInfoList)
return (WhiteSpaceInfo) m_whiteSpaceInfoList.getTemplate(support,
targetElement, null, false, dtm);
else
return null;
... | class class_name[name] begin[{]
method[getWhiteSpaceInfo, return_type[type[WhiteSpaceInfo]], modifier[public], parameter[support, targetElement, dtm]] begin[{]
if[binary_operation[literal[null], !=, member[.m_whiteSpaceInfoList]]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[Memb... | Keyword[public] identifier[WhiteSpaceInfo] identifier[getWhiteSpaceInfo] operator[SEP] identifier[XPathContext] identifier[support] , Keyword[int] identifier[targetElement] , identifier[DTM] identifier[dtm] operator[SEP] Keyword[throws] identifier[TransformerException] {
Keyword[if] operator[SEP] Other[null] o... |
public List<String> getCustomBundlePropertyAsList(String bundleName, String key) {
List<String> propertiesList = new ArrayList<>();
StringTokenizer tk = new StringTokenizer(getCustomBundleProperty(bundleName, key, ""), ",");
while (tk.hasMoreTokens())
propertiesList.add(tk.nextToken().trim());
return propert... | class class_name[name] begin[{]
method[getCustomBundlePropertyAsList, return_type[type[List]], modifier[public], parameter[bundleName, key]] begin[{]
local_variable[type[List], propertiesList]
local_variable[type[StringTokenizer], tk]
while[call[tk.hasMoreTokens, parameter[]]] b... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getCustomBundlePropertyAsList] operator[SEP] identifier[String] identifier[bundleName] , identifier[String] identifier[key] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[propertiesList... |
public int compareTo(BigDecimal val) {
// Quick path for equal scale and non-inflated case.
if (scale == val.scale) {
long xs = intCompact;
long ys = val.intCompact;
if (xs != INFLATED && ys != INFLATED)
return xs != ys ? ((xs > ys) ? 1 : -1) : 0;
... | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[val]] begin[{]
if[binary_operation[member[.scale], ==, member[val.scale]]] begin[{]
local_variable[type[long], xs]
local_variable[type[long], ys]
... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[BigDecimal] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] identifier[scale] operator[==] identifier[val] operator[SEP] identifier[scale] operator[SEP] {
Keyword[long] identifier[xs] operator[=] identifier[intCompac... |
public void set_value(short[] p_data,int x,int y) throws DevFailed
{
//
// Throw exception if type is not correct
//
if (data_type != Tango_DEV_SHORT &&
data_type != Tango_DEV_USHORT)
{
StringBuffer o = new StringBuffer("Invalid data type for attribute ");
o.append(name);
Except.throw_exception("API_At... | class class_name[name] begin[{]
method[set_value, return_type[void], modifier[public], parameter[p_data, x, y]] begin[{]
if[binary_operation[binary_operation[member[.data_type], !=, member[.Tango_DEV_SHORT]], &&, binary_operation[member[.data_type], !=, member[.Tango_DEV_USHORT]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[set_value] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[p_data] , Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] Keyword[throws] identifier[DevFailed] {
Keyword[if] operator[SEP] identifier[data_type] operator[!=] identifier... |
public Optional<MirroringService> mirroringService() {
if (pluginsForLeaderOnly == null) {
return Optional.empty();
}
return pluginsForLeaderOnly.findFirstPlugin(DefaultMirroringServicePlugin.class)
.map(DefaultMirroringServicePlugin::mirroringServi... | class class_name[name] begin[{]
method[mirroringService, return_type[type[Optional]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.pluginsForLeaderOnly], ==, literal[null]]] begin[{]
return[call[Optional.empty, parameter[]]]
else begin[{]
None
... | Keyword[public] identifier[Optional] operator[<] identifier[MirroringService] operator[>] identifier[mirroringService] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[pluginsForLeaderOnly] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[Optional] operator[SEP] id... |
public Matrix4x3d translationRotateScaleMul(Vector3dc translation, Quaterniondc quat, Vector3dc scale, Matrix4x3dc m) {
return translationRotateScaleMul(translation.x(), translation.y(), translation.z(), quat.x(), quat.y(), quat.z(), quat.w(), scale.x(), scale.y(), scale.z(), m);
} | class class_name[name] begin[{]
method[translationRotateScaleMul, return_type[type[Matrix4x3d]], modifier[public], parameter[translation, quat, scale, m]] begin[{]
return[call[.translationRotateScaleMul, parameter[call[translation.x, parameter[]], call[translation.y, parameter[]], call[translation.z, p... | Keyword[public] identifier[Matrix4x3d] identifier[translationRotateScaleMul] operator[SEP] identifier[Vector3dc] identifier[translation] , identifier[Quaterniondc] identifier[quat] , identifier[Vector3dc] identifier[scale] , identifier[Matrix4x3dc] identifier[m] operator[SEP] {
Keyword[return] identifier[tran... |
public String get(String attributeName) {
// check first for a namespace-less attribute
String attr = attributes.get(new XAttributeName(attributeName, null, null));
if (attr == null) {
// find any attribute ignoring namespace
for (XAttributeName n : attributes.keySet()) {... | class class_name[name] begin[{]
method[get, return_type[type[String]], modifier[public], parameter[attributeName]] begin[{]
local_variable[type[String], attr]
if[binary_operation[member[.attr], ==, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, stateme... | Keyword[public] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[attributeName] operator[SEP] {
identifier[String] identifier[attr] operator[=] identifier[attributes] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[XAttributeName] operator[SEP] identifier[attribu... |
public void centerContent() {
if (stopPartsPositioning) return;
if (!isVisible()) return;
boolean windowHset = false;
int windowH = 0;
int headerH = 0;
int footerH = 0;
int contentH = 0;
int marginTop = 0;
final JQMHeader header = getHeader();
... | class class_name[name] begin[{]
method[centerContent, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.stopPartsPositioning]] begin[{]
return[None]
else begin[{]
None
end[}]
if[call[.isVisible, parameter[]]] begin[{]
return[None]
else... | Keyword[public] Keyword[void] identifier[centerContent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopPartsPositioning] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isVisible] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operat... |
private Triangle insertPointSimple(Set<Vector3> vertices, Vector3 p) {
if (!allCollinear) {
return insertNonColinear(p);
} else {
return insertColinear(vertices, p);
}
} | class class_name[name] begin[{]
method[insertPointSimple, return_type[type[Triangle]], modifier[private], parameter[vertices, p]] begin[{]
if[member[.allCollinear]] begin[{]
return[call[.insertNonColinear, parameter[member[.p]]]]
else begin[{]
return[call[.insert... | Keyword[private] identifier[Triangle] identifier[insertPointSimple] operator[SEP] identifier[Set] operator[<] identifier[Vector3] operator[>] identifier[vertices] , identifier[Vector3] identifier[p] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[allCollinear] operator[SEP] {
Keyword... |
public static Method getSetter(String fieldName, Class<?> clazz, Class<?> fieldType) {
String setterName = buildSetterName(fieldName);
try {
// Using getMathods(), getMathod(...) expects exact parameter type
// matching and ignores inheritance-tree.
Method[] methods = clazz.getMethods();
... | class class_name[name] begin[{]
method[getSetter, return_type[type[Method]], modifier[public static], parameter[fieldName, clazz, fieldType]] begin[{]
local_variable[type[String], setterName]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions... | Keyword[public] Keyword[static] identifier[Method] identifier[getSetter] operator[SEP] identifier[String] identifier[fieldName] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[Class] operator[<] operator[?] operator[>] identifier[fieldType] operator[SEP] {
identifier[Stri... |
public <T> T eval(Object value, T defaultValue) {
T result = null;
if (value instanceof String) {
String expression = (String) value;
if (StringUtils.isNotBlank(expression)) {
expression = expression.replaceAll("@\\{([^\\}]+)\\}", "\\${$1}");
Class... | class class_name[name] begin[{]
method[eval, return_type[type[T]], modifier[public], parameter[value, defaultValue]] begin[{]
local_variable[type[T], result]
if[binary_operation[member[.value], instanceof, type[String]]] begin[{]
local_variable[type[String], expression]
... | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[eval] operator[SEP] identifier[Object] identifier[value] , identifier[T] identifier[defaultValue] operator[SEP] {
identifier[T] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[value] Keyw... |
private ClientResponse getActionClientResponse(
EntityActionOperation entityActionOperation) {
entityActionOperation.setProxyData(createProxyData());
Builder webResource = getResource(entityActionOperation.getUri())
.queryParams(entityActionOperation.getQueryParameters())
... | class class_name[name] begin[{]
method[getActionClientResponse, return_type[type[ClientResponse]], modifier[private], parameter[entityActionOperation]] begin[{]
call[entityActionOperation.setProxyData, parameter[call[.createProxyData, parameter[]]]]
local_variable[type[Builder], webReso... | Keyword[private] identifier[ClientResponse] identifier[getActionClientResponse] operator[SEP] identifier[EntityActionOperation] identifier[entityActionOperation] operator[SEP] {
identifier[entityActionOperation] operator[SEP] identifier[setProxyData] operator[SEP] identifier[createProxyData] operator[SEP] operat... |
static String doHttp( String postURL, String text )
{
String returnValue = null;
StringBuilder sb = new StringBuilder();
sb.append( "bsh.client=Remote" );
sb.append( "&bsh.script=" );
// This requires Java 1.3
try {
sb.append( URLEncoder.encode( text, "UTF... | class class_name[name] begin[{]
method[doHttp, return_type[type[String]], modifier[static], parameter[postURL, text]] begin[{]
local_variable[type[String], returnValue]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["bsh.client=Remote"]]]
... | Keyword[static] identifier[String] identifier[doHttp] operator[SEP] identifier[String] identifier[postURL] , identifier[String] identifier[text] operator[SEP] {
identifier[String] identifier[returnValue] operator[=] Other[null] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] iden... |
protected void writeSummary(TestClassReport testClassReport) throws IOException {
if (isReportMessage(testClassReport)) {
writer.append("[IMPORTANT]").append(NEW_LINE);
writer.append("====").append(NEW_LINE);
writer.append(testClassReport.getReportMessage()).append(NEW_LINE... | class class_name[name] begin[{]
method[writeSummary, return_type[void], modifier[protected], parameter[testClassReport]] begin[{]
if[call[.isReportMessage, parameter[member[.testClassReport]]]] begin[{]
call[writer.append, parameter[literal["[IMPORTANT]"]]]
... | Keyword[protected] Keyword[void] identifier[writeSummary] operator[SEP] identifier[TestClassReport] identifier[testClassReport] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[isReportMessage] operator[SEP] identifier[testClassReport] operator[SEP] operator[SEP] {
... |
private Map<String, DependencyInfo> removeMungedSymbols(
Map<String, DependencyInfo> depFiles, Map<String, DependencyInfo> jsFiles) {
Map<String, DependencyInfo> newJsFiles = new LinkedHashMap<>();
Map<String, DependencyInfo> providesMap = new LinkedHashMap<>();
addToProvideMap(depFiles.values(), prov... | class class_name[name] begin[{]
method[removeMungedSymbols, return_type[type[Map]], modifier[private], parameter[depFiles, jsFiles]] begin[{]
local_variable[type[Map], newJsFiles]
local_variable[type[Map], providesMap]
call[.addToProvideMap, parameter[call[depFiles.values, param... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[DependencyInfo] operator[>] identifier[removeMungedSymbols] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[DependencyInfo] operator[>] identifier[depFiles] , identifier[Map] operator[<] identifier[String] , ident... |
public ImageView addNewImageView(float pScale_Left, float pScale_Top, float pScale_Width, float pScale_Height) {
return addNewImageView((Drawable)null, pScale_Left, pScale_Top, pScale_Width, pScale_Height, false);
} | class class_name[name] begin[{]
method[addNewImageView, return_type[type[ImageView]], modifier[public], parameter[pScale_Left, pScale_Top, pScale_Width, pScale_Height]] begin[{]
return[call[.addNewImageView, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, se... | Keyword[public] identifier[ImageView] identifier[addNewImageView] operator[SEP] Keyword[float] identifier[pScale_Left] , Keyword[float] identifier[pScale_Top] , Keyword[float] identifier[pScale_Width] , Keyword[float] identifier[pScale_Height] operator[SEP] {
Keyword[return] identifier[addNewImageView] operat... |
protected void activate(ComponentContext ctxt) {
this.bundle = ctxt.getUsingBundle();
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(this, tc, "Activating for bundle " + this.bundle);
}
this.localServlets = new HashSet<Servlet>();
this.l... | class class_name[name] begin[{]
method[activate, return_type[void], modifier[protected], parameter[ctxt]] begin[{]
assign[THIS[member[None.bundle]], call[ctxt.getUsingBundle, parameter[]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isE... | Keyword[protected] Keyword[void] identifier[activate] operator[SEP] identifier[ComponentContext] identifier[ctxt] operator[SEP] {
Keyword[this] operator[SEP] identifier[bundle] operator[=] identifier[ctxt] operator[SEP] identifier[getUsingBundle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP... |
private JsfFaceletDescriptor findJsfTemplateDescriptor(String templateFqn, String path, ScannerContext context) {
String includedFile = absolutifyFilePath(path, templateFqn);
return getJsfTemplateDescriptor(includedFile, context);
} | class class_name[name] begin[{]
method[findJsfTemplateDescriptor, return_type[type[JsfFaceletDescriptor]], modifier[private], parameter[templateFqn, path, context]] begin[{]
local_variable[type[String], includedFile]
return[call[.getJsfTemplateDescriptor, parameter[member[.includedFile], member... | Keyword[private] identifier[JsfFaceletDescriptor] identifier[findJsfTemplateDescriptor] operator[SEP] identifier[String] identifier[templateFqn] , identifier[String] identifier[path] , identifier[ScannerContext] identifier[context] operator[SEP] {
identifier[String] identifier[includedFile] operator[=] identif... |
@Nonnull
public Section addCodeSection(@Nullable Component component, @Nonnull Format format, @Nonnull String content) {
return addSection(component, "Code", format, content);
} | class class_name[name] begin[{]
method[addCodeSection, return_type[type[Section]], modifier[public], parameter[component, format, content]] begin[{]
return[call[.addSection, parameter[member[.component], literal["Code"], member[.format], member[.content]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] identifier[Section] identifier[addCodeSection] operator[SEP] annotation[@] identifier[Nullable] identifier[Component] identifier[component] , annotation[@] identifier[Nonnull] identifier[Format] identifier[format] , annotation[@] identifier[Nonnull] identifier[String]... |
public UserNotification getUserNotificationById(
Long userNotificationPkParam)
{
UserNotification userNoti = new UserNotification();
userNoti.setId(userNotificationPkParam);
if(this.serviceTicket != null)
{
userNoti.setServiceTicket(this.serviceTicket);
}
try {
return new UserNotification(this.p... | class class_name[name] begin[{]
method[getUserNotificationById, return_type[type[UserNotification]], modifier[public], parameter[userNotificationPkParam]] begin[{]
local_variable[type[UserNotification], userNoti]
call[userNoti.setId, parameter[member[.userNotificationPkParam]]]
... | Keyword[public] identifier[UserNotification] identifier[getUserNotificationById] operator[SEP] identifier[Long] identifier[userNotificationPkParam] operator[SEP] {
identifier[UserNotification] identifier[userNoti] operator[=] Keyword[new] identifier[UserNotification] operator[SEP] operator[SEP] operator[SEP] ide... |
public static <T> T notNullNotEquals (final T aValue,
@Nonnull final Supplier <? extends String> aName,
@Nonnull final T aUnexpectedValue)
{
notNull (aValue, aName);
notNull (aUnexpectedValue, "UnexpectedValue");
if (isEnabled... | class class_name[name] begin[{]
method[notNullNotEquals, return_type[type[T]], modifier[public static], parameter[aValue, aName, aUnexpectedValue]] begin[{]
call[.notNull, parameter[member[.aValue], member[.aName]]]
call[.notNull, parameter[member[.aUnexpectedValue], literal["Un... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[notNullNotEquals] operator[SEP] Keyword[final] identifier[T] identifier[aValue] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Supplier] operator[<] operator[?] Keyword[extends] identifier[String] operator[>] ... |
public static <A, B, C, D, E> Choice5<A, B, C, D, E> b(B b) {
return new _B<>(b);
} | class class_name[name] begin[{]
method[b, return_type[type[Choice5]], modifier[public static], parameter[b]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_opera... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] , identifier[C] , identifier[D] , identifier[E] operator[>] identifier[Choice5] operator[<] identifier[A] , identifier[B] , identifier[C] , identifier[D] , identifier[E] operator[>] identifier[b] operator[SEP] identifier[B] identifier[b] ... |
public void setSparseComponent(int component, int[] indices, double[] values) {
if (component >= pointers.length) {
increaseSizeTo(component + 1);
}
assert (indices.length == values.length);
if (indices.length == 0) {
pointers[component] = new double[2];
sparse[component] = true;
... | class class_name[name] begin[{]
method[setSparseComponent, return_type[void], modifier[public], parameter[component, indices, values]] begin[{]
if[binary_operation[member[.component], >=, member[pointers.length]]] begin[{]
call[.increaseSizeTo, parameter[binary_operation... | Keyword[public] Keyword[void] identifier[setSparseComponent] operator[SEP] Keyword[int] identifier[component] , Keyword[int] operator[SEP] operator[SEP] identifier[indices] , Keyword[double] operator[SEP] operator[SEP] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] identifier[component] operator[... |
protected void resumeFaxJob(HylaFaxJob faxJob,HylaFAXClient client) throws Exception
{
//get job
Job job=faxJob.getHylaFaxJob();
//get job ID
long faxJobID=job.getId();
//resume job
client.retry(faxJobID);
} | class class_name[name] begin[{]
method[resumeFaxJob, return_type[void], modifier[protected], parameter[faxJob, client]] begin[{]
local_variable[type[Job], job]
local_variable[type[long], faxJobID]
call[client.retry, parameter[member[.faxJobID]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[resumeFaxJob] operator[SEP] identifier[HylaFaxJob] identifier[faxJob] , identifier[HylaFAXClient] identifier[client] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Job] identifier[job] operator[=] identifier[faxJob] operator[SEP] identifier[getHylaFa... |
public void updateLastSeenUniqueIds(VoltMessage message)
{
long sequenceWithUniqueId = Long.MIN_VALUE;
boolean commandLog = (message instanceof TransactionInfoBaseMessage &&
(((TransactionInfoBaseMessage)message).isForReplay()));
boolean sentinel = message instanceof MultiP... | class class_name[name] begin[{]
method[updateLastSeenUniqueIds, return_type[void], modifier[public], parameter[message]] begin[{]
local_variable[type[long], sequenceWithUniqueId]
local_variable[type[boolean], commandLog]
local_variable[type[boolean], sentinel]
if[binary_... | Keyword[public] Keyword[void] identifier[updateLastSeenUniqueIds] operator[SEP] identifier[VoltMessage] identifier[message] operator[SEP] {
Keyword[long] identifier[sequenceWithUniqueId] operator[=] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[SEP] Keyword[boolean] identifier[commandLog] operato... |
public static <T> void invoke(String expression,
QueryExprInvoker<T> invoker,
ExprApplier<T> exprApplier) {
QueryExprInvoker.invoke(parse(expression), invoker, exprApplier);
} | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public static], parameter[expression, invoker, exprApplier]] begin[{]
call[QueryExprInvoker.invoke, parameter[call[.parse, parameter[member[.expression]]], member[.invoker], member[.exprApplier]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[invoke] operator[SEP] identifier[String] identifier[expression] , identifier[QueryExprInvoker] operator[<] identifier[T] operator[>] identifier[invoker] , identifier[ExprApplier] operator[<] identifier[T] operator[>] identi... |
@Override
public ORecordIteratorClusters<REC> last() {
currentClusterIdx = clusterIds.length - 1;
current.clusterPosition = liveUpdated ? database.countClusterElements(clusterIds[currentClusterIdx]) : lastClusterPosition + 1;
return this;
} | class class_name[name] begin[{]
method[last, return_type[type[ORecordIteratorClusters]], modifier[public], parameter[]] begin[{]
assign[member[.currentClusterIdx], binary_operation[member[clusterIds.length], -, literal[1]]]
assign[member[current.clusterPosition], TernaryExpressi... | annotation[@] identifier[Override] Keyword[public] identifier[ORecordIteratorClusters] operator[<] identifier[REC] operator[>] identifier[last] operator[SEP] operator[SEP] {
identifier[currentClusterIdx] operator[=] identifier[clusterIds] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identi... |
public static int getIsolationLevel(Object obj)
{
Class c = ProxyHelper.getRealClass(obj);
int isolationLevel = IsolationLevels.IL_READ_UNCOMMITTED;
try
{
ClassDescriptor cld = TxManagerFactory.instance().getCurrentTransaction().getBroker().getClassDescriptor(c);
... | class class_name[name] begin[{]
method[getIsolationLevel, return_type[type[int]], modifier[public static], parameter[obj]] begin[{]
local_variable[type[Class], c]
local_variable[type[int], isolationLevel]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Variable... | Keyword[public] Keyword[static] Keyword[int] identifier[getIsolationLevel] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
identifier[Class] identifier[c] operator[=] identifier[ProxyHelper] operator[SEP] identifier[getRealClass] operator[SEP] identifier[obj] operator[SEP] operator[SEP] Keyword[... |
private List<AssignmentField> getAllAssignmentExtendedAttributes()
{
ArrayList<AssignmentField> result = new ArrayList<AssignmentField>();
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_COST));
result.addAll(Arrays.asList(AssignmentFieldLists.CUSTOM_DATE));
result.addAll(Arrays.asLis... | class class_name[name] begin[{]
method[getAllAssignmentExtendedAttributes, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[ArrayList], result]
call[result.addAll, parameter[call[Arrays.asList, parameter[member[AssignmentFieldLists.CUSTOM_COST]]]]]
... | Keyword[private] identifier[List] operator[<] identifier[AssignmentField] operator[>] identifier[getAllAssignmentExtendedAttributes] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[AssignmentField] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<... |
public Stream<T> orderedNodes() {
TopoSorter<T> sorter = new TopoSorter<>(this);
return sorter.result.stream();
} | class class_name[name] begin[{]
method[orderedNodes, return_type[type[Stream]], modifier[public], parameter[]] begin[{]
local_variable[type[TopoSorter], sorter]
return[call[sorter.result.stream, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Stream] operator[<] identifier[T] operator[>] identifier[orderedNodes] operator[SEP] operator[SEP] {
identifier[TopoSorter] operator[<] identifier[T] operator[>] identifier[sorter] operator[=] Keyword[new] identifier[TopoSorter] operator[<] operator[>] operator[SEP] Keyword[this] opera... |
protected boolean exportWithMinimalMetaData(String path) {
String checkPath = path.startsWith("/") ? path + "/" : "/" + path + "/";
for (String p : m_parameters.getResourcesToExportWithMetaData()) {
if (checkPath.startsWith(p)) {
return false;
}
}
... | class class_name[name] begin[{]
method[exportWithMinimalMetaData, return_type[type[boolean]], modifier[protected], parameter[path]] begin[{]
local_variable[type[String], checkPath]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberR... | Keyword[protected] Keyword[boolean] identifier[exportWithMinimalMetaData] operator[SEP] identifier[String] identifier[path] operator[SEP] {
identifier[String] identifier[checkPath] operator[=] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier... |
private void translateTypeDeclaration(WyilFile.Decl.Type declaration) {
WyilFile.Tuple<WyilFile.Expr> invariants = declaration.getInvariant();
WyalFile.Stmt.Block[] invariant = new WyalFile.Stmt.Block[invariants.size()];
WyalFile.Type type = convert(declaration.getType(), declaration);
WyalFile.VariableDeclarat... | class class_name[name] begin[{]
method[translateTypeDeclaration, return_type[void], modifier[private], parameter[declaration]] begin[{]
local_variable[type[WyilFile], invariants]
local_variable[type[WyalFile], invariant]
local_variable[type[WyalFile], type]
local_variable[type[W... | Keyword[private] Keyword[void] identifier[translateTypeDeclaration] operator[SEP] identifier[WyilFile] operator[SEP] identifier[Decl] operator[SEP] identifier[Type] identifier[declaration] operator[SEP] {
identifier[WyilFile] operator[SEP] identifier[Tuple] operator[<] identifier[WyilFile] operator[SEP] identifi... |
public static Point2D[] calculateGisModelBulge(Point2D[] newPts, double[] bulges) {
Vector ptspol = new Vector();
Point2D init = new Point2D.Double();
Point2D end = new Point2D.Double();
for (int j=0; j<newPts.length; j++) {
init = newPts[j];
if (j!=newPts.length-1) end = newPts[j+1];
if (bulges[j]==0 ... | class class_name[name] begin[{]
method[calculateGisModelBulge, return_type[type[Point2D]], modifier[public static], parameter[newPts, bulges]] begin[{]
local_variable[type[Vector], ptspol]
local_variable[type[Point2D], init]
local_variable[type[Point2D], end]
ForStatement(body=B... | Keyword[public] Keyword[static] identifier[Point2D] operator[SEP] operator[SEP] identifier[calculateGisModelBulge] operator[SEP] identifier[Point2D] operator[SEP] operator[SEP] identifier[newPts] , Keyword[double] operator[SEP] operator[SEP] identifier[bulges] operator[SEP] {
identifier[Vector] identifier[ptspo... |
@Override
public Set<Attribute<X, ?>> getDeclaredAttributes()
{
Set<Attribute<X, ?>> attributes = new HashSet<Attribute<X, ?>>();
if (declaredSingluarAttribs != null)
{
attributes.addAll(declaredSingluarAttribs.values());
}
if (declaredPluralAttributes != nul... | class class_name[name] begin[{]
method[getDeclaredAttributes, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], attributes]
if[binary_operation[member[.declaredSingluarAttribs], !=, literal[null]]] begin[{]
call[attributes.... | annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[Attribute] operator[<] identifier[X] , operator[?] operator[>] operator[>] identifier[getDeclaredAttributes] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[Attribute] operator[<] identifier[X] , oper... |
private void updateMinimum(Node node)
{
// Check if a comparator was set.
if (entryComparator != null)
{
// Use the comparator to compare the candidate new minimum with the current one and check if the new one
// should be set.
if (entryComparator.compare(... | class class_name[name] begin[{]
method[updateMinimum, return_type[void], modifier[private], parameter[node]] begin[{]
if[binary_operation[member[.entryComparator], !=, literal[null]]] begin[{]
if[binary_operation[call[entryComparator.compare, parameter[member[node.elemen... | Keyword[private] Keyword[void] identifier[updateMinimum] operator[SEP] identifier[Node] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[entryComparator] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[entryComparator] operator[SEP] identifier[compare... |
protected void decrementBinaryReferenceCount( Object fieldValue,
Set<BinaryKey> unusedBinaryKeys,
Set<BinaryKey> usedBinaryKeys) {
if (fieldValue instanceof List<?>) {
for (Object value : (List<?>)fie... | class class_name[name] begin[{]
method[decrementBinaryReferenceCount, return_type[void], modifier[protected], parameter[fieldValue, unusedBinaryKeys, usedBinaryKeys]] begin[{]
if[binary_operation[member[.fieldValue], instanceof, type[List]]] begin[{]
ForStatement(body=BlockStatement... | Keyword[protected] Keyword[void] identifier[decrementBinaryReferenceCount] operator[SEP] identifier[Object] identifier[fieldValue] , identifier[Set] operator[<] identifier[BinaryKey] operator[>] identifier[unusedBinaryKeys] , identifier[Set] operator[<] identifier[BinaryKey] operator[>] identifier[usedBinaryKeys] ope... |
public String getCanonicalID() {
if (canonicalID == null) {
synchronized(this) {
if (canonicalID == null) {
canonicalID = getCanonicalID(getID());
assert(canonicalID != null);
if (canonicalID == null) {
... | class class_name[name] begin[{]
method[getCanonicalID, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.canonicalID], ==, literal[null]]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operat... | Keyword[public] identifier[String] identifier[getCanonicalID] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[canonicalID] operator[==] Other[null] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
Keyword[if] operator[SEP] identifier[c... |
public void marshall(Serializer serializer, ProtocolMarshaller protocolMarshaller) {
if (serializer == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(serializer.getParquetSerDe(), PARQUETSERDE_BINDIN... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[serializer, protocolMarshaller]] begin[{]
if[binary_operation[member[.serializer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Serializer] identifier[serializer] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[serializer] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keywo... |
private InputStream decompressBody() {
if (!decompress) {
return body;
}
// if has no body, some server still set content-encoding header,
// GZIPInputStream wrap empty input stream will cause exception. we should check this
if (method.equals(Methods.HEAD)
... | class class_name[name] begin[{]
method[decompressBody, return_type[type[InputStream]], modifier[private], parameter[]] begin[{]
if[member[.decompress]] begin[{]
return[member[.body]]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[binar... | Keyword[private] identifier[InputStream] identifier[decompressBody] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[decompress] operator[SEP] {
Keyword[return] identifier[body] operator[SEP]
}
Keyword[if] operator[SEP] identifier[method] operator[SEP] ident... |
public static Reader reader(final Version version) {
return new Reader(GPX.xmlReader(version), Mode.STRICT);
} | class class_name[name] begin[{]
method[reader, return_type[type[Reader]], modifier[public static], parameter[version]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=xmlRea... | Keyword[public] Keyword[static] identifier[Reader] identifier[reader] operator[SEP] Keyword[final] identifier[Version] identifier[version] operator[SEP] {
Keyword[return] Keyword[new] identifier[Reader] operator[SEP] identifier[GPX] operator[SEP] identifier[xmlReader] operator[SEP] identifier[version] operator[S... |
public Method findMethod(Object candidate) {
Assert.notNull(candidate, "candidate object must not be null");
Class<?> targetClass = AopUtils.getTargetClass(candidate);
if (targetClass == null) {
targetClass = candidate.getClass();
}
return this.findMethod(targetClass);
} | class class_name[name] begin[{]
method[findMethod, return_type[type[Method]], modifier[public], parameter[candidate]] begin[{]
call[Assert.notNull, parameter[member[.candidate], literal["candidate object must not be null"]]]
local_variable[type[Class], targetClass]
if[bi... | Keyword[public] identifier[Method] identifier[findMethod] operator[SEP] identifier[Object] identifier[candidate] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[candidate] , literal[String] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operat... |
public static boolean isLocalContactUri(Uri uri) {
return isLocalContentUri(uri)
&& ContactsContract.AUTHORITY.equals(uri.getAuthority())
&& !uri.getPath().startsWith(LOCAL_CONTACT_IMAGE_URI.getPath());
} | class class_name[name] begin[{]
method[isLocalContactUri, return_type[type[boolean]], modifier[public static], parameter[uri]] begin[{]
return[binary_operation[binary_operation[call[.isLocalContentUri, parameter[member[.uri]]], &&, call[ContactsContract.AUTHORITY.equals, parameter[call[uri.getAuthority... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isLocalContactUri] operator[SEP] identifier[Uri] identifier[uri] operator[SEP] {
Keyword[return] identifier[isLocalContentUri] operator[SEP] identifier[uri] operator[SEP] operator[&&] identifier[ContactsContract] operator[SEP] identifier[AUTHORITY] oper... |
public void serviceName_namespaces_namespaceId_images_imageId_permissions_permissionId_DELETE(String serviceName, String namespaceId, String imageId, String permissionId) throws IOException {
String qPath = "/caas/registry/{serviceName}/namespaces/{namespaceId}/images/{imageId}/permissions/{permissionId}";
StringBu... | class class_name[name] begin[{]
method[serviceName_namespaces_namespaceId_images_imageId_permissions_permissionId_DELETE, return_type[void], modifier[public], parameter[serviceName, namespaceId, imageId, permissionId]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuild... | Keyword[public] Keyword[void] identifier[serviceName_namespaces_namespaceId_images_imageId_permissions_permissionId_DELETE] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[namespaceId] , identifier[String] identifier[imageId] , identifier[String] identifier[permissionId] oper... |
private void build(Subroutine subroutine) throws CFGBuilderException {
// Prime the work list
subroutine.addEdgeAndExplore(subroutine.getEntry(), subroutine.getStartInstruction(), START_EDGE);
// Keep going until all basic blocks in the subroutine have been added
while (subroutine.hasMo... | class class_name[name] begin[{]
method[build, return_type[void], modifier[private], parameter[subroutine]] begin[{]
call[subroutine.addEdgeAndExplore, parameter[call[subroutine.getEntry, parameter[]], call[subroutine.getStartInstruction, parameter[]], member[.START_EDGE]]]
while... | Keyword[private] Keyword[void] identifier[build] operator[SEP] identifier[Subroutine] identifier[subroutine] operator[SEP] Keyword[throws] identifier[CFGBuilderException] {
identifier[subroutine] operator[SEP] identifier[addEdgeAndExplore] operator[SEP] identifier[subroutine] operator[SEP] identifier[getEntry] o... |
public Object get(IConverter converter, Object sourceObject,
TypeReference<?> destinationType) {
return convertedObjects.get(new ConvertedObjectsKey(converter,
sourceObject, destinationType));
} | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[converter, sourceObject, destinationType]] begin[{]
return[call[convertedObjects.get, parameter[ClassCreator(arguments=[MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifi... | Keyword[public] identifier[Object] identifier[get] operator[SEP] identifier[IConverter] identifier[converter] , identifier[Object] identifier[sourceObject] , identifier[TypeReference] operator[<] operator[?] operator[>] identifier[destinationType] operator[SEP] {
Keyword[return] identifier[convertedObjects] op... |
@Override
public synchronized void add(DiscoveryEntry discoveryEntry) {
logger.debug("adding discovery entry: {}", discoveryEntry);
if (!(discoveryEntry instanceof GlobalDiscoveryEntryPersisted)) {
return;
}
GlobalDiscoveryEntryPersisted globalDiscoveryEntry = (GlobalDisc... | class class_name[name] begin[{]
method[add, return_type[void], modifier[synchronized public], parameter[discoveryEntry]] begin[{]
call[logger.debug, parameter[literal["adding discovery entry: {}"], member[.discoveryEntry]]]
if[binary_operation[member[.discoveryEntry], instanceof... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[add] operator[SEP] identifier[DiscoveryEntry] identifier[discoveryEntry] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[discoveryEntry] operator[SEP] o... |
public void runQueryWithArrayParameters() throws InterruptedException {
// [START bigquery_query_params_arrays]
// BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
String gender = "M";
String[] states = {"WA", "WI", "WV", "WY"};
String query =
"SELECT name, sum(number) ... | class class_name[name] begin[{]
method[runQueryWithArrayParameters, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[String], gender]
local_variable[type[String], states]
local_variable[type[String], query]
local_variable[type[QueryJobConfiguration]... | Keyword[public] Keyword[void] identifier[runQueryWithArrayParameters] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] {
identifier[String] identifier[gender] operator[=] literal[String] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[states] operator[=] {
... |
public void setDay(Day d)
{
if (m_day != null)
{
m_parentCalendar.removeHoursFromDay(this);
}
m_day = d;
m_parentCalendar.attachHoursToDay(this);
} | class class_name[name] begin[{]
method[setDay, return_type[void], modifier[public], parameter[d]] begin[{]
if[binary_operation[member[.m_day], !=, literal[null]]] begin[{]
call[m_parentCalendar.removeHoursFromDay, parameter[THIS[]]]
else begin[{]
None
end... | Keyword[public] Keyword[void] identifier[setDay] operator[SEP] identifier[Day] identifier[d] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_day] operator[!=] Other[null] operator[SEP] {
identifier[m_parentCalendar] operator[SEP] identifier[removeHoursFromDay] operator[SEP] Keyword[this] operat... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "userDefinedCSRef")
public JAXBElement<UserDefinedCSRefType> createUserDefinedCSRef(UserDefinedCSRefType value) {
return new JAXBElement<UserDefinedCSRefType>(_UserDefinedCSRef_QNAME, UserDefinedCSRefType.class, null, value);
} | class class_name[name] begin[{]
method[createUserDefinedCSRef, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_UserDefinedCSRef_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[UserDefinedCSRefType] operator[>] identifier[createUserDefinedCSRef] operator[SEP] identif... |
public static List<Point3d> atomsToPoints(Collection<Atom> atoms) {
ArrayList<Point3d> points = new ArrayList<>(atoms.size());
for (Atom atom : atoms) {
points.add(atom.getCoordsAsPoint3d());
}
return points;
} | class class_name[name] begin[{]
method[atomsToPoints, return_type[type[List]], modifier[public static], parameter[atoms]] begin[{]
local_variable[type[ArrayList], points]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodIn... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Point3d] operator[>] identifier[atomsToPoints] operator[SEP] identifier[Collection] operator[<] identifier[Atom] operator[>] identifier[atoms] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Point3d] operator[>] identifier[point... |
public boolean destroyGuacamoleSession(String authToken) {
// Remove corresponding GuacamoleSession if the token is valid
GuacamoleSession session = tokenSessionMap.remove(authToken);
if (session == null)
return false;
// Invalidate the removed session
session.inval... | class class_name[name] begin[{]
method[destroyGuacamoleSession, return_type[type[boolean]], modifier[public], parameter[authToken]] begin[{]
local_variable[type[GuacamoleSession], session]
if[binary_operation[member[.session], ==, literal[null]]] begin[{]
return[literal[false]]
... | Keyword[public] Keyword[boolean] identifier[destroyGuacamoleSession] operator[SEP] identifier[String] identifier[authToken] operator[SEP] {
identifier[GuacamoleSession] identifier[session] operator[=] identifier[tokenSessionMap] operator[SEP] identifier[remove] operator[SEP] identifier[authToken] operator[SEP] o... |
protected Statement createBindableStatement(PropertyNode propertyNode, Expression fieldExpression) {
// create statementBody
return stmt(callThisX("firePropertyChange", args(constX(propertyNode.getName()), fieldExpression, assignX(fieldExpression, varX("value")))));
} | class class_name[name] begin[{]
method[createBindableStatement, return_type[type[Statement]], modifier[protected], parameter[propertyNode, fieldExpression]] begin[{]
return[call[.stmt, parameter[call[.callThisX, parameter[literal["firePropertyChange"], call[.args, parameter[call[.constX, parameter[call... | Keyword[protected] identifier[Statement] identifier[createBindableStatement] operator[SEP] identifier[PropertyNode] identifier[propertyNode] , identifier[Expression] identifier[fieldExpression] operator[SEP] {
Keyword[return] identifier[stmt] operator[SEP] identifier[callThisX] operator[SEP] literal[String] , ... |
public static void useProviderForType(Class<?> type, FakeProvider<?> provider) {
if (bridge == null) {
throw new IllegalStateException("Must call initMocks() before calling useProviderForType()");
}
if (bridge.registeredMocks.containsKey(type)) {
throw new IllegalArgumentException(
"Ca... | class class_name[name] begin[{]
method[useProviderForType, return_type[void], modifier[public static], parameter[type, provider]] begin[{]
if[binary_operation[member[.bridge], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[]... | Keyword[public] Keyword[static] Keyword[void] identifier[useProviderForType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[FakeProvider] operator[<] operator[?] operator[>] identifier[provider] operator[SEP] {
Keyword[if] operator[SEP] identifier[bridge] opera... |
public BoxWebLink.Info createWebLink(String name, URL linkURL) {
return this.createWebLink(name, linkURL,
null);
} | class class_name[name] begin[{]
method[createWebLink, return_type[type[BoxWebLink]], modifier[public], parameter[name, linkURL]] begin[{]
return[THIS[call[None.createWebLink, parameter[member[.name], member[.linkURL], literal[null]]]]]
end[}]
END[}] | Keyword[public] identifier[BoxWebLink] operator[SEP] identifier[Info] identifier[createWebLink] operator[SEP] identifier[String] identifier[name] , identifier[URL] identifier[linkURL] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[createWebLink] operator[SEP] identifier[name] , identifi... |
public <T> Component unregister(Class<T> type, Annotation qualifier) throws ProviderMissingException {
//Detach corresponding provider from it's component
Provider<T> provider = findProvider(type, qualifier);
provider.setComponent(null);
String key = PokeHelper.makeProviderKey(type, qu... | class class_name[name] begin[{]
method[unregister, return_type[type[Component]], modifier[public], parameter[type, qualifier]] begin[{]
local_variable[type[Provider], provider]
call[provider.setComponent, parameter[literal[null]]]
local_variable[type[String], key]
local_... | Keyword[public] operator[<] identifier[T] operator[>] identifier[Component] identifier[unregister] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[Annotation] identifier[qualifier] operator[SEP] Keyword[throws] identifier[ProviderMissingException] {
identifier... |
public char getValueAsChar(int index) throws IOException {
if (index >= structure.valueSizes.size()) {
throw new IOException("Index " + index + " is out of range.");
}
return Bytes.toChar(value, structure.valueByteOffsets.get(index));
} | class class_name[name] begin[{]
method[getValueAsChar, return_type[type[char]], modifier[public], parameter[index]] begin[{]
if[binary_operation[member[.index], >=, call[structure.valueSizes.size, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperat... | Keyword[public] Keyword[char] identifier[getValueAsChar] operator[SEP] Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[index] operator[>=] identifier[structure] operator[SEP] identifier[valueSizes] operator[SEP] identifier[size] operator... |
@Override
public void setAttribute(String key, Object value) {
if (value == null) {
setAttribute(key, null);
} else {
setAttribute(key, Collections.singletonList(value));
}
} | class class_name[name] begin[{]
method[setAttribute, return_type[void], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[.setAttribute, parameter[member[.key], literal[null]]]
else begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
identifier[setAttribut... |
private void init() {
_smoothed = true;
_chartType = ChartType.LINE;
_subDivisions = 16;
_snapToTicks = false;
_selectorFillColor = Color.WHITE;
_selectorStrokeColor = Color.RED;
_selectorSi... | class class_name[name] begin[{]
method[init, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[._smoothed], literal[true]]
assign[member[._chartType], member[ChartType.LINE]]
assign[member[._subDivisions], literal[16]]
assi... | Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] {
identifier[_smoothed] operator[=] literal[boolean] operator[SEP] identifier[_chartType] operator[=] identifier[ChartType] operator[SEP] identifier[LINE] operator[SEP] identifier[_subDivisions] operator[=] Other[16] operator[SEP] identi... |
public static List<WayDataBlock> toWayDataBlockList(Geometry geometry) {
List<WayDataBlock> res = new ArrayList<>();
if (geometry instanceof MultiPolygon) {
MultiPolygon mp = (MultiPolygon) geometry;
for (int i = 0; i < mp.getNumGeometries(); i++) {
Polygon p = (P... | class class_name[name] begin[{]
method[toWayDataBlockList, return_type[type[List]], modifier[public static], parameter[geometry]] begin[{]
local_variable[type[List], res]
if[binary_operation[member[.geometry], instanceof, type[MultiPolygon]]] begin[{]
local_variable[type[Mul... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[WayDataBlock] operator[>] identifier[toWayDataBlockList] operator[SEP] identifier[Geometry] identifier[geometry] operator[SEP] {
identifier[List] operator[<] identifier[WayDataBlock] operator[>] identifier[res] operator[=] Keyword[new] ident... |
private void getJavaSource() {
String[] resourceFiles = new String[getConfigurationFiles().length + 1];
resourceFiles[0] = getSourceFileName();
for (int i = 0; i < getConfigurationFiles().length; i++) {
resourceFiles[i + 1] = getConfigurationFiles()[i];
}
GetResourceRequest request = new GetResourceReques... | class class_name[name] begin[{]
method[getJavaSource, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], resourceFiles]
assign[member[.resourceFiles], call[.getSourceFileName, parameter[]]]
ForStatement(body=BlockStatement(label=None, statem... | Keyword[private] Keyword[void] identifier[getJavaSource] operator[SEP] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[resourceFiles] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[getConfigurationFiles] operator[SEP] operator[SEP] operator[SEP] identifier[length] ... |
public ServiceFuture<StreamingEndpointInner> createAsync(String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters, Boolean autoStart, final ServiceCallback<StreamingEndpointInner> serviceCallback) {
return ServiceFuture.fromResponse(createWithServiceResponseA... | class class_name[name] begin[{]
method[createAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, streamingEndpointName, parameters, autoStart, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.createWithServiceResponseAsy... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[StreamingEndpointInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[streamingEndpointName] , identifier[StreamingEndpoin... |
public static void listen(int tryCount, long delay, ClipboardListener listener, boolean sync) {
ClipboardMonitor.INSTANCE//
.setTryCount(tryCount)//
.setDelay(delay)//
.addListener(listener)//
.listen(sync);
} | class class_name[name] begin[{]
method[listen, return_type[void], modifier[public static], parameter[tryCount, delay, listener, sync]] begin[{]
call[ClipboardMonitor.INSTANCE.setTryCount, parameter[member[.tryCount]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[listen] operator[SEP] Keyword[int] identifier[tryCount] , Keyword[long] identifier[delay] , identifier[ClipboardListener] identifier[listener] , Keyword[boolean] identifier[sync] operator[SEP] {
identifier[ClipboardMonitor] operator[SEP] identifier[INST... |
public static Element nextElement(XMLExtendedStreamReader reader, Namespace expectedNamespace) throws XMLStreamException {
Element element = nextElement(reader);
if (element == null) {
return null;
} else if (element != Element.UNKNOWN
&& expectedNamespace.equals(Nam... | class class_name[name] begin[{]
method[nextElement, return_type[type[Element]], modifier[public static], parameter[reader, expectedNamespace]] begin[{]
local_variable[type[Element], element]
if[binary_operation[member[.element], ==, literal[null]]] begin[{]
return[literal[nu... | Keyword[public] Keyword[static] identifier[Element] identifier[nextElement] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[Namespace] identifier[expectedNamespace] operator[SEP] Keyword[throws] identifier[XMLStreamException] {
identifier[Element] identifier[element] operator[=... |
public void marshall(SeverityLevel severityLevel, ProtocolMarshaller protocolMarshaller) {
if (severityLevel == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(severityLevel.getCode(), CODE_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[severityLevel, protocolMarshaller]] begin[{]
if[binary_operation[member[.severityLevel], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[SeverityLevel] identifier[severityLevel] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[severityLevel] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
public void start()
{
if (!started)
try
{
for (RepositoryEntry repConfiguration : repConfigurations())
{
String repName = repConfiguration.getName();
String wsName = null;
if (props != null)
{
... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.started]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions... | Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[started] operator[SEP] Keyword[try] {
Keyword[for] operator[SEP] identifier[RepositoryEntry] identifier[repConfiguration] operator[:] identifier[repConfigurations] operator[S... |
public Blob updateBlob(String bucketName, String blobName) {
// [START updateBlob]
Map<String, String> newMetadata = new HashMap<>();
newMetadata.put("key", "value");
storage.update(BlobInfo.newBuilder(bucketName, blobName).setMetadata(null).build());
Blob blob =
storage.update(BlobInfo.newB... | class class_name[name] begin[{]
method[updateBlob, return_type[type[Blob]], modifier[public], parameter[bucketName, blobName]] begin[{]
local_variable[type[Map], newMetadata]
call[newMetadata.put, parameter[literal["key"], literal["value"]]]
call[storage.update, paramete... | Keyword[public] identifier[Blob] identifier[updateBlob] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[blobName] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[newMetadata] operator[=] Keyword[new] identifier[H... |
@Override
public void visit(final Multimedia multimedia) {
for (final GedObject gedObject : multimedia.getAttributes()) {
gedObject.accept(this);
}
} | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[multimedia]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selector... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Multimedia] identifier[multimedia] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[GedObject] identifier[gedObject] operator[:] identifier[multimedia] operator[SEP] ide... |
protected void rvfcalculate(double[] x) {
value = 0.0;
if (derivativeNumerator == null) {
derivativeNumerator = new double[x.length];
for (int d = 0; d < data.length; d++) {
// if (d == testMin) {
// d = testMax - 1;
// continue;
//... | class class_name[name] begin[{]
method[rvfcalculate, return_type[void], modifier[protected], parameter[x]] begin[{]
assign[member[.value], literal[0.0]]
if[binary_operation[member[.derivativeNumerator], ==, literal[null]]] begin[{]
assign[member[.derivati... | Keyword[protected] Keyword[void] identifier[rvfcalculate] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x] operator[SEP] {
identifier[value] operator[=] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[derivativeNumerator] operator[==] Other[null] operator[SEP] {
... |
@SafeVarargs
protected final Move<? super SolutionType> getBestMove(Collection<? extends Move<? super SolutionType>> moves,
boolean requireImprovement,
Predicate<? super Move<? super SolutionType>>.... | class class_name[name] begin[{]
method[getBestMove, return_type[type[Move]], modifier[final protected], parameter[moves, requireImprovement, filters]] begin[{]
return[THIS[call[None.getBestMove, parameter[member[.moves], member[.requireImprovement], literal[false], member[.filters]]]]]
end[}]
END[}... | annotation[@] identifier[SafeVarargs] Keyword[protected] Keyword[final] identifier[Move] operator[<] operator[?] Keyword[super] identifier[SolutionType] operator[>] identifier[getBestMove] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Move] operator[<] operator[?] Keyword[supe... |
public static Properties stringToProperties(String str) {
Properties result = new Properties();
return stringToProperties(str, result);
} | class class_name[name] begin[{]
method[stringToProperties, return_type[type[Properties]], modifier[public static], parameter[str]] begin[{]
local_variable[type[Properties], result]
return[call[.stringToProperties, parameter[member[.str], member[.result]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Properties] identifier[stringToProperties] operator[SEP] identifier[String] identifier[str] operator[SEP] {
identifier[Properties] identifier[result] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[str... |
@Override
public <T> CachedResource<T> getResource(
Resource resource, Loader<T> builder, long checkInterval) throws IOException {
if (Included.PLAIN == this.resourcesElementsProvider.getDefaultIncludedType()) {
this.logger.trace(
"Resoure Aggregation Disabled, ig... | class class_name[name] begin[{]
method[getResource, return_type[type[CachedResource]], modifier[public], parameter[resource, builder, checkInterval]] begin[{]
if[binary_operation[member[Included.PLAIN], ==, THIS[member[None.resourcesElementsProvider]call[None.getDefaultIncludedType, parameter[]... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[CachedResource] operator[<] identifier[T] operator[>] identifier[getResource] operator[SEP] identifier[Resource] identifier[resource] , identifier[Loader] operator[<] identifier[T] operator[>] identifier[builder] , Key... |
@Indexable(type = IndexableType.DELETE)
@Override
public CPOptionCategory deleteCPOptionCategory(long CPOptionCategoryId)
throws PortalException {
return cpOptionCategoryPersistence.remove(CPOptionCategoryId);
} | class class_name[name] begin[{]
method[deleteCPOptionCategory, return_type[type[CPOptionCategory]], modifier[public], parameter[CPOptionCategoryId]] begin[{]
return[call[cpOptionCategoryPersistence.remove, parameter[member[.CPOptionCategoryId]]]]
end[}]
END[}] | annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPOptionCategory] identifier[deleteCPOptionCategory] operator[SEP] Keyword[long] identifier[CPOptionCatego... |
public DOAuth2User findByEmail(java.lang.String email) {
return queryUniqueByField(null, DOAuth2UserMapper.Field.EMAIL.getFieldName(), email);
} | class class_name[name] begin[{]
method[findByEmail, return_type[type[DOAuth2User]], modifier[public], parameter[email]] begin[{]
return[call[.queryUniqueByField, parameter[literal[null], call[DOAuth2UserMapper.Field.EMAIL.getFieldName, parameter[]], member[.email]]]]
end[}]
END[}] | Keyword[public] identifier[DOAuth2User] identifier[findByEmail] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[email] operator[SEP] {
Keyword[return] identifier[queryUniqueByField] operator[SEP] Other[null] , identifier[DOAuth2UserMapper] operator[SEP] ... |
protected void doAttributes(AttributedCharacterIterator iter) {
underline = false;
Set set = iter.getAttributes().keySet();
for(Iterator iterator = set.iterator(); iterator.hasNext();) {
AttributedCharacterIterator.Attribute attribute = (AttributedCharacterIterator.Attribute)iterator... | class class_name[name] begin[{]
method[doAttributes, return_type[void], modifier[protected], parameter[iter]] begin[{]
assign[member[.underline], literal[false]]
local_variable[type[Set], set]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(anno... | Keyword[protected] Keyword[void] identifier[doAttributes] operator[SEP] identifier[AttributedCharacterIterator] identifier[iter] operator[SEP] {
identifier[underline] operator[=] literal[boolean] operator[SEP] identifier[Set] identifier[set] operator[=] identifier[iter] operator[SEP] identifier[getAttributes] op... |
public DescribeWorkspaceBundlesResult withBundles(WorkspaceBundle... bundles) {
if (this.bundles == null) {
setBundles(new com.amazonaws.internal.SdkInternalList<WorkspaceBundle>(bundles.length));
}
for (WorkspaceBundle ele : bundles) {
this.bundles.add(ele);
}
... | class class_name[name] begin[{]
method[withBundles, return_type[type[DescribeWorkspaceBundlesResult]], modifier[public], parameter[bundles]] begin[{]
if[binary_operation[THIS[member[None.bundles]], ==, literal[null]]] begin[{]
call[.setBundles, parameter[ClassCreator(arg... | Keyword[public] identifier[DescribeWorkspaceBundlesResult] identifier[withBundles] operator[SEP] identifier[WorkspaceBundle] operator[...] identifier[bundles] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[bundles] operator[==] Other[null] operator[SEP] {
identifier[s... |
public boolean isBlacklisted( final String url )
throws MalformedURLException
{
final URL u = new URL( url );
return isBlacklisted( u );
} | class class_name[name] begin[{]
method[isBlacklisted, return_type[type[boolean]], modifier[public], parameter[url]] begin[{]
local_variable[type[URL], u]
return[call[.isBlacklisted, parameter[member[.u]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[isBlacklisted] operator[SEP] Keyword[final] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[MalformedURLException] {
Keyword[final] identifier[URL] identifier[u] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[url] operator... |
protected boolean isEquivalentInTheSet(Node node, boolean direction, Set<Node> set)
{
for (Node eq : direction == UPWARD ? node.getUpperEquivalent() : node.getLowerEquivalent())
{
if (set.contains(eq)) return true;
boolean isIn = isEquivalentInTheSet(eq, direction, set);
if (isIn) return true;
}
... | class class_name[name] begin[{]
method[isEquivalentInTheSet, return_type[type[boolean]], modifier[protected], parameter[node, direction, set]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=eq, postfix_operators... | Keyword[protected] Keyword[boolean] identifier[isEquivalentInTheSet] operator[SEP] identifier[Node] identifier[node] , Keyword[boolean] identifier[direction] , identifier[Set] operator[<] identifier[Node] operator[>] identifier[set] operator[SEP] {
Keyword[for] operator[SEP] identifier[Node] identifier[eq] ope... |
@Override
public void write(byte[] buffer, int offset, int length) throws IOException {
checkWritePrimitiveTypes();
primitiveTypes.write(buffer, offset, length);
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[buffer, offset, length]] begin[{]
call[.checkWritePrimitiveTypes, parameter[]]
call[primitiveTypes.write, parameter[member[.buffer], member[.offset], member[.length]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkWritePrimitiv... |
public SagaInstanceInfo createNew(final SagaType type) {
Saga newSaga = startNewSaga(type.getSagaClass());
return SagaInstanceInfo.define(newSaga, true);
} | class class_name[name] begin[{]
method[createNew, return_type[type[SagaInstanceInfo]], modifier[public], parameter[type]] begin[{]
local_variable[type[Saga], newSaga]
return[call[SagaInstanceInfo.define, parameter[member[.newSaga], literal[true]]]]
end[}]
END[}] | Keyword[public] identifier[SagaInstanceInfo] identifier[createNew] operator[SEP] Keyword[final] identifier[SagaType] identifier[type] operator[SEP] {
identifier[Saga] identifier[newSaga] operator[=] identifier[startNewSaga] operator[SEP] identifier[type] operator[SEP] identifier[getSagaClass] operator[SEP] opera... |
public boolean createTableIfNotExists(ProvisionedThroughput throughput) {
try {
createTable(throughput);
} catch (final ResourceInUseException e) {
if (LOG.isTraceEnabled()) {
LOG.trace("Table already exists, no need to create", e);
}
retur... | class class_name[name] begin[{]
method[createTableIfNotExists, return_type[type[boolean]], modifier[public], parameter[throughput]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=throughput, postfix_operators=[], prefix_operators=[], quali... | Keyword[public] Keyword[boolean] identifier[createTableIfNotExists] operator[SEP] identifier[ProvisionedThroughput] identifier[throughput] operator[SEP] {
Keyword[try] {
identifier[createTable] operator[SEP] identifier[throughput] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP... |
public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetrics checkpointMetrics) throws Exception {
throw new UnsupportedOperationException(String.format("triggerCheckpointOnBarrier not supported by %s", this.getClass().getName()));
} | class class_name[name] begin[{]
method[triggerCheckpointOnBarrier, return_type[void], modifier[public], parameter[checkpointMetaData, checkpointOptions, checkpointMetrics]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operat... | Keyword[public] Keyword[void] identifier[triggerCheckpointOnBarrier] operator[SEP] identifier[CheckpointMetaData] identifier[checkpointMetaData] , identifier[CheckpointOptions] identifier[checkpointOptions] , identifier[CheckpointMetrics] identifier[checkpointMetrics] operator[SEP] Keyword[throws] identifier[Exceptio... |
public ValidDBInstanceModificationsMessage withValidProcessorFeatures(AvailableProcessorFeature... validProcessorFeatures) {
if (this.validProcessorFeatures == null) {
setValidProcessorFeatures(new com.amazonaws.internal.SdkInternalList<AvailableProcessorFeature>(validProcessorFeatures.length));
... | class class_name[name] begin[{]
method[withValidProcessorFeatures, return_type[type[ValidDBInstanceModificationsMessage]], modifier[public], parameter[validProcessorFeatures]] begin[{]
if[binary_operation[THIS[member[None.validProcessorFeatures]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[ValidDBInstanceModificationsMessage] identifier[withValidProcessorFeatures] operator[SEP] identifier[AvailableProcessorFeature] operator[...] identifier[validProcessorFeatures] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[validProcessorFeatures] oper... |
public static String shiftIndent(String str, int indent, int tabWidth) {
if (isEmpty(str))
return str;
if (indent <= 0)
indent = 1;
int n = 0;
int i = 0;
for (; i < str.length(); i++) {
if (n > 0 && (n / tabWidth) >= indent)
... | class class_name[name] begin[{]
method[shiftIndent, return_type[type[String]], modifier[public static], parameter[str, indent, tabWidth]] begin[{]
if[call[.isEmpty, parameter[member[.str]]]] begin[{]
return[member[.str]]
else begin[{]
None
end[}]
if[binary_operat... | Keyword[public] Keyword[static] identifier[String] identifier[shiftIndent] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[indent] , Keyword[int] identifier[tabWidth] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[str] operator[SEP] operator[SE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.