code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private boolean checkCode(
String secret,
long code,
long timestamp,
int window)
{
byte[] decodedKey = decodeSecret(secret);
// convert unix time into a 30 second "window" as specified by the
// TOTP specification. Using Google's default inter... | class class_name[name] begin[{]
method[checkCode, return_type[type[boolean]], modifier[private], parameter[secret, code, timestamp, window]] begin[{]
local_variable[type[byte], decodedKey]
local_variable[type[long], timeWindow]
ForStatement(body=BlockStatement(label=None, statements=[Lo... | Keyword[private] Keyword[boolean] identifier[checkCode] operator[SEP] identifier[String] identifier[secret] , Keyword[long] identifier[code] , Keyword[long] identifier[timestamp] , Keyword[int] identifier[window] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[decodedKey] operator[=] iden... |
private double fillInterpolatedValues(InterpolationType interpolationType) {
double interpolatedValue = 0;
if (shouldDoInterpolation(true)) {
double y1 = values[indexToInterpolate];
if (current == indexToInterpolate) {
return y1;
}
long x = timestamps[current];
long x1 = timestamps[indexToInte... | class class_name[name] begin[{]
method[fillInterpolatedValues, return_type[type[double]], modifier[private], parameter[interpolationType]] begin[{]
local_variable[type[double], interpolatedValue]
if[call[.shouldDoInterpolation, parameter[literal[true]]]] begin[{]
local_varia... | Keyword[private] Keyword[double] identifier[fillInterpolatedValues] operator[SEP] identifier[InterpolationType] identifier[interpolationType] operator[SEP] {
Keyword[double] identifier[interpolatedValue] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[shouldDoInterpolation] operator[SEP] ... |
public void setEncoding(String v) {
if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_encoding == null)
jcasType.jcas.throwFeatMissing("encoding", "de.julielab.jules.types.ace.SourceFile");
jcasType.ll_cas.ll_setStringValue(addr, ((SourceFile_Type)jcasType).casFeatCode_encoding, v);} | class class_name[name] begin[{]
method[setEncoding, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[SourceFile_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[void] identifier[setEncoding] operator[SEP] identifier[String] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[SourceFile_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[SourceFile_Type] operator[SEP] identifier[jcasType] op... |
public static SessionManagerConfig getServerSessionManagerConfig() {
SessionMgrComponentImpl service = INSTANCE.get().get();
if (service == null) {
// no session manager service is available
return null;
}
return service.getServerConfig();
} | class class_name[name] begin[{]
method[getServerSessionManagerConfig, return_type[type[SessionManagerConfig]], modifier[public static], parameter[]] begin[{]
local_variable[type[SessionMgrComponentImpl], service]
if[binary_operation[member[.service], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[static] identifier[SessionManagerConfig] identifier[getServerSessionManagerConfig] operator[SEP] operator[SEP] {
identifier[SessionMgrComponentImpl] identifier[service] operator[=] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[get]... |
private static OHLCDataset createOHLCDataset(TimeSeries series) {
final int nbTicks = series.getTickCount();
Date[] dates = new Date[nbTicks];
double[] opens = new double[nbTicks];
double[] highs = new double[nbTicks];
double[] lows = new double[nbTicks];
double[... | class class_name[name] begin[{]
method[createOHLCDataset, return_type[type[OHLCDataset]], modifier[private static], parameter[series]] begin[{]
local_variable[type[int], nbTicks]
local_variable[type[Date], dates]
local_variable[type[double], opens]
local_variable[type[double], h... | Keyword[private] Keyword[static] identifier[OHLCDataset] identifier[createOHLCDataset] operator[SEP] identifier[TimeSeries] identifier[series] operator[SEP] {
Keyword[final] Keyword[int] identifier[nbTicks] operator[=] identifier[series] operator[SEP] identifier[getTickCount] operator[SEP] operator[SEP] operator... |
public void setOffscreenPageLimit(int limit) {
if (limit < DEFAULT_OFFSCREEN_PAGES) {
Log.w(TAG, "Requested offscreen page limit " + limit + " too small; defaulting to " +
DEFAULT_OFFSCREEN_PAGES);
limit = DEFAULT_OFFSCREEN_PAGES;
}
if (limit != mOffsc... | class class_name[name] begin[{]
method[setOffscreenPageLimit, return_type[void], modifier[public], parameter[limit]] begin[{]
if[binary_operation[member[.limit], <, member[.DEFAULT_OFFSCREEN_PAGES]]] begin[{]
call[Log.w, parameter[member[.TAG], binary_operation[binary_op... | Keyword[public] Keyword[void] identifier[setOffscreenPageLimit] operator[SEP] Keyword[int] identifier[limit] operator[SEP] {
Keyword[if] operator[SEP] identifier[limit] operator[<] identifier[DEFAULT_OFFSCREEN_PAGES] operator[SEP] {
identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[... |
private Object readNewString(boolean unshared) throws IOException {
Object result = input.readUTF();
if (enableResolve) {
result = resolveObject(result);
}
registerObjectRead(result, nextHandle(), unshared);
return result;
} | class class_name[name] begin[{]
method[readNewString, return_type[type[Object]], modifier[private], parameter[unshared]] begin[{]
local_variable[type[Object], result]
if[member[.enableResolve]] begin[{]
assign[member[.result], call[.resolveObject, parameter[membe... | Keyword[private] identifier[Object] identifier[readNewString] operator[SEP] Keyword[boolean] identifier[unshared] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Object] identifier[result] operator[=] identifier[input] operator[SEP] identifier[readUTF] operator[SEP] operator[SEP] operator[SEP]... |
public static synchronized OfflinePlugin getInstance(@NonNull Context context) {
if (instance == null) {
instance = new OfflinePlugin(context.getApplicationContext());
}
return instance;
} | class class_name[name] begin[{]
method[getInstance, return_type[type[OfflinePlugin]], modifier[synchronized public static], parameter[context]] begin[{]
if[binary_operation[member[.instance], ==, literal[null]]] begin[{]
assign[member[.instance], ClassCreator(arguments=[... | Keyword[public] Keyword[static] Keyword[synchronized] identifier[OfflinePlugin] identifier[getInstance] operator[SEP] annotation[@] identifier[NonNull] identifier[Context] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[instance] operator[==] Other[null] operator[SEP] {
identi... |
public Polygon getHull() {
if(hull == null) {
run(true);
}
DoubleMinMax minmaxX = new DoubleMinMax();
DoubleMinMax minmaxY = new DoubleMinMax();
List<double[]> hullp = new ArrayList<>(hull.size());
for(IntIntPair pair : hull) {
double[] v = points.get(pair.first);
hullp.add(v);... | class class_name[name] begin[{]
method[getHull, return_type[type[Polygon]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.hull], ==, literal[null]]] begin[{]
call[.run, parameter[literal[true]]]
else begin[{]
None
end[}]
loca... | Keyword[public] identifier[Polygon] identifier[getHull] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[hull] operator[==] Other[null] operator[SEP] {
identifier[run] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
identifier[DoubleMinMax] identifier[minma... |
public static Link create(final String text, final TextStyle ts, final File file) {
return new Link(text, ts, file.toURI().toString());
} | class class_name[name] begin[{]
method[create, return_type[type[Link]], modifier[public static], parameter[text, ts, file]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ts, postfix_opera... | Keyword[public] Keyword[static] identifier[Link] identifier[create] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[TextStyle] identifier[ts] , Keyword[final] identifier[File] identifier[file] operator[SEP] {
Keyword[return] Keyword[new] identifier[Link] operator[SE... |
public static Set<Formatter> getFormatters(String s) {
HashSet<Formatter> formatters = new HashSet<Formatter>();
String[] names = s.trim().split("\\s*,\\s*");
for (String fname : names) {
if ("text".equals(fname)) {
formatters.add(TxtFormatter.getInstance());
... | class class_name[name] begin[{]
method[getFormatters, return_type[type[Set]], modifier[public static], parameter[s]] begin[{]
local_variable[type[HashSet], formatters]
local_variable[type[String], names]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Lite... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Formatter] operator[>] identifier[getFormatters] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[HashSet] operator[<] identifier[Formatter] operator[>] identifier[formatters] operator[=] Keyword[new] identifier[HashS... |
public boolean isValid() {
boolean valid = true;
switch (shapeType) {
case POLYLINE_MARKERS:
valid = ((PolylineMarkers) shape).isValid();
break;
case POLYGON_MARKERS:
valid = ((PolygonMarkers) shape).isValid();
br... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], valid]
SwitchStatement(cases=[SwitchStatementCase(case=['POLYLINE_MARKERS'], statements=[StatementExpression(expression=Assignment(expressionl=Member... | Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[valid] operator[=] literal[boolean] operator[SEP] Keyword[switch] operator[SEP] identifier[shapeType] operator[SEP] {
Keyword[case] identifier[POLYLINE_MARKERS] operator[:] identifier[valid]... |
public void stop() {
if (LOG.isInfoEnabled()) {
LOG.info("Esper statement [" + epl + "] being stopped");
}
this.epStatement.stop();
if (LOG.isInfoEnabled()) {
LOG.info("Esper statement [" + epl + "] stopped");
}
} | class class_name[name] begin[{]
method[stop, return_type[void], modifier[public], parameter[]] begin[{]
if[call[LOG.isInfoEnabled, parameter[]]] begin[{]
call[LOG.info, parameter[binary_operation[binary_operation[literal["Esper statement ["], +, member[.epl]], +, literal... | Keyword[public] Keyword[void] identifier[stop] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier... |
public Observable<DeletedStorageBundle> deleteStorageAccountAsync(String vaultBaseUrl, String storageAccountName) {
return deleteStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).map(new Func1<ServiceResponse<DeletedStorageBundle>, DeletedStorageBundle>() {
@Override
... | class class_name[name] begin[{]
method[deleteStorageAccountAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl, storageAccountName]] begin[{]
return[call[.deleteStorageAccountWithServiceResponseAsync, parameter[member[.vaultBaseUrl], member[.storageAccountName]]]]
end[}]
... | Keyword[public] identifier[Observable] operator[<] identifier[DeletedStorageBundle] operator[>] identifier[deleteStorageAccountAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] , identifier[String] identifier[storageAccountName] operator[SEP] {
Keyword[return] identifier[deleteStorageAccountWithS... |
public static StringIdentifierGenerator getInstance(Collection generators) {
if (generators == null) {
throw new IllegalArgumentException(
"Generator collection must not be null");
}
if (generators.size() == 0) {
throw new IllegalArgumentException(
... | class class_name[name] begin[{]
method[getInstance, return_type[type[StringIdentifierGenerator]], modifier[public static], parameter[generators]] begin[{]
if[binary_operation[member[.generators], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(... | Keyword[public] Keyword[static] identifier[StringIdentifierGenerator] identifier[getInstance] operator[SEP] identifier[Collection] identifier[generators] operator[SEP] {
Keyword[if] operator[SEP] identifier[generators] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Ill... |
public SimpleHTMLTag setProperties(Map<String, String> properties) {
if (properties == null || properties.isEmpty()) {
this.properties = null;
} else {
this.properties = new HashMap<>();
for (Entry<String, String> entry : properties.entrySet()) {
... | class class_name[name] begin[{]
method[setProperties, return_type[type[SimpleHTMLTag]], modifier[public], parameter[properties]] begin[{]
if[binary_operation[binary_operation[member[.properties], ==, literal[null]], ||, call[properties.isEmpty, parameter[]]]] begin[{]
as... | Keyword[public] identifier[SimpleHTMLTag] identifier[setProperties] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[properties] operator[==] Other[null] operator[||] identifier[properties] o... |
public QueryParameterWrap addParameters(String name, Object first, Object second,
Object... rest) {
List<Object> parameters = new ArrayList<Object>();
parameters.add(first);
parameters.add(second);
if (notEmpty(rest)) {
parameters.addAll(Arrays.asList(rest));
}
return addParameters(name, param... | class class_name[name] begin[{]
method[addParameters, return_type[type[QueryParameterWrap]], modifier[public], parameter[name, first, second, rest]] begin[{]
local_variable[type[List], parameters]
call[parameters.add, parameter[member[.first]]]
call[parameters.add, param... | Keyword[public] identifier[QueryParameterWrap] identifier[addParameters] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[first] , identifier[Object] identifier[second] , identifier[Object] operator[...] identifier[rest] operator[SEP] {
identifier[List] operator[<] identifier[... |
public final void deleteOccurrence(OccurrenceName name) {
DeleteOccurrenceRequest request =
DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteOccurrence(request);
} | class class_name[name] begin[{]
method[deleteOccurrence, return_type[void], modifier[final public], parameter[name]] begin[{]
local_variable[type[DeleteOccurrenceRequest], request]
call[.deleteOccurrence, parameter[member[.request]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[deleteOccurrence] operator[SEP] identifier[OccurrenceName] identifier[name] operator[SEP] {
identifier[DeleteOccurrenceRequest] identifier[request] operator[=] identifier[DeleteOccurrenceRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[S... |
public void init(String sourceMolFileName, String targetMolFileName, boolean removeHydrogen,
boolean cleanAndConfigureMolecule) throws CDKException {
this.removeHydrogen = removeHydrogen;
init(new MolHandler(sourceMolFileName, cleanAndConfigureMolecule, removeHydrogen), new MolHandler(
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[sourceMolFileName, targetMolFileName, removeHydrogen, cleanAndConfigureMolecule]] begin[{]
assign[THIS[member[None.removeHydrogen]], member[.removeHydrogen]]
call[.init, parameter[ClassCr... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[String] identifier[sourceMolFileName] , identifier[String] identifier[targetMolFileName] , Keyword[boolean] identifier[removeHydrogen] , Keyword[boolean] identifier[cleanAndConfigureMolecule] operator[SEP] Keyword[throws] identifier[CDKException... |
public void createPool(String poolId, String virtualMachineSize,
CloudServiceConfiguration cloudServiceConfiguration, int targetDedicatedNodes)
throws BatchErrorException, IOException {
createPool(poolId, virtualMachineSize, cloudServiceConfiguration, targetDedicatedNodes,... | class class_name[name] begin[{]
method[createPool, return_type[void], modifier[public], parameter[poolId, virtualMachineSize, cloudServiceConfiguration, targetDedicatedNodes]] begin[{]
call[.createPool, parameter[member[.poolId], member[.virtualMachineSize], member[.cloudServiceConfiguration], ... | Keyword[public] Keyword[void] identifier[createPool] operator[SEP] identifier[String] identifier[poolId] , identifier[String] identifier[virtualMachineSize] , identifier[CloudServiceConfiguration] identifier[cloudServiceConfiguration] , Keyword[int] identifier[targetDedicatedNodes] operator[SEP] Keyword[throws] iden... |
public static void fe_frombytes(int[] h,byte[] s)
{
long h0 = load_4(s, 0);
long h1 = load_3(s, 4) << 6;
long h2 = load_3(s, 7) << 5;
long h3 = load_3(s, 10) << 3;
long h4 = load_3(s, 13) << 2;
long h5 = load_4(s, 16);
long h6 = load_3(s, 20) << 7;
long h7 = load_3(s, 23) << 5;
long h8 = load_3(s, 26)... | class class_name[name] begin[{]
method[fe_frombytes, return_type[void], modifier[public static], parameter[h, s]] begin[{]
local_variable[type[long], h0]
local_variable[type[long], h1]
local_variable[type[long], h2]
local_variable[type[long], h3]
local_variable[type[long... | Keyword[public] Keyword[static] Keyword[void] identifier[fe_frombytes] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[h] , Keyword[byte] operator[SEP] operator[SEP] identifier[s] operator[SEP] {
Keyword[long] identifier[h0] operator[=] identifier[load_4] operator[SEP] identifier[s] , Other[0... |
public List<OAuthPermission> convertScopeToPermissions(Client client, List<String> scopes) {
List<OAuthPermission> list = new ArrayList<OAuthPermission>();
for (String scope : scopes) {
if (scope.equals(OAuthConstants.READ_CALENDAR_SCOPE)) {
list.add(READ_CALENDAR_PERMISSION);
} else if (scop... | class class_name[name] begin[{]
method[convertScopeToPermissions, return_type[type[List]], modifier[public], parameter[client, scopes]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberRefe... | Keyword[public] identifier[List] operator[<] identifier[OAuthPermission] operator[>] identifier[convertScopeToPermissions] operator[SEP] identifier[Client] identifier[client] , identifier[List] operator[<] identifier[String] operator[>] identifier[scopes] operator[SEP] {
identifier[List] operator[<] identifier[... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.MCF1RG__CF_LID:
return getCFLid();
case AfplibPackage.MCF1RG__SECTID:
return getSectid();
case AfplibPackage.MCF1RG__CF_NAME:
return getCFName();
case AfplibPackage.MCF1RG_... | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MCF1RG__CF_LID, 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... |
public void rollback() throws BackupException
{
try
{
jdbcConn.rollback();
dbCleaner.rollback();
jdbcConn.commit();
}
catch (SQLException e)
{
throw new BackupException(e);
}
catch (DBCleanException e)
{
throw new BackupEx... | class class_name[name] begin[{]
method[rollback, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=jdbcConn, selectors=[], type_arguments=None... | Keyword[public] Keyword[void] identifier[rollback] operator[SEP] operator[SEP] Keyword[throws] identifier[BackupException] {
Keyword[try] {
identifier[jdbcConn] operator[SEP] identifier[rollback] operator[SEP] operator[SEP] operator[SEP] identifier[dbCleaner] operator[SEP] identifier[rollback] operato... |
private void emailObjectLink(JsonSimple response, String oid, String message) {
String link = urlBase + "default/detail/" + oid;
String text = "This is an automated message from the ";
text += "ReDBox Curation Manager.\n\n" + message;
text += "\n\nYou can find this object here:\n" + link;
email(response, oid,... | class class_name[name] begin[{]
method[emailObjectLink, return_type[void], modifier[private], parameter[response, oid, message]] begin[{]
local_variable[type[String], link]
local_variable[type[String], text]
assign[member[.text], binary_operation[literal["ReDBox Curation Manager... | Keyword[private] Keyword[void] identifier[emailObjectLink] operator[SEP] identifier[JsonSimple] identifier[response] , identifier[String] identifier[oid] , identifier[String] identifier[message] operator[SEP] {
identifier[String] identifier[link] operator[=] identifier[urlBase] operator[+] literal[String] oper... |
public static int checkElementIndex(
int index,
int size,
final Eid eid,
final String messageFormat,
final Object... parameters
) {
if (isSizeIllegal(size)) {
throw new EidIllegalArgumentException(
ensureEid(eid).message(messageFormat, para... | class class_name[name] begin[{]
method[checkElementIndex, return_type[type[int]], modifier[public static], parameter[index, size, eid, messageFormat, parameters]] begin[{]
if[call[.isSizeIllegal, parameter[member[.size]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[M... | Keyword[public] Keyword[static] Keyword[int] identifier[checkElementIndex] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[size] , Keyword[final] identifier[Eid] identifier[eid] , Keyword[final] identifier[String] identifier[messageFormat] , Keyword[final] identifier[Object] operator[...] ide... |
public XcapResponse get(URI uri, Header[] additionalRequestHeaders,
Credentials credentials) throws IOException {
if (log.isDebugEnabled()) {
log.debug("get(uri=" + uri + " , additionalRequestHeaders = ( "
+ Arrays.toString(additionalRequestHeaders) + " ) )");
}
return execute(new HttpGet(uri... | class class_name[name] begin[{]
method[get, return_type[type[XcapResponse]], modifier[public], parameter[uri, additionalRequestHeaders, credentials]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[binary_operation[binary_operation[b... | Keyword[public] identifier[XcapResponse] identifier[get] operator[SEP] identifier[URI] identifier[uri] , identifier[Header] operator[SEP] operator[SEP] identifier[additionalRequestHeaders] , identifier[Credentials] identifier[credentials] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] oper... |
public boolean containsAttr(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetAttr().getMap().containsKey(key);
} | class class_name[name] begin[{]
method[containsAttr, return_type[type[boolean]], modifier[public], parameter[key]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None,... | Keyword[public] Keyword[boolean] identifier[containsAttr] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identi... |
private static boolean isArrayLike(Object object)
{
return object != null && (object.getClass().isArray() || object instanceof Collection);
} | class class_name[name] begin[{]
method[isArrayLike, return_type[type[boolean]], modifier[private static], parameter[object]] begin[{]
return[binary_operation[binary_operation[member[.object], !=, literal[null]], &&, binary_operation[call[object.getClass, parameter[]], ||, binary_operation[member[.objec... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isArrayLike] operator[SEP] identifier[Object] identifier[object] operator[SEP] {
Keyword[return] identifier[object] operator[!=] Other[null] operator[&&] operator[SEP] identifier[object] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] op... |
public static String[] normalizePatterns(final String[] urlPatterns) {
String[] normalized = null;
if (urlPatterns != null) {
normalized = new String[urlPatterns.length];
for (int i = 0; i < urlPatterns.length; i++) {
normalized[i] = normalizePattern(urlPatterns[i]);
}
}
return normalized;
} | class class_name[name] begin[{]
method[normalizePatterns, return_type[type[String]], modifier[public static], parameter[urlPatterns]] begin[{]
local_variable[type[String], normalized]
if[binary_operation[member[.urlPatterns], !=, literal[null]]] begin[{]
assign[m... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[normalizePatterns] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[urlPatterns] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[normalized] operator[=] Other[... |
public boolean matchRule(AuditEvent event, String ruleName, String expectedMessage, String expectedSeverity) {
if (!ruleName.equals(RuleUtil.getName(event))) {
return false;
}
// check message too, for those that have a specific one.
// like GenericIllegalRegexp and Regexp
... | class class_name[name] begin[{]
method[matchRule, return_type[type[boolean]], modifier[public], parameter[event, ruleName, expectedMessage, expectedSeverity]] begin[{]
if[call[ruleName.equals, parameter[call[RuleUtil.getName, parameter[member[.event]]]]]] begin[{]
return[literal[fal... | Keyword[public] Keyword[boolean] identifier[matchRule] operator[SEP] identifier[AuditEvent] identifier[event] , identifier[String] identifier[ruleName] , identifier[String] identifier[expectedMessage] , identifier[String] identifier[expectedSeverity] operator[SEP] {
Keyword[if] operator[SEP] operator[!] ident... |
public OvhBackupFtpAcl serviceName_features_backupFTP_access_ipBlock_GET(String serviceName, String ipBlock) throws IOException {
String qPath = "/dedicated/housing/{serviceName}/features/backupFTP/access/{ipBlock}";
StringBuilder sb = path(qPath, serviceName, ipBlock);
String resp = exec(qPath, "GET", sb.toStrin... | class class_name[name] begin[{]
method[serviceName_features_backupFTP_access_ipBlock_GET, return_type[type[OvhBackupFtpAcl]], modifier[public], parameter[serviceName, ipBlock]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[Strin... | Keyword[public] identifier[OvhBackupFtpAcl] identifier[serviceName_features_backupFTP_access_ipBlock_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[ipBlock] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] lit... |
public static double[] getBiologicalMoleculeCentroid( final Structure asymUnit,List<BiologicalAssemblyTransformation> transformations ) throws IllegalArgumentException {
if ( asymUnit == null ) {
throw new IllegalArgumentException( "null structure" );
}
Atom[] atoms = StructureTools.getAllAtomArray(asymUnit);... | class class_name[name] begin[{]
method[getBiologicalMoleculeCentroid, return_type[type[double]], modifier[public static], parameter[asymUnit, transformations]] begin[{]
if[binary_operation[member[.asymUnit], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argumen... | Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[getBiologicalMoleculeCentroid] operator[SEP] Keyword[final] identifier[Structure] identifier[asymUnit] , identifier[List] operator[<] identifier[BiologicalAssemblyTransformation] operator[>] identifier[transformations] operator[SEP]... |
public static Response get(String url) throws URISyntaxException, HttpException {
return send(new HttpGet(url), null, null);
} | class class_name[name] begin[{]
method[get, return_type[type[Response]], modifier[public static], parameter[url]] begin[{]
return[call[.send, parameter[ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_... | Keyword[public] Keyword[static] identifier[Response] identifier[get] operator[SEP] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[URISyntaxException] , identifier[HttpException] {
Keyword[return] identifier[send] operator[SEP] Keyword[new] identifier[HttpGet] operator[SEP] identifie... |
public static File renameFileWithSystemtime(final File fileToRename)
throws IOException, FileIsADirectoryException
{
final String newFilenameWithSystemtime = appendSystemtimeToFilename(fileToRename);
final File fileWithNewName = new File(fileToRename.getParent(), newFilenameWithSystemtime);
renameFile(fileToRe... | class class_name[name] begin[{]
method[renameFileWithSystemtime, return_type[type[File]], modifier[public static], parameter[fileToRename]] begin[{]
local_variable[type[String], newFilenameWithSystemtime]
local_variable[type[File], fileWithNewName]
call[.renameFile, parameter[me... | Keyword[public] Keyword[static] identifier[File] identifier[renameFileWithSystemtime] operator[SEP] Keyword[final] identifier[File] identifier[fileToRename] operator[SEP] Keyword[throws] identifier[IOException] , identifier[FileIsADirectoryException] {
Keyword[final] identifier[String] identifier[newFilenameWit... |
@Override
public ChronoZonedDateTime<D> with(TemporalAdjuster adjuster) {
return toLocalDate().getChronology().ensureChronoZonedDateTime(super.with(adjuster));
} | class class_name[name] begin[{]
method[with, return_type[type[ChronoZonedDateTime]], modifier[public], parameter[adjuster]] begin[{]
return[call[.toLocalDate, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ChronoZonedDateTime] operator[<] identifier[D] operator[>] identifier[with] operator[SEP] identifier[TemporalAdjuster] identifier[adjuster] operator[SEP] {
Keyword[return] identifier[toLocalDate] operator[SEP] operator[SEP] operator[SEP] identifier[ge... |
private void onItemSelected(TreeItem treeItem) {
treeItem.getElement().focus();
final LinkedList<String> path = resolvePath(treeItem);
formView.clearDisplay();
descView.clearDisplay();
ModelNode address = toAddress(path);
ModelNode displayAddress = address.clone();
... | class class_name[name] begin[{]
method[onItemSelected, return_type[void], modifier[private], parameter[treeItem]] begin[{]
call[treeItem.getElement, parameter[]]
local_variable[type[LinkedList], path]
call[formView.clearDisplay, parameter[]]
call[descView... | Keyword[private] Keyword[void] identifier[onItemSelected] operator[SEP] identifier[TreeItem] identifier[treeItem] operator[SEP] {
identifier[treeItem] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[focus] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifi... |
private GSObject getObjectWithRetry(RetryPolicy retryPolicy) throws ServiceException {
ServiceException lastException = null;
while (retryPolicy.attempt()) {
try {
if (mPos > 0) {
return mClient.getObject(mBucketName, mKey, null, null, null, null, mPos, null);
} else {
... | class class_name[name] begin[{]
method[getObjectWithRetry, return_type[type[GSObject]], modifier[private], parameter[retryPolicy]] begin[{]
local_variable[type[ServiceException], lastException]
while[call[retryPolicy.attempt, parameter[]]] begin[{]
TryStatement(block=[IfStat... | Keyword[private] identifier[GSObject] identifier[getObjectWithRetry] operator[SEP] identifier[RetryPolicy] identifier[retryPolicy] operator[SEP] Keyword[throws] identifier[ServiceException] {
identifier[ServiceException] identifier[lastException] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP]... |
public static Type determine(JSONObject json) {
// This code originally lived in AbstractStreamImplementation.
// I've moved it in here to expose it as a public encapsulation of
// the object type determination logic.
if (!json.isNull("sender")) {
return Type.SENDER;
... | class class_name[name] begin[{]
method[determine, return_type[type[Type]], modifier[public static], parameter[json]] begin[{]
if[call[json.isNull, parameter[literal["sender"]]]] begin[{]
return[member[Type.SENDER]]
else begin[{]
if[call[json.isNull, parameter[lit... | Keyword[public] Keyword[static] identifier[Type] identifier[determine] operator[SEP] identifier[JSONObject] identifier[json] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[json] operator[SEP] identifier[isNull] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[retur... |
public static void fill( DMatrix5x5 a , double v ) {
a.a11 = v; a.a12 = v; a.a13 = v; a.a14 = v; a.a15 = v;
a.a21 = v; a.a22 = v; a.a23 = v; a.a24 = v; a.a25 = v;
a.a31 = v; a.a32 = v; a.a33 = v; a.a34 = v; a.a35 = v;
a.a41 = v; a.a42 = v; a.a43 = v; a.a44 = v; a.a45 = v;
a.a51 ... | class class_name[name] begin[{]
method[fill, return_type[void], modifier[public static], parameter[a, v]] begin[{]
assign[member[a.a11], member[.v]]
assign[member[a.a12], member[.v]]
assign[member[a.a13], member[.v]]
assign[member[a.a14], member[.... | Keyword[public] Keyword[static] Keyword[void] identifier[fill] operator[SEP] identifier[DMatrix5x5] identifier[a] , Keyword[double] identifier[v] operator[SEP] {
identifier[a] operator[SEP] identifier[a11] operator[=] identifier[v] operator[SEP] identifier[a] operator[SEP] identifier[a12] operator[=] identifier... |
public void showStats(Formatter format) {
format.format(" hits= %d miss= %d nfiles= %d elems= %d%n", hits.get(), miss.get(), files.size(), cache.values().size());
} | class class_name[name] begin[{]
method[showStats, return_type[void], modifier[public], parameter[format]] begin[{]
call[format.format, parameter[literal[" hits= %d miss= %d nfiles= %d elems= %d%n"], call[hits.get, parameter[]], call[miss.get, parameter[]], call[files.size, parameter[]], call[c... | Keyword[public] Keyword[void] identifier[showStats] operator[SEP] identifier[Formatter] identifier[format] operator[SEP] {
identifier[format] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[hits] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[miss] operator[S... |
public double getPropAsDouble(String key, double def) {
return Double.parseDouble(getProp(key, String.valueOf(def)));
} | class class_name[name] begin[{]
method[getPropAsDouble, return_type[type[double]], modifier[public], parameter[key, def]] begin[{]
return[call[Double.parseDouble, parameter[call[.getProp, parameter[member[.key], call[String.valueOf, parameter[member[.def]]]]]]]]
end[}]
END[}] | Keyword[public] Keyword[double] identifier[getPropAsDouble] operator[SEP] identifier[String] identifier[key] , Keyword[double] identifier[def] operator[SEP] {
Keyword[return] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[getProp] operator[SEP] identifier[key] , identifier[St... |
public void executeTaskIfMatch(long millis) {
final Lock readLock = lock.readLock();
try {
readLock.lock();
executeTaskIfMatchInternal(millis);
} finally {
readLock.unlock();
}
} | class class_name[name] begin[{]
method[executeTaskIfMatch, return_type[void], modifier[public], parameter[millis]] begin[{]
local_variable[type[Lock], readLock]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[void] identifier[executeTaskIfMatch] operator[SEP] Keyword[long] identifier[millis] operator[SEP] {
Keyword[final] identifier[Lock] identifier[readLock] operator[=] identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
iden... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.MIORG__RG_LENGTH:
setRGLength((Integer)newValue);
return;
case AfplibPackage.MIORG__TRIPLETS:
getTriplets().clear();
getTriplets().addAll((Collection<? extends Tr... | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MIORG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statem... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public static <T> StreamEx<T> of(Enumeration<? extends T> enumeration) {
return of(new Iterator<T>() {
@Override
public boolean hasNext() {
return enumeration.hasMoreElements();
}
@Override
public T next() {
return enum... | class class_name[name] begin[{]
method[of, return_type[type[StreamEx]], modifier[public static], parameter[enumeration]] begin[{]
return[call[.of, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodI... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[StreamEx] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[Enumeration] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[enumeration] operator[SEP] {
Keyword[return] identifi... |
private static String sanitizeAndJoinEnumValues(String value, String[] otherValues) {
StringBuilder sb = new StringBuilder(sanitizeEnumValue(value));
for (int i = 0; i < otherValues.length; i++) {
sb.append(',').append(sanitizeEnumValue(otherValues[i]));
}
return sb.toString();
} | class class_name[name] begin[{]
method[sanitizeAndJoinEnumValues, return_type[type[String]], modifier[private static], parameter[value, otherValues]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodIn... | Keyword[private] Keyword[static] identifier[String] identifier[sanitizeAndJoinEnumValues] operator[SEP] identifier[String] identifier[value] , identifier[String] operator[SEP] operator[SEP] identifier[otherValues] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[Strin... |
public static String formatHttpDate(Date date) {
if (null == date) {
return null;
}
return DatePattern.HTTP_DATETIME_FORMAT.format(date);
} | class class_name[name] begin[{]
method[formatHttpDate, return_type[type[String]], modifier[public static], parameter[date]] begin[{]
if[binary_operation[literal[null], ==, member[.date]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[call[Da... | Keyword[public] Keyword[static] identifier[String] identifier[formatHttpDate] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[date] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[return] id... |
private String downJson(String url) {
// 构造HttpClient的实例
HttpClient httpClient = new HttpClient();
// 创建GET方法的实例
GetMethod method = new GetMethod(url);
try {
// 执行GetMethod
int statusCode = httpClient.executeMethod(method);
LOGGER.info("响应代码:" ... | class class_name[name] begin[{]
method[downJson, return_type[type[String]], modifier[private], parameter[url]] begin[{]
local_variable[type[HttpClient], httpClient]
local_variable[type[GetMethod], method]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Variable... | Keyword[private] identifier[String] identifier[downJson] operator[SEP] identifier[String] identifier[url] operator[SEP] {
identifier[HttpClient] identifier[httpClient] operator[=] Keyword[new] identifier[HttpClient] operator[SEP] operator[SEP] operator[SEP] identifier[GetMethod] identifier[method] operator[=] Ke... |
@Override
public long until(Temporal endExclusive, TemporalUnit unit) {
LocalDate end = LocalDate.from(endExclusive);
if (unit instanceof ChronoUnit) {
switch ((ChronoUnit) unit) {
case DAYS: return daysUntil(end);
case WEEKS: return daysUntil(end) / 7;
... | class class_name[name] begin[{]
method[until, return_type[type[long]], modifier[public], parameter[endExclusive, unit]] begin[{]
local_variable[type[LocalDate], end]
if[binary_operation[member[.unit], instanceof, type[ChronoUnit]]] begin[{]
SwitchStatement(cases=[SwitchState... | annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[until] operator[SEP] identifier[Temporal] identifier[endExclusive] , identifier[TemporalUnit] identifier[unit] operator[SEP] {
identifier[LocalDate] identifier[end] operator[=] identifier[LocalDate] operator[SEP] identifier[from] operat... |
private Edge initNewEdge(GDLParser.EdgeBodyContext edgeBodyContext, boolean isIncoming) {
boolean hasBody = edgeBodyContext != null;
Edge e = new Edge();
e.setId(getNewEdgeId());
e.setSourceVertexId(getSourceVertexId(isIncoming));
e.setTargetVertexId(getTargetVertexId(isIncoming));
if (hasBody)... | class class_name[name] begin[{]
method[initNewEdge, return_type[type[Edge]], modifier[private], parameter[edgeBodyContext, isIncoming]] begin[{]
local_variable[type[boolean], hasBody]
local_variable[type[Edge], e]
call[e.setId, parameter[call[.getNewEdgeId, parameter[]]]]
... | Keyword[private] identifier[Edge] identifier[initNewEdge] operator[SEP] identifier[GDLParser] operator[SEP] identifier[EdgeBodyContext] identifier[edgeBodyContext] , Keyword[boolean] identifier[isIncoming] operator[SEP] {
Keyword[boolean] identifier[hasBody] operator[=] identifier[edgeBodyContext] operator[!=] ... |
public void init(BaseField field, BasePanel screenParent, BasePanel subScreen)
{
super.init(field);
m_iCurrentScreenNo = -1;
m_screenParent = screenParent;
this.setCurrentSubScreen(subScreen);
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[field, screenParent, subScreen]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operat... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[BaseField] identifier[field] , identifier[BasePanel] identifier[screenParent] , identifier[BasePanel] identifier[subScreen] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[field] operator[SEP] operato... |
public Role createRole(Role roleParam)
{
if(roleParam != null && this.serviceTicket != null)
{
roleParam.setServiceTicket(this.serviceTicket);
}
return new Role(this.putJson(
roleParam, WS.Path.Role.Version1.roleCreate()));
} | class class_name[name] begin[{]
method[createRole, return_type[type[Role]], modifier[public], parameter[roleParam]] begin[{]
if[binary_operation[binary_operation[member[.roleParam], !=, literal[null]], &&, binary_operation[THIS[member[None.serviceTicket]], !=, literal[null]]]] begin[{]
... | Keyword[public] identifier[Role] identifier[createRole] operator[SEP] identifier[Role] identifier[roleParam] operator[SEP] {
Keyword[if] operator[SEP] identifier[roleParam] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] identifier[serviceTicket] operator[!=] Other[null] operator[SEP] {
... |
public static double sinusProduct(int start, int end, double[] alpha) {
double result = 1;
for(int j = start; j < end; j++) {
result *= FastMath.sin(alpha[j]);
}
return result;
} | class class_name[name] begin[{]
method[sinusProduct, return_type[type[double]], modifier[public static], parameter[start, end, alpha]] begin[{]
local_variable[type[double], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=Mem... | Keyword[public] Keyword[static] Keyword[double] identifier[sinusProduct] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] , Keyword[double] operator[SEP] operator[SEP] identifier[alpha] operator[SEP] {
Keyword[double] identifier[result] operator[=] Other[1] operator[SEP] Keyword[for]... |
protected boolean doMatch(String pattern, String path, boolean fullMatch, Map<String, String> uriTemplateVariables) {
if (path.startsWith(pathSeparator) != pattern.startsWith(pathSeparator)) {
return false;
}
String[] pattDirs = tokenize(pattern);
String[] pathDirs = tokeni... | class class_name[name] begin[{]
method[doMatch, return_type[type[boolean]], modifier[protected], parameter[pattern, path, fullMatch, uriTemplateVariables]] begin[{]
if[binary_operation[call[path.startsWith, parameter[member[.pathSeparator]]], !=, call[pattern.startsWith, parameter[member[.pathS... | Keyword[protected] Keyword[boolean] identifier[doMatch] operator[SEP] identifier[String] identifier[pattern] , identifier[String] identifier[path] , Keyword[boolean] identifier[fullMatch] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[uriTemplateVariables] operator[SEP]... |
public Map<String, Long> getDataSourceSizes()
{
return dataSources.entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getTotalSegmentSize()));
} | class class_name[name] begin[{]
method[getDataSourceSizes, return_type[type[Map]], modifier[public], parameter[]] begin[{]
return[call[dataSources.entrySet, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] identifier[getDataSourceSizes] operator[SEP] operator[SEP] {
Keyword[return] identifier[dataSources] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operato... |
public User getLimits() throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_LIMITS);
Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
if (response.isError()) {
... | class class_name[name] begin[{]
method[getLimits, return_type[type[User]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], parameters]
call[parameters.put, parameter[literal["method"], member[.METHOD_GET_LIMITS]]]
local_variable[type[Response], response]
... | Keyword[public] identifier[User] identifier[getLimits] operator[SEP] operator[SEP] Keyword[throws] identifier[FlickrException] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , i... |
public static <T> ObjIntConsumer<T> objIntConsumer(CheckedObjIntConsumer<T> consumer) {
return Unchecked.objIntConsumer(consumer, Unchecked.RETHROW_ALL);
} | class class_name[name] begin[{]
method[objIntConsumer, return_type[type[ObjIntConsumer]], modifier[public static], parameter[consumer]] begin[{]
return[call[Unchecked.objIntConsumer, parameter[member[.consumer], member[Unchecked.RETHROW_ALL]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ObjIntConsumer] operator[<] identifier[T] operator[>] identifier[objIntConsumer] operator[SEP] identifier[CheckedObjIntConsumer] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] {
Keyword[return] identifier[U... |
@Override
public void processMessage(WebSocketMessage webSocketData) throws FrameworkException {
setDoTransactionNotifications(true);
final String mode = webSocketData.getNodeDataStringValue("mode"); // default: list start | pause | resume | cancel | abort
final Long jobId ... | class class_name[name] begin[{]
method[processMessage, return_type[void], modifier[public], parameter[webSocketData]] begin[{]
call[.setDoTransactionNotifications, parameter[literal[true]]]
local_variable[type[String], mode]
local_variable[type[Long], jobId]
local_variab... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[processMessage] operator[SEP] identifier[WebSocketMessage] identifier[webSocketData] operator[SEP] Keyword[throws] identifier[FrameworkException] {
identifier[setDoTransactionNotifications] operator[SEP] literal[boolean] operator[SEP] op... |
public static void executeCommand(String[] args) throws Exception {
String subCmd = (args.length > 0) ? args[0] : "";
args = AdminToolUtils.copyArrayCutFirst(args);
if(subCmd.equals("async-job")) {
AdminCommandAsyncJob.executeCommand(args);
} else if(subCmd.equals("scheduled"... | class class_name[name] begin[{]
method[executeCommand, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[String], subCmd]
assign[member[.args], call[AdminToolUtils.copyArrayCutFirst, parameter[member[.args]]]]
if[call[subCmd.equals... | Keyword[public] Keyword[static] Keyword[void] identifier[executeCommand] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[subCmd] operator[=] operator[SEP] identifier[args] operator[SEP] identifier[le... |
public DefaultSwidProcessor setTagCreator(final String tagCreatorName, final String tagCreatorRegId) {
swidTag.setTagCreator(
new EntityComplexType(
new Token(tagCreatorName, idGenerator.nextId()),
new RegistrationId(tagCreatorRegId, idGenerator.ne... | class class_name[name] begin[{]
method[setTagCreator, return_type[type[DefaultSwidProcessor]], modifier[public], parameter[tagCreatorName, tagCreatorRegId]] begin[{]
call[swidTag.setTagCreator, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=tagCreatorName, post... | Keyword[public] identifier[DefaultSwidProcessor] identifier[setTagCreator] operator[SEP] Keyword[final] identifier[String] identifier[tagCreatorName] , Keyword[final] identifier[String] identifier[tagCreatorRegId] operator[SEP] {
identifier[swidTag] operator[SEP] identifier[setTagCreator] operator[SEP] Keyword[... |
public void marshall(BatchListObjectParentPathsResponse batchListObjectParentPathsResponse, ProtocolMarshaller protocolMarshaller) {
if (batchListObjectParentPathsResponse == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
proto... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[batchListObjectParentPathsResponse, protocolMarshaller]] begin[{]
if[binary_operation[member[.batchListObjectParentPathsResponse], ==, literal[null]]] begin[{]
ThrowStatement(expression=C... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchListObjectParentPathsResponse] identifier[batchListObjectParentPathsResponse] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[batchListObjectParentPathsResponse] ... |
public void assertIsNaN(Description description, Float actual) {
comparables.assertEqual(description, actual, Float.NaN);
} | class class_name[name] begin[{]
method[assertIsNaN, return_type[void], modifier[public], parameter[description, actual]] begin[{]
call[comparables.assertEqual, parameter[member[.description], member[.actual], member[Float.NaN]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[assertIsNaN] operator[SEP] identifier[Description] identifier[description] , identifier[Float] identifier[actual] operator[SEP] {
identifier[comparables] operator[SEP] identifier[assertEqual] operator[SEP] identifier[description] , identifier[actual] , identifier[Float... |
final public double score(StringWrapper s,StringWrapper t)
{
BagOfTokens sBag = (BagOfTokens)s;
BagOfTokens tBag = (BagOfTokens)t;
double sum = 0;
for (Iterator i = sBag.tokenIterator(); i.hasNext(); ) {
Token tok = (Token)i.next();
if (tBag.contains(tok)) {
double ps = sBag.getWeight(tok);
... | class class_name[name] begin[{]
method[score, return_type[type[double]], modifier[final public], parameter[s, t]] begin[{]
local_variable[type[BagOfTokens], sBag]
local_variable[type[BagOfTokens], tBag]
local_variable[type[double], sum]
ForStatement(body=BlockStatement(label=Non... | Keyword[final] Keyword[public] Keyword[double] identifier[score] operator[SEP] identifier[StringWrapper] identifier[s] , identifier[StringWrapper] identifier[t] operator[SEP] {
identifier[BagOfTokens] identifier[sBag] operator[=] operator[SEP] identifier[BagOfTokens] operator[SEP] identifier[s] operator[SEP] id... |
public static boolean valueOf(String value) {
return (value != null) && (value.trim().equalsIgnoreCase("true") || value.trim().equals("1"));
} | class class_name[name] begin[{]
method[valueOf, return_type[type[boolean]], modifier[public static], parameter[value]] begin[{]
return[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, binary_operation[call[value.trim, parameter[]], ||, call[value.trim, parameter[]]]]]
end[}... | Keyword[public] Keyword[static] Keyword[boolean] identifier[valueOf] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[return] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[value] operator[SEP] identifier[trim] operator[SEP] ... |
private boolean setChild2(N newChild) {
if (this.child2 == newChild) {
return false;
}
if (this.child2 != null) {
this.child2.setParentNodeReference(null, true);
--this.notNullChildCount;
firePropertyChildRemoved(1, this.child2);
}
if (newChild != null) {
final N oldParent = newChild.getParen... | class class_name[name] begin[{]
method[setChild2, return_type[type[boolean]], modifier[private], parameter[newChild]] begin[{]
if[binary_operation[THIS[member[None.child2]], ==, member[.newChild]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[boolean] identifier[setChild2] operator[SEP] identifier[N] identifier[newChild] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[child2] operator[==] identifier[newChild] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
... |
public static String ipV4Address() {
StringBuffer sb = new StringBuffer();
sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");
sb.append(".");
sb.append(JDefaultNumber.randomIntBetweenTwoNumbers(2, 254) + "");
sb.append(".");
sb.append(JDefaultNumber.random... | class class_name[name] begin[{]
method[ipV4Address, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[StringBuffer], sb]
call[sb.append, parameter[binary_operation[call[JDefaultNumber.randomIntBetweenTwoNumbers, parameter[literal[2], literal[2... | Keyword[public] Keyword[static] identifier[String] identifier[ipV4Address] operator[SEP] operator[SEP] {
identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[JDe... |
private static void prepare_range_limit_table() {
sample_range_limit.position(256);
for (int i = 0; i < 128; i++) {
sample_range_limit.put(i);
}
for (int i = -128; i < 0; i++) {
sample_range_limit.put(i);
}
for (int i = 0; i < 256 + 128; i++) {
... | class class_name[name] begin[{]
method[prepare_range_limit_table, return_type[void], modifier[private static], parameter[]] begin[{]
call[sample_range_limit.position, parameter[literal[256]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodI... | Keyword[private] Keyword[static] Keyword[void] identifier[prepare_range_limit_table] operator[SEP] operator[SEP] {
identifier[sample_range_limit] operator[SEP] identifier[position] operator[SEP] Other[256] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] oper... |
public TrxMessageHeader createProcessMessageHeader(MessageDetailTarget recMessageDetailTarget, String strMessageTransport)
{
if ((this.getEditMode() != DBConstants.EDIT_CURRENT) && (this.getEditMode() != DBConstants.EDIT_IN_PROGRESS))
return null; // Must have a valid record
TrxMessag... | class class_name[name] begin[{]
method[createProcessMessageHeader, return_type[type[TrxMessageHeader]], modifier[public], parameter[recMessageDetailTarget, strMessageTransport]] begin[{]
if[binary_operation[binary_operation[THIS[call[None.getEditMode, parameter[]]], !=, member[DBConstants.EDIT_... | Keyword[public] identifier[TrxMessageHeader] identifier[createProcessMessageHeader] operator[SEP] identifier[MessageDetailTarget] identifier[recMessageDetailTarget] , identifier[String] identifier[strMessageTransport] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier... |
public Object getArgumentValue() {
try {
return getUnderlyingField().get(getContainingObject());
} catch (final IllegalAccessException e) {
throw new CommandLineException.ShouldNeverReachHereException(
"This shouldn't happen since we setAccessible(true).", e);... | class class_name[name] begin[{]
method[getArgumentValue, return_type[type[Object]], modifier[public], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getUnderlyingField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodIn... | Keyword[public] identifier[Object] identifier[getArgumentValue] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[getUnderlyingField] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[getContainingObject] operator[SEP] operator[SEP] operator[SEP] ... |
public <O extends BaseOption> ArgumentParser add(O option) {
if (option.getName() != null) {
if (longNameOptions.containsKey(option.getName())) {
throw new IllegalArgumentException("Option " + option.getName() + " already exists");
}
if (parent != null && pare... | class class_name[name] begin[{]
method[add, return_type[type[ArgumentParser]], modifier[public], parameter[option]] begin[{]
if[binary_operation[call[option.getName, parameter[]], !=, literal[null]]] begin[{]
if[call[longNameOptions.containsKey, parameter[call[option.get... | Keyword[public] operator[<] identifier[O] Keyword[extends] identifier[BaseOption] operator[>] identifier[ArgumentParser] identifier[add] operator[SEP] identifier[O] identifier[option] operator[SEP] {
Keyword[if] operator[SEP] identifier[option] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operat... |
@Override
public void pushExcludedValidatorIdToStack(String validatorId)
{
if (_excludedValidatorIdsStack == null)
{
_excludedValidatorIdsStack = new LinkedList<String>();
}
_excludedValidatorIdsStack.addFirst(validatorId);
} | class class_name[name] begin[{]
method[pushExcludedValidatorIdToStack, return_type[void], modifier[public], parameter[validatorId]] begin[{]
if[binary_operation[member[._excludedValidatorIdsStack], ==, literal[null]]] begin[{]
assign[member[._excludedValidatorIdsStack], ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[pushExcludedValidatorIdToStack] operator[SEP] identifier[String] identifier[validatorId] operator[SEP] {
Keyword[if] operator[SEP] identifier[_excludedValidatorIdsStack] operator[==] Other[null] operator[SEP] {
identifier[_exc... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.PPO__RG:
getRG().clear();
getRG().addAll((Collection<? extends PPORG>)newValue);
return;
}
super.eSet(featureID, newValue);
} | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PPO__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Sta... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public java.util.List<String> getEventCategories() {
if (eventCategories == null) {
eventCategories = new com.amazonaws.internal.SdkInternalList<String>();
}
return eventCategories;
} | class class_name[name] begin[{]
method[getEventCategories, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.eventCategories], ==, literal[null]]] begin[{]
assign[member[.eventCategories], ClassCreator(arguments=[], body=None, c... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getEventCategories] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[eventCategories] operator[==] Other[null] operator[SEP] {
identifi... |
public HttpConnection execute(HttpConnection connection) {
//set our HttpUrlFactory on the connection
connection.connectionFactory = factory;
// all CouchClient requests want to receive application/json responses
connection.requestProperties.put("Accept", "application/json");
c... | class class_name[name] begin[{]
method[execute, return_type[type[HttpConnection]], modifier[public], parameter[connection]] begin[{]
assign[member[connection.connectionFactory], member[.factory]]
call[connection.requestProperties.put, parameter[literal["Accept"], literal["applic... | Keyword[public] identifier[HttpConnection] identifier[execute] operator[SEP] identifier[HttpConnection] identifier[connection] operator[SEP] {
identifier[connection] operator[SEP] identifier[connectionFactory] operator[=] identifier[factory] operator[SEP] identifier[connection] operator[SEP] identifier[requestPr... |
public void setIncludes(String includes) {
// Split the string into separate file globs.
String[] globs = includes.split("[\\s,]+");
// Loop over these globs and create dirsets from them.
// Do not set the root directory until the task is
// executed.
for (String glob :... | class class_name[name] begin[{]
method[setIncludes, return_type[void], modifier[public], parameter[includes]] begin[{]
local_variable[type[String], globs]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions... | Keyword[public] Keyword[void] identifier[setIncludes] operator[SEP] identifier[String] identifier[includes] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[globs] operator[=] identifier[includes] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] K... |
public boolean containsMountPoints(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetMountPoints().getMap().containsKey(key);
} | class class_name[name] begin[{]
method[containsMountPoints, return_type[type[boolean]], modifier[public], parameter[key]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_argument... | Keyword[public] Keyword[boolean] identifier[containsMountPoints] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new]... |
public ServiceFuture<CertificateInner> getByResourceGroupAsync(String resourceGroupName, String name, final ServiceCallback<CertificateInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, name), serviceCallback);
} | class class_name[name] begin[{]
method[getByResourceGroupAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, name, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getByResourceGroupWithServiceResponseAsync, parameter[member[.resourc... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[CertificateInner] operator[>] identifier[getByResourceGroupAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[CertificateInner] ... |
private List<File> scanFileSets() {
final List<File> list = new ArrayList<File>();
for (int i = 0; i < fileSets.size(); i++) {
FileSet fs = fileSets.get(i);
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
ds.scan();
String[] names = ds.getInc... | class class_name[name] begin[{]
method[scanFileSets, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]... | Keyword[private] identifier[List] operator[<] identifier[File] operator[>] identifier[scanFileSets] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[File] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] opera... |
private void startQueuedNonPersistentTimerAlarms() {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (EJSPlatformHelper.isZOSCRA()) // d684950
{
if (isTraceOn && tc.isDebugEnabled())
Tr.debug(tc, "startQueuedNonPersistentTimerAlarms: skipped in adj... | class class_name[name] begin[{]
method[startQueuedNonPersistentTimerAlarms, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[boolean], isTraceOn]
if[call[EJSPlatformHelper.isZOSCRA, parameter[]]] begin[{]
if[binary_operation[member[... | Keyword[private] Keyword[void] identifier[startQueuedNonPersistentTimerAlarms] operator[SEP] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SE... |
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) {
assert(queryExpr != null);
if (queryExpr.getLeftQueryExpression() == null) {
// end of recursion. This is a QuerySpecification
assert(queryExpr instanceof QuerySpecification);
Query... | class class_name[name] begin[{]
method[getDisplayColumnsForSetOp, return_type[type[List]], modifier[private static], parameter[queryExpr]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=queryExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Expression] operator[>] identifier[getDisplayColumnsForSetOp] operator[SEP] identifier[QueryExpression] identifier[queryExpr] operator[SEP] {
Keyword[assert] operator[SEP] identifier[queryExpr] operator[!=] Other[null] operator[SEP] operato... |
private MultiValueMap<String, String> buildGeoParameters(double latitude, double longitude, PlaceType granularity, String accuracy, String query) {
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>();
parameters.set("lat", String.valueOf(latitude));
parameters.set("long", String.v... | class class_name[name] begin[{]
method[buildGeoParameters, return_type[type[MultiValueMap]], modifier[private], parameter[latitude, longitude, granularity, accuracy, query]] begin[{]
local_variable[type[MultiValueMap], parameters]
call[parameters.set, parameter[literal["lat"], call[Stri... | Keyword[private] identifier[MultiValueMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[buildGeoParameters] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[longitude] , identifier[PlaceType] identifier[granularity] , identifier[String] identifier[accurac... |
@VisibleForTesting
static List<Interval> filterSkipIntervals(Interval totalInterval, List<Interval> skipIntervals)
{
final List<Interval> filteredIntervals = new ArrayList<>(skipIntervals.size() + 1);
DateTime remainingStart = totalInterval.getStart();
DateTime remainingEnd = totalInterval.getEnd();
... | class class_name[name] begin[{]
method[filterSkipIntervals, return_type[type[List]], modifier[static], parameter[totalInterval, skipIntervals]] begin[{]
local_variable[type[List], filteredIntervals]
local_variable[type[DateTime], remainingStart]
local_variable[type[DateTime], remainingE... | annotation[@] identifier[VisibleForTesting] Keyword[static] identifier[List] operator[<] identifier[Interval] operator[>] identifier[filterSkipIntervals] operator[SEP] identifier[Interval] identifier[totalInterval] , identifier[List] operator[<] identifier[Interval] operator[>] identifier[skipIntervals] operator[SEP] ... |
protected void init(Context context, AttributeSet attrs, int defStyle) {
// Load custom attributes
final int layoutId;
final CharSequence floatLabelText;
final int floatLabelTextAppearance;
final int floatLabelTextColor;
final float floatLabelTextSize;
if (attrs ... | class class_name[name] begin[{]
method[init, return_type[void], modifier[protected], parameter[context, attrs, defStyle]] begin[{]
local_variable[type[int], layoutId]
local_variable[type[CharSequence], floatLabelText]
local_variable[type[int], floatLabelTextAppearance]
local_var... | Keyword[protected] Keyword[void] identifier[init] operator[SEP] identifier[Context] identifier[context] , identifier[AttributeSet] identifier[attrs] , Keyword[int] identifier[defStyle] operator[SEP] {
Keyword[final] Keyword[int] identifier[layoutId] operator[SEP] Keyword[final] identifier[CharSequence] identif... |
@SuppressWarnings("unchecked")
public List<T> build() {
final List<T> retValue = new ArrayList<T>();
for (final RESTBaseElementV1<?> element : entities) {
final T wrapper = RESTEntityWrapperBuilder.newBuilder()
.providerFactory(providerFactory)
.en... | class class_name[name] begin[{]
method[build, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], retValue]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[T] operator[>] identifier[build] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[T] operator[>] identifier[retValue] operator[=] Keyw... |
@Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectOneOfImpl instance) throws SerializationException {
deserialize(streamReader, instance);
} | class class_name[name] begin[{]
method[deserializeInstance, return_type[void], modifier[public], parameter[streamReader, instance]] begin[{]
call[.deserialize, parameter[member[.streamReader], member[.instance]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deserializeInstance] operator[SEP] identifier[SerializationStreamReader] identifier[streamReader] , identifier[OWLObjectOneOfImpl] identifier[instance] operator[SEP] Keyword[throws] identifier[SerializationException] {
identifier[deseri... |
public OperationFuture<Server> modifyPublicIp(Server server, ModifyPublicIpConfig config) {
checkNotNull(config, CHECK_PUBLIC_IP_CONFIG);
List<IpAddress> ipAddresses = findByRef(server).getDetails().getIpAddresses();
List<String> responseIds = ipAddresses.stream()
.map(IpAddress::ge... | class class_name[name] begin[{]
method[modifyPublicIp, return_type[type[OperationFuture]], modifier[public], parameter[server, config]] begin[{]
call[.checkNotNull, parameter[member[.config], member[.CHECK_PUBLIC_IP_CONFIG]]]
local_variable[type[List], ipAddresses]
local_variabl... | Keyword[public] identifier[OperationFuture] operator[<] identifier[Server] operator[>] identifier[modifyPublicIp] operator[SEP] identifier[Server] identifier[server] , identifier[ModifyPublicIpConfig] identifier[config] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[config] , identifier[CHEC... |
public static Configuration copyConfiguration(final Configuration original) {
Configuration copy = new MapConfiguration(new HashMap<String, Object>());
for (Iterator<?> i = original.getKeys(); i.hasNext();) {
String key = (String) i.next();
Object value = original.getProperty(key);
if (value instanceof L... | class class_name[name] begin[{]
method[copyConfiguration, return_type[type[Configuration]], modifier[public static], parameter[original]] begin[{]
local_variable[type[Configuration], copy]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarat... | Keyword[public] Keyword[static] identifier[Configuration] identifier[copyConfiguration] operator[SEP] Keyword[final] identifier[Configuration] identifier[original] operator[SEP] {
identifier[Configuration] identifier[copy] operator[=] Keyword[new] identifier[MapConfiguration] operator[SEP] Keyword[new] identifie... |
public static String getPreviewContent(
HttpServletRequest request,
HttpServletResponse response,
CmsObject cms,
CmsResource resource,
Locale locale) {
try {
if (CmsResourceTypeXmlContent.isXmlContent(resource)) {
CmsADEConfigData adeConfig = ... | class class_name[name] begin[{]
method[getPreviewContent, return_type[type[String]], modifier[public static], parameter[request, response, cms, resource, locale]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix... | Keyword[public] Keyword[static] identifier[String] identifier[getPreviewContent] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] , identifier[Locale] identif... |
public WikiStyleRenderer getWikiStyleRenderer() {
if (wikiStyleRenderer != null) {
return wikiStyleRenderer;
}
wikiStyleRenderer = (WikiStyleRenderer) ContainerManager.getComponent("wikiStyleRenderer");
return wikiStyleRenderer;
} | class class_name[name] begin[{]
method[getWikiStyleRenderer, return_type[type[WikiStyleRenderer]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.wikiStyleRenderer], !=, literal[null]]] begin[{]
return[member[.wikiStyleRenderer]]
else begin[{]
None
... | Keyword[public] identifier[WikiStyleRenderer] identifier[getWikiStyleRenderer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[wikiStyleRenderer] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[wikiStyleRenderer] operator[SEP]
}
identifier[wikiStyle... |
public MethodDoc findMatchingMethod(MethodDoc method, MethodFinder mf) {
// Look in this class's interface set
MethodDoc md = findMatchingInterfaceMethod(method, mf);
if (md != null) {
return md;
}
// Look in this class's superclass ancestry
ClassDoc superC... | class class_name[name] begin[{]
method[findMatchingMethod, return_type[type[MethodDoc]], modifier[public], parameter[method, mf]] begin[{]
local_variable[type[MethodDoc], md]
if[binary_operation[member[.md], !=, literal[null]]] begin[{]
return[member[.md]]
else begin... | Keyword[public] identifier[MethodDoc] identifier[findMatchingMethod] operator[SEP] identifier[MethodDoc] identifier[method] , identifier[MethodFinder] identifier[mf] operator[SEP] {
identifier[MethodDoc] identifier[md] operator[=] identifier[findMatchingInterfaceMethod] operator[SEP] identifier[method] , ident... |
public void marshall(ModelPackageValidationProfile modelPackageValidationProfile, ProtocolMarshaller protocolMarshaller) {
if (modelPackageValidationProfile == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.m... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[modelPackageValidationProfile, protocolMarshaller]] begin[{]
if[binary_operation[member[.modelPackageValidationProfile], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ModelPackageValidationProfile] identifier[modelPackageValidationProfile] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[modelPackageValidationProfile] operator[==] Ot... |
public static void putLibrary(String key, String path, Object value) {
if (key.startsWith(DicLibrary.DEFAULT)) {
DicLibrary.put(key, path, (Forest) value);
} else if (key.startsWith(StopLibrary.DEFAULT)) {
StopLibrary.put(key, path, (StopRecognition) value);
} else if (ke... | class class_name[name] begin[{]
method[putLibrary, return_type[void], modifier[public static], parameter[key, path, value]] begin[{]
if[call[key.startsWith, parameter[member[DicLibrary.DEFAULT]]]] begin[{]
call[DicLibrary.put, parameter[member[.key], member[.path], Cast(... | Keyword[public] Keyword[static] Keyword[void] identifier[putLibrary] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[path] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[startsWith] operator[SEP] identif... |
public static BigFloat min(BigFloat value1, BigFloat... values) {
BigFloat result = value1;
for (BigFloat other : values) {
result = min(result, other);
}
return result;
} | class class_name[name] begin[{]
method[min, return_type[type[BigFloat]], modifier[public static], parameter[value1, values]] begin[{]
local_variable[type[BigFloat], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberRefer... | Keyword[public] Keyword[static] identifier[BigFloat] identifier[min] operator[SEP] identifier[BigFloat] identifier[value1] , identifier[BigFloat] operator[...] identifier[values] operator[SEP] {
identifier[BigFloat] identifier[result] operator[=] identifier[value1] operator[SEP] Keyword[for] operator[SEP] ident... |
@Override
public ListVerifiedEmailAddressesResult listVerifiedEmailAddresses(ListVerifiedEmailAddressesRequest request) {
request = beforeClientExecution(request);
return executeListVerifiedEmailAddresses(request);
} | class class_name[name] begin[{]
method[listVerifiedEmailAddresses, return_type[type[ListVerifiedEmailAddressesResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListVerifiedEmai... | annotation[@] identifier[Override] Keyword[public] identifier[ListVerifiedEmailAddressesResult] identifier[listVerifiedEmailAddresses] operator[SEP] identifier[ListVerifiedEmailAddressesRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] id... |
public void startUncurated(Configuration conf) throws Exception{
IDatabaseDev db = (IDatabaseDev) em.getDB();//TODO make sure DB platform can be used for development
ModelDefinitionProvider provider = new ModelDefinitionProvider(db, conf.dbUser, null, conf.includeSchema);
ModelDef[] origModelList = provider.getTa... | class class_name[name] begin[{]
method[startUncurated, return_type[void], modifier[public], parameter[conf]] begin[{]
local_variable[type[IDatabaseDev], db]
local_variable[type[ModelDefinitionProvider], provider]
local_variable[type[ModelDef], origModelList]
local_variable[type[... | Keyword[public] Keyword[void] identifier[startUncurated] operator[SEP] identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[IDatabaseDev] identifier[db] operator[=] operator[SEP] identifier[IDatabaseDev] operator[SEP] identifier[em] operator[SEP] identifier[... |
public static Function<Triple, Triple> unskolemizeTriples(final ResourceService svc, final String baseUrl) {
return triple -> rdf.createTriple((BlankNodeOrIRI) svc.toExternal(svc.unskolemize(triple.getSubject()),
baseUrl), triple.getPredicate(), svc.toExternal(svc.unskolemize(triple.getObjec... | class class_name[name] begin[{]
method[unskolemizeTriples, return_type[type[Function]], modifier[public static], parameter[svc, baseUrl]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=... | Keyword[public] Keyword[static] identifier[Function] operator[<] identifier[Triple] , identifier[Triple] operator[>] identifier[unskolemizeTriples] operator[SEP] Keyword[final] identifier[ResourceService] identifier[svc] , Keyword[final] identifier[String] identifier[baseUrl] operator[SEP] {
Keyword[return] id... |
public void activateAsynchConsumer(boolean deliveryImmediately)
throws SISessionUnavailableException, SISessionDroppedException,
SIConnectionUnavailableException, SIConnectionDroppedException,
SIResourceException, SIConnectionLostException,
SIErrorException
{
if (Tr... | class class_name[name] begin[{]
method[activateAsynchConsumer, return_type[void], modifier[public], parameter[deliveryImmediately]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entr... | Keyword[public] Keyword[void] identifier[activateAsynchConsumer] operator[SEP] Keyword[boolean] identifier[deliveryImmediately] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifier[SIConnectionUnavailableException] , identifier[SIConnectionDropp... |
public void setOptions(com.google.api.ads.admanager.axis.v201808.CustomFieldOption[] options) {
this.options = options;
} | class class_name[name] begin[{]
method[setOptions, return_type[void], modifier[public], parameter[options]] begin[{]
assign[THIS[member[None.options]], member[.options]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setOptions] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[CustomFieldOption]... |
@Override
public void deserializeInstance(SerializationStreamReader streamReader, OWLSameIndividualAxiomImpl instance) throws SerializationException {
deserialize(streamReader, instance);
} | class class_name[name] begin[{]
method[deserializeInstance, return_type[void], modifier[public], parameter[streamReader, instance]] begin[{]
call[.deserialize, parameter[member[.streamReader], member[.instance]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deserializeInstance] operator[SEP] identifier[SerializationStreamReader] identifier[streamReader] , identifier[OWLSameIndividualAxiomImpl] identifier[instance] operator[SEP] Keyword[throws] identifier[SerializationException] {
identifie... |
@Override
public void close() {
// Use monitor to avoid race between external close and handler thread run()
synchronized (closeMonitor) {
// Close and clear streams, sockets etc.
if (socket != null) {
try {
// Terminates thread bloc... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.closeMonitor]] BEGIN[{]
if[binary_operation[member[.socket], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[closeMonitor] operator[SEP] {
Keyword[if] operator[SEP] identifier[socket] operator[!=] Other[null] operator[SEP] {
Keyword[try... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.