code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
static <K, V> int calculateHashCodeForMap(Map<K, V> a) {
int result = 0;
for (Map.Entry<K, V> entry : a.entrySet()) {
result += calculateHashCodeForObject(entry.getKey()) ^ calculateHashCodeForObject(entry.getValue());
}
return result;
} | class class_name[name] begin[{]
method[calculateHashCodeForMap, return_type[type[int]], modifier[static], parameter[a]] begin[{]
local_variable[type[int], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(membe... | Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] Keyword[int] identifier[calculateHashCodeForMap] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[a] operator[SEP] {
Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[for... |
public Thread getExecutingThread() {
synchronized (this) {
if (this.executingThread == null) {
if (this.taskName == null) {
this.executingThread = new Thread(this);
}
else {
this.executingThread = new Thread(this, getTaskNameWithIndex());
}
}
return this.executingThread;
}
} | class class_name[name] begin[{]
method[getExecutingThread, return_type[type[Thread]], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[binary_operation[THIS[member[None.executingThread]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Thread] identifier[getExecutingThread] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[executingThread] operator[==] Other[null] operator[SEP] {
Ke... |
@Override
public ProposalPersonContract getPrincipalInvestigator(ProposalDevelopmentDocumentContract pdDoc) {
ProposalPersonContract proposalPerson = null;
if (pdDoc != null) {
for (ProposalPersonContract person : pdDoc.getDevelopmentProposal().getProposalPersons()) {
if ... | class class_name[name] begin[{]
method[getPrincipalInvestigator, return_type[type[ProposalPersonContract]], modifier[public], parameter[pdDoc]] begin[{]
local_variable[type[ProposalPersonContract], proposalPerson]
if[binary_operation[member[.pdDoc], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[ProposalPersonContract] identifier[getPrincipalInvestigator] operator[SEP] identifier[ProposalDevelopmentDocumentContract] identifier[pdDoc] operator[SEP] {
identifier[ProposalPersonContract] identifier[proposalPerson] operator[=] Other[null] operator... |
protected final LocalDate plusYearsAdjustToBegin(final LocalDate date,
final int years) {
final LocalDate adjustedYears = plusYears(date, years);
final LocalDate firstMonth = firstMonth(adjustedYears);
return firstDayOfMonth(firstMonth);
} | class class_name[name] begin[{]
method[plusYearsAdjustToBegin, return_type[type[LocalDate]], modifier[final protected], parameter[date, years]] begin[{]
local_variable[type[LocalDate], adjustedYears]
local_variable[type[LocalDate], firstMonth]
return[call[.firstDayOfMonth, parameter[mem... | Keyword[protected] Keyword[final] identifier[LocalDate] identifier[plusYearsAdjustToBegin] operator[SEP] Keyword[final] identifier[LocalDate] identifier[date] , Keyword[final] Keyword[int] identifier[years] operator[SEP] {
Keyword[final] identifier[LocalDate] identifier[adjustedYears] operator[=] identifier[plu... |
public synchronized void logMessage(final Level level, final String message)
{
if (logLevel.toInt() > level.toInt()) {
return;
}
try {
this.writer.write(System.currentTimeMillis() + "\t" + consumerName
+ " [" + type.toString() + "] " + "\t" + message + "\r\n");
this.writer.flush();
}
catch (I... | class class_name[name] begin[{]
method[logMessage, return_type[void], modifier[synchronized public], parameter[level, message]] begin[{]
if[binary_operation[call[logLevel.toInt, parameter[]], >, call[level.toInt, parameter[]]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[logMessage] operator[SEP] Keyword[final] identifier[Level] identifier[level] , Keyword[final] identifier[String] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[logLevel] operator[SEP] identifier[toInt] operator[SEP] operato... |
public static boolean isValid(final String hexString) {
if (hexString == null) {
throw new IllegalArgumentException();
}
int len = hexString.length();
if (len != 24) {
return false;
}
for (int i = 0; i < len; i++) {
char c = hexString... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public static], parameter[hexString]] begin[{]
if[binary_operation[member[.hexString], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_a... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValid] operator[SEP] Keyword[final] identifier[String] identifier[hexString] operator[SEP] {
Keyword[if] operator[SEP] identifier[hexString] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentExce... |
@Override
protected String updateQuery(String sql)
{
try
{
Matcher tMatcher;
if ((creatSequencePattern.matcher(sql)).find())
{
tMatcher = dbObjectNamePattern.matcher(sql);
if (tMatcher.find())
{
if (sql.substring(tMatcher.st... | class class_name[name] begin[{]
method[updateQuery, return_type[type[String]], modifier[protected], parameter[sql]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=tMatcher)], modifiers=set(), type=ReferenceType... | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[updateQuery] operator[SEP] identifier[String] identifier[sql] operator[SEP] {
Keyword[try] {
identifier[Matcher] identifier[tMatcher] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[creatSequencePatter... |
public int doStartTag() throws JspException {
// Generate the URL to be encoded
String pageUrl = calculateURL();
StringBuilder url = new StringBuilder(pageUrl);
if (pageUrl.indexOf("?") < 0)
url.append("?");
else
url.append("&");
ModelListForm form = null;
try {
form = (ModelListFor... | class class_name[name] begin[{]
method[doStartTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[String], pageUrl]
local_variable[type[StringBuilder], url]
if[binary_operation[call[pageUrl.indexOf, parameter[literal["?"]]], <, literal[0]]] b... | Keyword[public] Keyword[int] identifier[doStartTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] {
identifier[String] identifier[pageUrl] operator[=] identifier[calculateURL] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[url] operator[=] Keyword[new] ident... |
@RequestMapping(value = "api/servergroup/{id}", method = RequestMethod.GET)
public
@ResponseBody
ServerGroup getServerGroup(Model model,
@PathVariable int id,
@RequestParam(value = "profileId", required = false) Integer profileId,
... | class class_name[name] begin[{]
method[getServerGroup, return_type[type[ServerGroup]], modifier[public], parameter[model, id, profileId, profileIdentifier]] begin[{]
if[binary_operation[binary_operation[member[.profileId], ==, literal[null]], &&, binary_operation[member[.profileIdentifier], ==,... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] annotation[@] identifier[ResponseBody] identifier[ServerGroup] identifier[getServerGroup] operator[... |
@Override
public DeleteIntegrationResult deleteIntegration(DeleteIntegrationRequest request) {
request = beforeClientExecution(request);
return executeDeleteIntegration(request);
} | class class_name[name] begin[{]
method[deleteIntegration, return_type[type[DeleteIntegrationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeleteIntegration, parameter[membe... | annotation[@] identifier[Override] Keyword[public] identifier[DeleteIntegrationResult] identifier[deleteIntegration] operator[SEP] identifier[DeleteIntegrationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[... |
public void marshall(Grant grant, ProtocolMarshaller protocolMarshaller) {
if (grant == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(grant.getGrantee(), GRANTEE_BINDING);
protocolMarsha... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[grant, protocolMarshaller]] begin[{]
if[binary_operation[member[.grant], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Grant] identifier[grant] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[grant] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identif... |
public final EObject ruleAOPMember() throws RecognitionException {
EObject current = null;
Token otherlv_3=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_10=null;
Token otherlv_12=null;
Token otherlv_14=null;
Token otherlv_16=null;
... | class class_name[name] begin[{]
method[ruleAOPMember, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], otherlv_3]
local_variable[type[Token], otherlv_5]
local_variable[type[Token], otherl... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleAOPMember] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_3] operator[=] Other[null] operator[SEP] i... |
public int getStatValueAsInteger(T metric, String interval) {
if (metric.isRateMetric()) {
return (int)(getStatValueAsDouble(metric, interval));
}
return getMonitoredStatValue(metric).getValueAsInt(interval);
} | class class_name[name] begin[{]
method[getStatValueAsInteger, return_type[type[int]], modifier[public], parameter[metric, interval]] begin[{]
if[call[metric.isRateMetric, parameter[]]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=metric, postfix... | Keyword[public] Keyword[int] identifier[getStatValueAsInteger] operator[SEP] identifier[T] identifier[metric] , identifier[String] identifier[interval] operator[SEP] {
Keyword[if] operator[SEP] identifier[metric] operator[SEP] identifier[isRateMetric] operator[SEP] operator[SEP] operator[SEP] {
Keywo... |
public List<GitFileSystemObject> getChildren() throws IOException, JavaGitException {
List<GitFileSystemObject> children = new ArrayList<GitFileSystemObject>();
// get all of the file system objects currently located under this directory
for (File memberFile : file.listFiles()) {
// check if this fil... | class class_name[name] begin[{]
method[getChildren, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], children]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member... | Keyword[public] identifier[List] operator[<] identifier[GitFileSystemObject] operator[>] identifier[getChildren] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JavaGitException] {
identifier[List] operator[<] identifier[GitFileSystemObject] operator[>] identifier[children] oper... |
PartitionRequestClient createPartitionRequestClient(ConnectionID connectionId) throws IOException, InterruptedException {
Object entry;
PartitionRequestClient client = null;
while (client == null) {
entry = clients.get(connectionId);
if (entry != null) {
// Existing channel or connecting channel
i... | class class_name[name] begin[{]
method[createPartitionRequestClient, return_type[type[PartitionRequestClient]], modifier[default], parameter[connectionId]] begin[{]
local_variable[type[Object], entry]
local_variable[type[PartitionRequestClient], client]
while[binary_operation[me... | identifier[PartitionRequestClient] identifier[createPartitionRequestClient] operator[SEP] identifier[ConnectionID] identifier[connectionId] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
identifier[Object] identifier[entry] operator[SEP] identifier[PartitionRequestCli... |
public Section readNextSection(String titleToLookFor) throws IOException {
String title = null;
StringBuilder keyBuilder = null;
while (true) {
String line = reader.readLine();
if (line == null) {
Preconditions.checkArgument(title == null, "missing end tag (%s)", title);
return n... | class class_name[name] begin[{]
method[readNextSection, return_type[type[Section]], modifier[public], parameter[titleToLookFor]] begin[{]
local_variable[type[String], title]
local_variable[type[StringBuilder], keyBuilder]
while[literal[true]] begin[{]
local_variable[... | Keyword[public] identifier[Section] identifier[readNextSection] operator[SEP] identifier[String] identifier[titleToLookFor] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[title] operator[=] Other[null] operator[SEP] identifier[StringBuilder] identifier[keyBuilder] operator[... |
public Integer indexOf(Record o) {
if(o!=null) {
for(Map.Entry<Integer, Record> e : entries()) {
Integer rId = e.getKey();
Record r = e.getValue();
if(o.equals(r)) {
return rId;
}
}
}
retu... | class class_name[name] begin[{]
method[indexOf, return_type[type[Integer]], modifier[public], parameter[o]] begin[{]
if[binary_operation[member[.o], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declara... | Keyword[public] identifier[Integer] identifier[indexOf] operator[SEP] identifier[Record] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Inte... |
public static <T extends GrayI16<T>>T convertFrom(BufferedImage src, T dst , Class<T> type ) {
if (dst != null) {
dst.reshape(src.getWidth(), src.getHeight());
} else {
dst = GeneralizedImageOps.createSingleBand(type, src.getWidth(), src.getHeight());
}
DataBuffer buffer = src.getRaster().getDataBuffer()... | class class_name[name] begin[{]
method[convertFrom, return_type[type[T]], modifier[public static], parameter[src, dst, type]] begin[{]
if[binary_operation[member[.dst], !=, literal[null]]] begin[{]
call[dst.reshape, parameter[call[src.getWidth, parameter[]], call[src.get... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[GrayI16] operator[<] identifier[T] operator[>] operator[>] identifier[T] identifier[convertFrom] operator[SEP] identifier[BufferedImage] identifier[src] , identifier[T] identifier[dst] , identifier[Class] operator[<] identifier[T] o... |
public static void xmlConversionNameUndefined(String xmlPath, String className) {
throw new XmlConversionNameException(MSG.INSTANCE.message(xmlConversionNameException,xmlPath,className));
} | class class_name[name] begin[{]
method[xmlConversionNameUndefined, return_type[void], modifier[public static], parameter[xmlPath, className]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=xmlConversionNameException, postfix_operators=[], p... | Keyword[public] Keyword[static] Keyword[void] identifier[xmlConversionNameUndefined] operator[SEP] identifier[String] identifier[xmlPath] , identifier[String] identifier[className] operator[SEP] {
Keyword[throw] Keyword[new] identifier[XmlConversionNameException] operator[SEP] identifier[MSG] operator[SEP] iden... |
AbstractJcrNode node( CachedNode cachedNode,
SessionCache cache,
AbstractJcrNode.Type expectedType,
NodeKey parentKey ) {
assert cachedNode != null;
NodeKey nodeKey = cachedNode.getKey();
AbstractJcrNode node = jcrNode... | class class_name[name] begin[{]
method[node, return_type[type[AbstractJcrNode]], modifier[default], parameter[cachedNode, cache, expectedType, parentKey]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=cachedNode, postfix_operators=[], prefix_operators=[], qualifier=... | identifier[AbstractJcrNode] identifier[node] operator[SEP] identifier[CachedNode] identifier[cachedNode] , identifier[SessionCache] identifier[cache] , identifier[AbstractJcrNode] operator[SEP] identifier[Type] identifier[expectedType] , identifier[NodeKey] identifier[parentKey] operator[SEP] {
Keyword[assert... |
public static String getJavaISO8601Time(Date date) {
final DateFormat formatter = new SimpleDateFormat(JAVA_ISO8601_PATTERN, LOCALE_US);
formatter.setTimeZone(UTC_ZONE);
return formatter.format(date);
} | class class_name[name] begin[{]
method[getJavaISO8601Time, return_type[type[String]], modifier[public static], parameter[date]] begin[{]
local_variable[type[DateFormat], formatter]
call[formatter.setTimeZone, parameter[member[.UTC_ZONE]]]
return[call[formatter.format, parameter[... | Keyword[public] Keyword[static] identifier[String] identifier[getJavaISO8601Time] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[final] identifier[DateFormat] identifier[formatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[JAVA_ISO8601_PATTERN] , ide... |
public static IsEqual isEqual(NumberExpression left, Object constant) {
if (!(constant instanceof Number))
throw new IllegalArgumentException("constant is not a Number");
return new IsEqual(left, constant((Number)constant));
} | class class_name[name] begin[{]
method[isEqual, return_type[type[IsEqual]], modifier[public static], parameter[left, constant]] begin[{]
if[binary_operation[member[.constant], instanceof, type[Number]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[static] identifier[IsEqual] identifier[isEqual] operator[SEP] identifier[NumberExpression] identifier[left] , identifier[Object] identifier[constant] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[constant] Keyword[instanceof] identifier[Number] operator[S... |
private File[] getFilesMatchingPath(final String path) {
if (path.endsWith("*")) {
final File dir = new File(path.substring(0, path.lastIndexOf("/") + 1));
final FileFilter fileFilter = new WildcardFileFilter(path.substring(path.lastIndexOf("/")
+ 1));
final File[] files = dir.listFiles(... | class class_name[name] begin[{]
method[getFilesMatchingPath, return_type[type[File]], modifier[private], parameter[path]] begin[{]
if[call[path.endsWith, parameter[literal["*"]]]] begin[{]
local_variable[type[File], dir]
local_variable[type[FileFilter], fileFilter]
... | Keyword[private] identifier[File] operator[SEP] operator[SEP] identifier[getFilesMatchingPath] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] ... |
public void writeProject(CmsRequestContext context, CmsProject project)
throws CmsRoleViolationException, CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
try {
checkManagerOfProjectRole(dbc, project);
m_driverManager.writeProject(dbc, project);
... | class class_name[name] begin[{]
method[writeProject, return_type[void], modifier[public], parameter[context, project]] begin[{]
local_variable[type[CmsDbContext], dbc]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[]... | Keyword[public] Keyword[void] identifier[writeProject] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[CmsProject] identifier[project] operator[SEP] Keyword[throws] identifier[CmsRoleViolationException] , identifier[CmsException] {
identifier[CmsDbContext] identifier[dbc] operator[... |
public void importObject(final Object obj) {
this.importedObjects.remove(obj);
this.importedObjects.add(0, obj);
this.nameSpaceChanged();
} | class class_name[name] begin[{]
method[importObject, return_type[void], modifier[public], parameter[obj]] begin[{]
THIS[member[None.importedObjects]call[None.remove, parameter[member[.obj]]]]
THIS[member[None.importedObjects]call[None.add, parameter[literal[0], member[.obj]]]]
... | Keyword[public] Keyword[void] identifier[importObject] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[SEP] {
Keyword[this] operator[SEP] identifier[importedObjects] operator[SEP] identifier[remove] operator[SEP] identifier[obj] operator[SEP] operator[SEP] Keyword[this] operator[SEP] ide... |
public static CurveInterface createIndexCurveWithSeasonality(String name, LocalDate referenceDate, Map<LocalDate, Double> indexFixings, Map<String, Double> seasonalityAdjustments, Integer seasonalAveragingNumberOfYears, Map<LocalDate, Double> annualizedZeroRates, String forwardsFixingLag, String forwardsFixingType) {
... | class class_name[name] begin[{]
method[createIndexCurveWithSeasonality, return_type[type[CurveInterface]], modifier[public static], parameter[name, referenceDate, indexFixings, seasonalityAdjustments, seasonalAveragingNumberOfYears, annualizedZeroRates, forwardsFixingLag, forwardsFixingType]] begin[{]
... | Keyword[public] Keyword[static] identifier[CurveInterface] identifier[createIndexCurveWithSeasonality] operator[SEP] identifier[String] identifier[name] , identifier[LocalDate] identifier[referenceDate] , identifier[Map] operator[<] identifier[LocalDate] , identifier[Double] operator[>] identifier[indexFixings] , i... |
public VirtualWANInner beginCreateOrUpdate(String resourceGroupName, String virtualWANName, VirtualWANInner wANParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWANName, wANParameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginCreateOrUpdate, return_type[type[VirtualWANInner]], modifier[public], parameter[resourceGroupName, virtualWANName, wANParameters]] begin[{]
return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualWANName]... | Keyword[public] identifier[VirtualWANInner] identifier[beginCreateOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualWANName] , identifier[VirtualWANInner] identifier[wANParameters] operator[SEP] {
Keyword[return] identifier[beginCreateOrUpdateWithSe... |
@Override
public void onFailure(Response response, Throwable t, JSONObject extendedInfo) {
if (isAuthorizationRequired(response)) {
processResponseWrapper(response, true);
} else {
listener.onFailure(response, t, extendedInfo);
}
} | class class_name[name] begin[{]
method[onFailure, return_type[void], modifier[public], parameter[response, t, extendedInfo]] begin[{]
if[call[.isAuthorizationRequired, parameter[member[.response]]]] begin[{]
call[.processResponseWrapper, parameter[member[.response], lite... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] identifier[Response] identifier[response] , identifier[Throwable] identifier[t] , identifier[JSONObject] identifier[extendedInfo] operator[SEP] {
Keyword[if] operator[SEP] identifier[isAuthorizationRequired] op... |
public static Optional<byte[]> readOptRangedBytes(ByteBuf bf) {
int length = SignedNumeric.decode(readUnsignedInt(bf));
return length < 0 ? Optional.empty() : Optional.of(readRangedBytes(bf, length));
} | class class_name[name] begin[{]
method[readOptRangedBytes, return_type[type[Optional]], modifier[public static], parameter[bf]] begin[{]
local_variable[type[int], length]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[static] identifier[Optional] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[readOptRangedBytes] operator[SEP] identifier[ByteBuf] identifier[bf] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[SignedNumeric] operator[SEP] identifier[dec... |
public void removeAllBusLines() {
for (final BusLine busline : this.busLines) {
busline.setContainer(null);
busline.setEventFirable(true);
}
this.busLines.clear();
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.ALL_LINES_REMOVED,
null,
-1,
"shape", //$NON-NLS-1$
null,
... | class class_name[name] begin[{]
method[removeAllBusLines, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, sel... | Keyword[public] Keyword[void] identifier[removeAllBusLines] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[BusLine] identifier[busline] operator[:] Keyword[this] operator[SEP] identifier[busLines] operator[SEP] {
identifier[busline] operator[SEP] identifier[setCont... |
private JTable getTableExtension() {
if (tableExt == null) {
tableExt = new JTable();
tableExt.setModel(this.model);
tableExt.getColumnModel().getColumn(0).setPreferredWidth(30);
tableExt.getColumnModel().getColumn(1).setPreferredWidth(320);
tableExt.getColumnModel().getColumn(2).setPreferredWidt... | class class_name[name] begin[{]
method[getTableExtension, return_type[type[JTable]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.tableExt], ==, literal[null]]] begin[{]
assign[member[.tableExt], ClassCreator(arguments=[], body=None, constructor_t... | Keyword[private] identifier[JTable] identifier[getTableExtension] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tableExt] operator[==] Other[null] operator[SEP] {
identifier[tableExt] operator[=] Keyword[new] identifier[JTable] operator[SEP] operator[SEP] operator[SEP] identifier[... |
@Override
public void update(double extrp, Handlables featurables)
{
for (final Integer layer : indexs)
{
for (final Refreshable refreshable : layers.get(layer))
{
refreshable.update(extrp);
}
}
} | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[extrp, featurables]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Member... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[double] identifier[extrp] , identifier[Handlables] identifier[featurables] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[Integer] identifier[layer] operator[:] identifier[indexs] ope... |
public Response remove(DesignDocument designDocument) {
assertNotEmpty(designDocument, "DesignDocument");
ensureDesignPrefixObject(designDocument);
return db.remove(designDocument);
} | class class_name[name] begin[{]
method[remove, return_type[type[Response]], modifier[public], parameter[designDocument]] begin[{]
call[.assertNotEmpty, parameter[member[.designDocument], literal["DesignDocument"]]]
call[.ensureDesignPrefixObject, parameter[member[.designDocument... | Keyword[public] identifier[Response] identifier[remove] operator[SEP] identifier[DesignDocument] identifier[designDocument] operator[SEP] {
identifier[assertNotEmpty] operator[SEP] identifier[designDocument] , literal[String] operator[SEP] operator[SEP] identifier[ensureDesignPrefixObject] operator[SEP] identif... |
public OutlierResult run(Database database, Relation<O> relation) {
DistanceFunction<? super O> df = clusterer.getDistanceFunction();
DistanceQuery<O> dq = database.getDistanceQuery(relation, df);
// TODO: improve ELKI api to ensure we're using the same DBIDs!
Clustering<?> c = clusterer.run(database, ... | class class_name[name] begin[{]
method[run, return_type[type[OutlierResult]], modifier[public], parameter[database, relation]] begin[{]
local_variable[type[DistanceFunction], df]
local_variable[type[DistanceQuery], dq]
local_variable[type[Clustering], c]
local_variable[type[Writ... | Keyword[public] identifier[OutlierResult] identifier[run] operator[SEP] identifier[Database] identifier[database] , identifier[Relation] operator[<] identifier[O] operator[>] identifier[relation] operator[SEP] {
identifier[DistanceFunction] operator[<] operator[?] Keyword[super] identifier[O] operator[>] identi... |
public EClass getIfcRelProjectsElement() {
if (ifcRelProjectsElementEClass == null) {
ifcRelProjectsElementEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(479);
}
return ifcRelProjectsElementEClass;
} | class class_name[name] begin[{]
method[getIfcRelProjectsElement, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcRelProjectsElementEClass], ==, literal[null]]] begin[{]
assign[member[.ifcRelProjectsElementEClass], Cast(ex... | Keyword[public] identifier[EClass] identifier[getIfcRelProjectsElement] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcRelProjectsElementEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcRelProjectsElementEClass] operator[=] operator[SEP] identifier[EClass] operator... |
public ServiceFuture<List<OutputInner>> listByStreamingJobAsync(final String resourceGroupName, final String jobName, final ListOperationCallback<OutputInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByStreamingJobSinglePageAsync(resourceGroupName, jobName),
new... | class class_name[name] begin[{]
method[listByStreamingJobAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, jobName, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listByStreamingJobSinglePageAsync, parameter[member[.reso... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[OutputInner] operator[>] operator[>] identifier[listByStreamingJobAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[jobName] , Keyword[final] ... |
@Override
public SecurityRequirement visitSecurityRequirement(Context context, SecurityRequirement sr) {
visitor.visitSecurityRequirement(context, sr);
return sr;
} | class class_name[name] begin[{]
method[visitSecurityRequirement, return_type[type[SecurityRequirement]], modifier[public], parameter[context, sr]] begin[{]
call[visitor.visitSecurityRequirement, parameter[member[.context], member[.sr]]]
return[member[.sr]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[SecurityRequirement] identifier[visitSecurityRequirement] operator[SEP] identifier[Context] identifier[context] , identifier[SecurityRequirement] identifier[sr] operator[SEP] {
identifier[visitor] operator[SEP] identifier[visitSecurityRequirement] op... |
private Environment checkLogicalDisjunction(Expr.LogicalOr expr, boolean sign, Environment environment) {
Tuple<Expr> operands = expr.getOperands();
if (sign) {
Environment[] refinements = new Environment[operands.size()];
for (int i = 0; i != operands.size(); ++i) {
refinements[i] = checkCondition(operan... | class class_name[name] begin[{]
method[checkLogicalDisjunction, return_type[type[Environment]], modifier[private], parameter[expr, sign, environment]] begin[{]
local_variable[type[Tuple], operands]
if[member[.sign]] begin[{]
local_variable[type[Environment], refinements]
... | Keyword[private] identifier[Environment] identifier[checkLogicalDisjunction] operator[SEP] identifier[Expr] operator[SEP] identifier[LogicalOr] identifier[expr] , Keyword[boolean] identifier[sign] , identifier[Environment] identifier[environment] operator[SEP] {
identifier[Tuple] operator[<] identifier[Expr] o... |
public void marshall(BatchListObjectChildrenResponse batchListObjectChildrenResponse, ProtocolMarshaller protocolMarshaller) {
if (batchListObjectChildrenResponse == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarsha... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[batchListObjectChildrenResponse, protocolMarshaller]] begin[{]
if[binary_operation[member[.batchListObjectChildrenResponse], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCr... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchListObjectChildrenResponse] identifier[batchListObjectChildrenResponse] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[batchListObjectChildrenResponse] operator[... |
private static Color[] rainbow(int n, float start, float end, float alpha) {
return rainbow(n, start, end, 1.0f, 1.0f, alpha);
} | class class_name[name] begin[{]
method[rainbow, return_type[type[Color]], modifier[private static], parameter[n, start, end, alpha]] begin[{]
return[call[.rainbow, parameter[member[.n], member[.start], member[.end], literal[1.0f], literal[1.0f], member[.alpha]]]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[Color] operator[SEP] operator[SEP] identifier[rainbow] operator[SEP] Keyword[int] identifier[n] , Keyword[float] identifier[start] , Keyword[float] identifier[end] , Keyword[float] identifier[alpha] operator[SEP] {
Keyword[return] identifier[rainbow] operator[SEP] i... |
public static boolean sameLiteral(Literal l1, Literal l2) {
URI type = l2.getDatatypeURI();
return sameLiteral(l1, l2.getLexicalForm(), type, l2.getLanguage());
} | class class_name[name] begin[{]
method[sameLiteral, return_type[type[boolean]], modifier[public static], parameter[l1, l2]] begin[{]
local_variable[type[URI], type]
return[call[.sameLiteral, parameter[member[.l1], call[l2.getLexicalForm, parameter[]], member[.type], call[l2.getLanguage, paramet... | Keyword[public] Keyword[static] Keyword[boolean] identifier[sameLiteral] operator[SEP] identifier[Literal] identifier[l1] , identifier[Literal] identifier[l2] operator[SEP] {
identifier[URI] identifier[type] operator[=] identifier[l2] operator[SEP] identifier[getDatatypeURI] operator[SEP] operator[SEP] operator... |
static boolean isPackageInstalled(Context context) {
boolean isInstalled = false;
if (context != null) {
try {
final PackageManager packageManager = context.getPackageManager();
Intent intent = context.getPackageManager().getLaunchIntentForPackage(context.getP... | class class_name[name] begin[{]
method[isPackageInstalled, return_type[type[boolean]], modifier[static], parameter[context]] begin[{]
local_variable[type[boolean], isInstalled]
if[binary_operation[member[.context], !=, literal[null]]] begin[{]
TryStatement(block=[LocalVariab... | Keyword[static] Keyword[boolean] identifier[isPackageInstalled] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[boolean] identifier[isInstalled] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] {
... |
@Override
public DEBBuilder setPostInstallation(String script, String interpreter)
{
setMaintainerScript("postinst", script, interpreter);
return this;
} | class class_name[name] begin[{]
method[setPostInstallation, return_type[type[DEBBuilder]], modifier[public], parameter[script, interpreter]] begin[{]
call[.setMaintainerScript, parameter[literal["postinst"], member[.script], member[.interpreter]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[DEBBuilder] identifier[setPostInstallation] operator[SEP] identifier[String] identifier[script] , identifier[String] identifier[interpreter] operator[SEP] {
identifier[setMaintainerScript] operator[SEP] literal[String] , identifier[script] , identi... |
private static Object readFileOrUrl(String path, boolean convertToString)
throws IOException
{
return SourceReader.readFileOrUrl(path, convertToString,
shellContextFactory.getCharacterEncoding());
} | class class_name[name] begin[{]
method[readFileOrUrl, return_type[type[Object]], modifier[private static], parameter[path, convertToString]] begin[{]
return[call[SourceReader.readFileOrUrl, parameter[member[.path], member[.convertToString], call[shellContextFactory.getCharacterEncoding, parameter[]]]]]... | Keyword[private] Keyword[static] identifier[Object] identifier[readFileOrUrl] operator[SEP] identifier[String] identifier[path] , Keyword[boolean] identifier[convertToString] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[SourceReader] operator[SEP] identifier[readFileOrUrl] ... |
public synchronized long nextId() {
long timestamp = timeGen();
if (timestamp < lastTimestamp) {
throw new RuntimeException(
String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
}
//如果是同一时间生成的,则进... | class class_name[name] begin[{]
method[nextId, return_type[type[long]], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[long], timestamp]
if[binary_operation[member[.timestamp], <, member[.lastTimestamp]]] begin[{]
ThrowStatement(expression=ClassCrea... | Keyword[public] Keyword[synchronized] Keyword[long] identifier[nextId] operator[SEP] operator[SEP] {
Keyword[long] identifier[timestamp] operator[=] identifier[timeGen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[timestamp] operator[<] identifier[lastTimestamp] operator[SEP] {... |
@Override
public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle) {
Reader rd = null;
if (processingBundle) {
String path = getCssPath(resourceName);
rd = ((TextResourceReader) resourceReader).getResource(bundle, path, processingBundle);
}
return rd;
} | class class_name[name] begin[{]
method[getResource, return_type[type[Reader]], modifier[public], parameter[bundle, resourceName, processingBundle]] begin[{]
local_variable[type[Reader], rd]
if[member[.processingBundle]] begin[{]
local_variable[type[String], path]
... | annotation[@] identifier[Override] Keyword[public] identifier[Reader] identifier[getResource] operator[SEP] identifier[JoinableResourceBundle] identifier[bundle] , identifier[String] identifier[resourceName] , Keyword[boolean] identifier[processingBundle] operator[SEP] {
identifier[Reader] identifier[rd] opera... |
public StringProcessChain replacIgnoreCase(final String target, final String replacement) {
StringBuilder result = new StringBuilder();
String temp = source;
int indexOfIgnoreCase = 0;
while (true) {
indexOfIgnoreCase = StringUtils.indexOfIgnoreCase(temp, target);
if (indexOfIgnoreCase == S... | class class_name[name] begin[{]
method[replacIgnoreCase, return_type[type[StringProcessChain]], modifier[public], parameter[target, replacement]] begin[{]
local_variable[type[StringBuilder], result]
local_variable[type[String], temp]
local_variable[type[int], indexOfIgnoreCase]
... | Keyword[public] identifier[StringProcessChain] identifier[replacIgnoreCase] operator[SEP] Keyword[final] identifier[String] identifier[target] , Keyword[final] identifier[String] identifier[replacement] operator[SEP] {
identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilde... |
public void setJwtGrantedAuthoritiesConverter(Converter<Jwt, Collection<GrantedAuthority>> jwtGrantedAuthoritiesConverter) {
Assert.notNull(jwtGrantedAuthoritiesConverter, "jwtGrantedAuthoritiesConverter cannot be null");
this.jwtGrantedAuthoritiesConverter = jwtGrantedAuthoritiesConverter;
} | class class_name[name] begin[{]
method[setJwtGrantedAuthoritiesConverter, return_type[void], modifier[public], parameter[jwtGrantedAuthoritiesConverter]] begin[{]
call[Assert.notNull, parameter[member[.jwtGrantedAuthoritiesConverter], literal["jwtGrantedAuthoritiesConverter cannot be null"]]]
... | Keyword[public] Keyword[void] identifier[setJwtGrantedAuthoritiesConverter] operator[SEP] identifier[Converter] operator[<] identifier[Jwt] , identifier[Collection] operator[<] identifier[GrantedAuthority] operator[>] operator[>] identifier[jwtGrantedAuthoritiesConverter] operator[SEP] {
identifier[Assert] oper... |
public static <T1, T2> BiPredicate<T1, T2> softenBiPredicate(final CheckedBiPredicate<T1, T2> fn) {
return (t1, t2) -> {
try {
return fn.test(t1, t2);
} catch (final Throwable e) {
throw throwSoftenedException(e);
}
};
} | class class_name[name] begin[{]
method[softenBiPredicate, return_type[type[BiPredicate]], modifier[public static], parameter[fn]] begin[{]
return[LambdaExpression(body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=t1, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] operator[>] identifier[BiPredicate] operator[<] identifier[T1] , identifier[T2] operator[>] identifier[softenBiPredicate] operator[SEP] Keyword[final] identifier[CheckedBiPredicate] operator[<] identifier[T1] , identifier[T2] operator[>] ide... |
public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
return createReadAttributeRequest(false, attributeName, address);
} | class class_name[name] begin[{]
method[createReadAttributeRequest, return_type[type[ModelNode]], modifier[public static], parameter[attributeName, address]] begin[{]
return[call[.createReadAttributeRequest, parameter[literal[false], member[.attributeName], member[.address]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ModelNode] identifier[createReadAttributeRequest] operator[SEP] identifier[String] identifier[attributeName] , identifier[Address] identifier[address] operator[SEP] {
Keyword[return] identifier[createReadAttributeRequest] operator[SEP] literal[boolean] , identifier[at... |
public static GSIConstants.CertificateType getCertificateType(X509Certificate cert, CertStore trustedCerts)
throws CertificateException {
try {
TBSCertificateStructure crt = getTBSCertificateStructure(cert);
GSIConstants.CertificateType type = getCertificateType(crt);
//... | class class_name[name] begin[{]
method[getCertificateType, return_type[type[GSIConstants]], modifier[public static], parameter[cert, trustedCerts]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments... | Keyword[public] Keyword[static] identifier[GSIConstants] operator[SEP] identifier[CertificateType] identifier[getCertificateType] operator[SEP] identifier[X509Certificate] identifier[cert] , identifier[CertStore] identifier[trustedCerts] operator[SEP] Keyword[throws] identifier[CertificateException] {
Keyword[t... |
public LaunchTemplateConfig withOverrides(LaunchTemplateOverrides... overrides) {
if (this.overrides == null) {
setOverrides(new com.amazonaws.internal.SdkInternalList<LaunchTemplateOverrides>(overrides.length));
}
for (LaunchTemplateOverrides ele : overrides) {
this.over... | class class_name[name] begin[{]
method[withOverrides, return_type[type[LaunchTemplateConfig]], modifier[public], parameter[overrides]] begin[{]
if[binary_operation[THIS[member[None.overrides]], ==, literal[null]]] begin[{]
call[.setOverrides, parameter[ClassCreator(argum... | Keyword[public] identifier[LaunchTemplateConfig] identifier[withOverrides] operator[SEP] identifier[LaunchTemplateOverrides] operator[...] identifier[overrides] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[overrides] operator[==] Other[null] operator[SEP] {
identifi... |
@Override
public ListResourceInventoryResult listResourceInventory(ListResourceInventoryRequest request) {
request = beforeClientExecution(request);
return executeListResourceInventory(request);
} | class class_name[name] begin[{]
method[listResourceInventory, return_type[type[ListResourceInventoryResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListResourceInventory, par... | annotation[@] identifier[Override] Keyword[public] identifier[ListResourceInventoryResult] identifier[listResourceInventory] operator[SEP] identifier[ListResourceInventoryRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[reques... |
public double at(int r, int c) throws MatrixException
{
if ((r < 0) || (r >= nRows) || (c < 0) || (c >= nCols)) {
throw new MatrixException(MatrixException.INVALID_INDEX);
}
return values[r][c];
} | class class_name[name] begin[{]
method[at, return_type[type[double]], modifier[public], parameter[r, c]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.r], <, literal[0]], ||, binary_operation[member[.r], >=, member[.nRows]]], ||, binary_operation[member... | Keyword[public] Keyword[double] identifier[at] operator[SEP] Keyword[int] identifier[r] , Keyword[int] identifier[c] operator[SEP] Keyword[throws] identifier[MatrixException] {
Keyword[if] operator[SEP] operator[SEP] identifier[r] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[r] opera... |
public void marshall(DeleteFileSystemRequest deleteFileSystemRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteFileSystemRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteFile... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteFileSystemRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteFileSystemRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteFileSystemRequest] identifier[deleteFileSystemRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteFileSystemRequest] operator[==] Other[null] operator... |
public ArrayList<OvhStatistics> serviceName_usageStatistics_GET(String serviceName, Date from, Date to) throws IOException {
String qPath = "/license/office/{serviceName}/usageStatistics";
StringBuilder sb = path(qPath, serviceName);
query(sb, "from", from);
query(sb, "to", to);
String resp = exec(qPath, "GET... | class class_name[name] begin[{]
method[serviceName_usageStatistics_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName, from, to]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.query, parameter[member[.sb], lite... | Keyword[public] identifier[ArrayList] operator[<] identifier[OvhStatistics] operator[>] identifier[serviceName_usageStatistics_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[Date] identifier[from] , identifier[Date] identifier[to] operator[SEP] Keyword[throws] identifier[IOException] {
... |
protected CmsPublishList internalDeserializePublishList(byte[] bytes) throws IOException, ClassNotFoundException {
ByteArrayInputStream bin = new ByteArrayInputStream(bytes);
ObjectInputStream oin = new ObjectInputStream(bin);
return (CmsPublishList)oin.readObject();
} | class class_name[name] begin[{]
method[internalDeserializePublishList, return_type[type[CmsPublishList]], modifier[protected], parameter[bytes]] begin[{]
local_variable[type[ByteArrayInputStream], bin]
local_variable[type[ObjectInputStream], oin]
return[Cast(expression=MethodInvocation(... | Keyword[protected] identifier[CmsPublishList] identifier[internalDeserializePublishList] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] {
identifier[ByteArrayInputStream] identifier[bin] operato... |
@FFDCIgnore({NumberFormatException.class, IllegalArgumentException.class, ParseException.class})
private long handleRetry(String retryValue) {
// RETRY_AFTER is a String that can either correspond to seconds (long)
// or a HTTP-Date (which can be one of 7 variations)"
if (!(retryValue.con... | class class_name[name] begin[{]
method[handleRetry, return_type[type[long]], modifier[private], parameter[retryValue]] begin[{]
if[call[retryValue.contains, parameter[literal[":"]]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarato... | annotation[@] identifier[FFDCIgnore] operator[SEP] {
identifier[NumberFormatException] operator[SEP] Keyword[class] , identifier[IllegalArgumentException] operator[SEP] Keyword[class] , identifier[ParseException] operator[SEP] Keyword[class]
} operator[SEP] Keyword[private] Keyword[long] identifier[handleRe... |
final void resumeLocalTx(LocalTransactionCoordinator lCoord)
throws IllegalStateException
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEventEnabled()) {
if (lCoord != null) {
Tr.event(tc, "Resuming LTC cntxt: ... | class class_name[name] begin[{]
method[resumeLocalTx, return_type[void], modifier[final], parameter[lCoord]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEventEnabled, parameter[]]]] begin[{]
if[binary_op... | Keyword[final] Keyword[void] identifier[resumeLocalTx] operator[SEP] identifier[LocalTransactionCoordinator] identifier[lCoord] operator[SEP] Keyword[throws] identifier[IllegalStateException] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[i... |
public synchronized void close(boolean write) {
if (dataFile == null) {
return;
}
try {
cache.saveAll();
boolean empty = (dataFile.length() <= NL.length());
dataFile.close();
dataFile = null;
if (empty && !cacheReadonl... | class class_name[name] begin[{]
method[close, return_type[void], modifier[synchronized public], parameter[write]] begin[{]
if[binary_operation[member[.dataFile], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[Statement... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[close] operator[SEP] Keyword[boolean] identifier[write] operator[SEP] {
Keyword[if] operator[SEP] identifier[dataFile] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[try] {
identif... |
public NamespaceMappings getNamespaceMappings()
{
NamespaceMappings mappings = null;
if (m_handler != null)
{
mappings = m_handler.getNamespaceMappings();
}
return mappings;
} | class class_name[name] begin[{]
method[getNamespaceMappings, return_type[type[NamespaceMappings]], modifier[public], parameter[]] begin[{]
local_variable[type[NamespaceMappings], mappings]
if[binary_operation[member[.m_handler], !=, literal[null]]] begin[{]
assig... | Keyword[public] identifier[NamespaceMappings] identifier[getNamespaceMappings] operator[SEP] operator[SEP] {
identifier[NamespaceMappings] identifier[mappings] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[m_handler] operator[!=] Other[null] operator[SEP] {
identifier[mapp... |
public void readDwgInsertV15(int[] data, int offset) throws Exception {
//System.out.println("readDwgInsert() executed ...");
int bitPos = offset;
bitPos = readObjectHeaderV15(data, bitPos);
Vector v = DwgUtil.getBitDouble(data, bitPos);
bitPos = ((Integer)v.get(0)).intValue();
double x = ((Double)v.get(1))... | class class_name[name] begin[{]
method[readDwgInsertV15, return_type[void], modifier[public], parameter[data, offset]] begin[{]
local_variable[type[int], bitPos]
assign[member[.bitPos], call[.readObjectHeaderV15, parameter[member[.data], member[.bitPos]]]]
local_variable[type[Ve... | Keyword[public] Keyword[void] identifier[readDwgInsertV15] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[int] identifier[bitPos] operator[=] identifier[offset] operator[SEP] identifier[bitPo... |
public boolean validate() {
boolean rv = true;
synchronized (list) {
for (Pooled<T> t : list) {
if (!creator.isValid(t.content)) {
rv = false;
t.toss();
list.remove(t);
}
}
}
return rv;
} | class class_name[name] begin[{]
method[validate, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], rv]
SYNCHRONIZED[member[.list]] BEGIN[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodIn... | Keyword[public] Keyword[boolean] identifier[validate] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[rv] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[list] operator[SEP] {
Keyword[for] operator[SEP] identifier[Pooled] operator[<] identifier[T] op... |
public static String searchWebInfFolder(String startFolder) {
if (CmsStringUtil.isEmpty(startFolder)) {
return null;
}
File f = new File(startFolder);
if (!f.exists() || !f.isDirectory()) {
return null;
}
File configFile = new File(f, CmsSystemI... | class class_name[name] begin[{]
method[searchWebInfFolder, return_type[type[String]], modifier[public static], parameter[startFolder]] begin[{]
if[call[CmsStringUtil.isEmpty, parameter[member[.startFolder]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[String] identifier[searchWebInfFolder] operator[SEP] identifier[String] identifier[startFolder] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[startFolder] operator[SEP] operator[SEP] {
... |
public NettyServerBuilder permitKeepAliveTime(long keepAliveTime, TimeUnit timeUnit) {
checkArgument(keepAliveTime >= 0, "permit keepalive time must be non-negative");
permitKeepAliveTimeInNanos = timeUnit.toNanos(keepAliveTime);
return this;
} | class class_name[name] begin[{]
method[permitKeepAliveTime, return_type[type[NettyServerBuilder]], modifier[public], parameter[keepAliveTime, timeUnit]] begin[{]
call[.checkArgument, parameter[binary_operation[member[.keepAliveTime], >=, literal[0]], literal["permit keepalive time must be non-n... | Keyword[public] identifier[NettyServerBuilder] identifier[permitKeepAliveTime] operator[SEP] Keyword[long] identifier[keepAliveTime] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[keepAliveTime] operator[>=] Other[0] , literal[String] operator[SEP... |
public FutureData<PreparedHistoricsQuery> prepare(String hash, long start, long end, String name,
String... sources) {
return prepare(hash, start, end, name, -1, sources);
} | class class_name[name] begin[{]
method[prepare, return_type[type[FutureData]], modifier[public], parameter[hash, start, end, name, sources]] begin[{]
return[call[.prepare, parameter[member[.hash], member[.start], member[.end], member[.name], literal[1], member[.sources]]]]
end[}]
END[}] | Keyword[public] identifier[FutureData] operator[<] identifier[PreparedHistoricsQuery] operator[>] identifier[prepare] operator[SEP] identifier[String] identifier[hash] , Keyword[long] identifier[start] , Keyword[long] identifier[end] , identifier[String] identifier[name] , identifier[String] operator[...] identifie... |
@Override
public void exceptionCaught(IoSession session, Throwable cause) {
final IoSessionInputStream in = (IoSessionInputStream) session
.getAttribute(KEY_IN);
IOException e = null;
if (cause instanceof StreamIoException) {
e = (IOException) cause.getCause();
... | class class_name[name] begin[{]
method[exceptionCaught, return_type[void], modifier[public], parameter[session, cause]] begin[{]
local_variable[type[IoSessionInputStream], in]
local_variable[type[IOException], e]
if[binary_operation[member[.cause], instanceof, type[StreamIoExcep... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[exceptionCaught] operator[SEP] identifier[IoSession] identifier[session] , identifier[Throwable] identifier[cause] operator[SEP] {
Keyword[final] identifier[IoSessionInputStream] identifier[in] operator[=] operator[SEP] identifier[IoSes... |
protected Relation<?>[] alignColumns(ObjectBundle pack) {
// align representations.
Relation<?>[] targets = new Relation<?>[pack.metaLength()];
long[] used = BitsUtil.zero(relations.size());
for(int i = 0; i < targets.length; i++) {
SimpleTypeInformation<?> meta = pack.meta(i);
// TODO: aggr... | class class_name[name] begin[{]
method[alignColumns, return_type[type[Relation]], modifier[protected], parameter[pack]] begin[{]
local_variable[type[Relation], targets]
local_variable[type[long], used]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(ann... | Keyword[protected] identifier[Relation] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[alignColumns] operator[SEP] identifier[ObjectBundle] identifier[pack] operator[SEP] {
identifier[Relation] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[targets] operato... |
@Override
public final String toIso8601DateTimeNoTz(final Date pDate,
final Map<String, Object> pAddParam) throws Exception {
return this.dateTimeNoTzFormatIso8601.format(pDate);
} | class class_name[name] begin[{]
method[toIso8601DateTimeNoTz, return_type[type[String]], modifier[final public], parameter[pDate, pAddParam]] begin[{]
return[THIS[member[None.dateTimeNoTzFormatIso8601]call[None.format, parameter[member[.pDate]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[String] identifier[toIso8601DateTimeNoTz] operator[SEP] Keyword[final] identifier[Date] identifier[pDate] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] operator[SEP] Ke... |
public Type asSuper(Type t, Symbol sym) {
/* Some examples:
*
* (Enum<E>, Comparable) => Comparable<E>
* (c.s.s.d.AttributeTree.ValueKind, Enum) => Enum<c.s.s.d.AttributeTree.ValueKind>
* (c.s.s.t.ExpressionTree, c.s.s.t.Tree) => c.s.s.t.Tree
* (j.u.List<capture#160 ... | class class_name[name] begin[{]
method[asSuper, return_type[type[Type]], modifier[public], parameter[t, sym]] begin[{]
if[binary_operation[member[sym.type], ==, member[syms.objectType]]] begin[{]
return[member[syms.objectType]]
else begin[{]
None
end[}]
retur... | Keyword[public] identifier[Type] identifier[asSuper] operator[SEP] identifier[Type] identifier[t] , identifier[Symbol] identifier[sym] operator[SEP] {
Keyword[if] operator[SEP] identifier[sym] operator[SEP] identifier[type] operator[==] identifier[syms] operator[SEP] identifier[objectType] operator[SEP] {
... |
@SuppressWarnings("unchecked")
protected Iterable _transform(final Iterable iterable) {
if (iterable == null) return null;
if (iterable instanceof BeanIterable) return iterable;
return new BeanIterable<>(iterable, this);
} | class class_name[name] begin[{]
method[_transform, return_type[type[Iterable]], modifier[protected], parameter[iterable]] begin[{]
if[binary_operation[member[.iterable], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[binary_operat... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[Iterable] identifier[_transform] operator[SEP] Keyword[final] identifier[Iterable] identifier[iterable] operator[SEP] {
Keyword[if] operator[SEP] identifier[iterable] operator[==] Other[null] oper... |
@Override
public GetOperationsResult getOperations(GetOperationsRequest request) {
request = beforeClientExecution(request);
return executeGetOperations(request);
} | class class_name[name] begin[{]
method[getOperations, return_type[type[GetOperationsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetOperations, parameter[member[.request]]... | annotation[@] identifier[Override] Keyword[public] identifier[GetOperationsResult] identifier[getOperations] operator[SEP] identifier[GetOperationsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operato... |
static <T, I extends ChronoInterval<T>> I parsePattern(
CharSequence text,
IntervalCreator<T, I> factory,
ChronoParser<T> parser,
String pattern
) throws ParseException {
ParseLog plog = new ParseLog();
String[] components = pattern.split("\\|");
for (String... | class class_name[name] begin[{]
method[parsePattern, return_type[type[I]], modifier[static], parameter[text, factory, parser, pattern]] begin[{]
local_variable[type[ParseLog], plog]
local_variable[type[String], components]
ForStatement(body=BlockStatement(label=None, statements=[Stateme... | Keyword[static] operator[<] identifier[T] , identifier[I] Keyword[extends] identifier[ChronoInterval] operator[<] identifier[T] operator[>] operator[>] identifier[I] identifier[parsePattern] operator[SEP] identifier[CharSequence] identifier[text] , identifier[IntervalCreator] operator[<] identifier[T] , identifier[I... |
public static JSONObject getJSONConfiguration(
CmsHtmlWidgetOption widgetOptions,
CmsObject cms,
CmsResource resource,
Locale contentLocale) {
JSONObject result = new JSONObject();
CmsEditorDisplayOptions options = OpenCms.getWorkplaceManager().getEditorDisplayOptions()... | class class_name[name] begin[{]
method[getJSONConfiguration, return_type[type[JSONObject]], modifier[public static], parameter[widgetOptions, cms, resource, contentLocale]] begin[{]
local_variable[type[JSONObject], result]
local_variable[type[CmsEditorDisplayOptions], options]
local_var... | Keyword[public] Keyword[static] identifier[JSONObject] identifier[getJSONConfiguration] operator[SEP] identifier[CmsHtmlWidgetOption] identifier[widgetOptions] , identifier[CmsObject] identifier[cms] , identifier[CmsResource] identifier[resource] , identifier[Locale] identifier[contentLocale] operator[SEP] {
... |
@NotNull
public static Map<String, String> createPointer(@NotNull String oid, long size) {
final Map<String, String> pointer = new TreeMap<>();
pointer.put(VERSION, VERSION_URL);
pointer.put(OID, oid);
pointer.put(SIZE, Long.toString(size));
return pointer;
} | class class_name[name] begin[{]
method[createPointer, return_type[type[Map]], modifier[public static], parameter[oid, size]] begin[{]
local_variable[type[Map], pointer]
call[pointer.put, parameter[member[.VERSION], member[.VERSION_URL]]]
call[pointer.put, parameter[membe... | annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[createPointer] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[oid] , Keyword[long] identifier[size] operator[SEP] {
Keyword... |
@Override
void parseJSONMember(JsonObject.Member member) {
JsonValue value = member.getValue();
String memberName = member.getName();
if (memberName.equals("templateKey")) {
this.templateKey = value.asString();
} else if (memberName.equals("scope")) {
this.sco... | class class_name[name] begin[{]
method[parseJSONMember, return_type[void], modifier[default], parameter[member]] begin[{]
local_variable[type[JsonValue], value]
local_variable[type[String], memberName]
if[call[memberName.equals, parameter[literal["templateKey"]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[void] identifier[parseJSONMember] operator[SEP] identifier[JsonObject] operator[SEP] identifier[Member] identifier[member] operator[SEP] {
identifier[JsonValue] identifier[value] operator[=] identifier[member] operator[SEP] identifier[getValue] operator[SEP] operator[SE... |
@Override
@Pure
protected Rectangle2d calcBounds() {
final Rectangle2d bounds = super.calcBounds().toBoundingBox();
if (bounds != null && isWidePolyline()) {
final double w = getWidth();
final double mx = bounds.getMinX();
final double my = bounds.getMinY();
final double xx = bounds.getMaxX();
fina... | class class_name[name] begin[{]
method[calcBounds, return_type[type[Rectangle2d]], modifier[protected], parameter[]] begin[{]
local_variable[type[Rectangle2d], bounds]
if[binary_operation[binary_operation[member[.bounds], !=, literal[null]], &&, call[.isWidePolyline, parameter[]]]] begi... | annotation[@] identifier[Override] annotation[@] identifier[Pure] Keyword[protected] identifier[Rectangle2d] identifier[calcBounds] operator[SEP] operator[SEP] {
Keyword[final] identifier[Rectangle2d] identifier[bounds] operator[=] Keyword[super] operator[SEP] identifier[calcBounds] operator[SEP] operator[SEP] o... |
public CloudFileShare getShareReference(final String shareName) throws URISyntaxException, StorageException {
Utility.assertNotNullOrEmpty("shareName", shareName);
return this.getShareReference(shareName, null);
} | class class_name[name] begin[{]
method[getShareReference, return_type[type[CloudFileShare]], modifier[public], parameter[shareName]] begin[{]
call[Utility.assertNotNullOrEmpty, parameter[literal["shareName"], member[.shareName]]]
return[THIS[call[None.getShareReference, parameter[member... | Keyword[public] identifier[CloudFileShare] identifier[getShareReference] operator[SEP] Keyword[final] identifier[String] identifier[shareName] operator[SEP] Keyword[throws] identifier[URISyntaxException] , identifier[StorageException] {
identifier[Utility] operator[SEP] identifier[assertNotNullOrEmpty] operator... |
public static Intent newMapsIntent(float latitude, float longitude, String placeName) {
StringBuilder sb = new StringBuilder();
sb.append("geo:");
sb.append(latitude);
sb.append(",");
sb.append(longitude);
if (!TextUtils.isEmpty(placeName)) {
sb.append("?q="... | class class_name[name] begin[{]
method[newMapsIntent, return_type[type[Intent]], modifier[public static], parameter[latitude, longitude, placeName]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["geo:"]]]
call[sb.append, parameter[mem... | Keyword[public] Keyword[static] identifier[Intent] identifier[newMapsIntent] operator[SEP] Keyword[float] identifier[latitude] , Keyword[float] identifier[longitude] , identifier[String] identifier[placeName] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBui... |
public static String writeConfigurationFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ) {
return new FileDefinitionSerializer( lineSeparator ).write( relationsFile, writeComments );
} | class class_name[name] begin[{]
method[writeConfigurationFile, return_type[type[String]], modifier[public static], parameter[relationsFile, writeComments, lineSeparator]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=lineSeparator, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[static] identifier[String] identifier[writeConfigurationFile] operator[SEP] identifier[FileDefinition] identifier[relationsFile] , Keyword[boolean] identifier[writeComments] , identifier[String] identifier[lineSeparator] operator[SEP] {
Keyword[return] Keyword[new] identifier[FileDefini... |
private Topology createAdHocTopologyFromSuitableOptions(SuitableOptions appInfoSuitableOptions) {
Topology topology = new Topology();
TopologyElement current = null;
TopologyElement previous = null;
for (String moduleName : appInfoSuitableOptions.getStringIterator()) {
if (current =... | class class_name[name] begin[{]
method[createAdHocTopologyFromSuitableOptions, return_type[type[Topology]], modifier[private], parameter[appInfoSuitableOptions]] begin[{]
local_variable[type[Topology], topology]
local_variable[type[TopologyElement], current]
local_variable[type[Topology... | Keyword[private] identifier[Topology] identifier[createAdHocTopologyFromSuitableOptions] operator[SEP] identifier[SuitableOptions] identifier[appInfoSuitableOptions] operator[SEP] {
identifier[Topology] identifier[topology] operator[=] Keyword[new] identifier[Topology] operator[SEP] operator[SEP] operator[SEP] i... |
private boolean isRunContainer(int i, boolean hasrun) {
if (hasrun) { // info is in the buffer
int j = buffer.get(startofrunbitmap + i / 8);
int mask = 1 << (i % 8);
return (j & mask) != 0;
} else {
return false;
}
} | class class_name[name] begin[{]
method[isRunContainer, return_type[type[boolean]], modifier[private], parameter[i, hasrun]] begin[{]
if[member[.hasrun]] begin[{]
local_variable[type[int], j]
local_variable[type[int], mask]
return[binary_operation[binary_opera... | Keyword[private] Keyword[boolean] identifier[isRunContainer] operator[SEP] Keyword[int] identifier[i] , Keyword[boolean] identifier[hasrun] operator[SEP] {
Keyword[if] operator[SEP] identifier[hasrun] operator[SEP] {
Keyword[int] identifier[j] operator[=] identifier[buffer] operator[SEP] identifier[g... |
public static <T extends Comparable<? super T>> T median(final Collection<? extends T> c) {
N.checkArgNotNullOrEmpty(c, "The spcified collection 'c' can not be null or empty");
return median(c, 0, c.size());
} | class class_name[name] begin[{]
method[median, return_type[type[T]], modifier[public static], parameter[c]] begin[{]
call[N.checkArgNotNullOrEmpty, parameter[member[.c], literal["The spcified collection 'c' can not be null or empty"]]]
return[call[.median, parameter[member[.c], literal[... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[T] identifier[median] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] opera... |
public void run()
throws IOException, InterruptedException {
if (!this.workUnits.hasNext()) {
log.warn("No work units to run in container " + containerIdOptional.or(""));
return;
}
CountUpAndDownLatch countDownLatch = new CountUpAndDownLatch(0);
this.tasks = runWorkUnits(countDownLatc... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.workUnits]call[None.hasNext, parameter[]]]] begin[{]
call[log.warn, parameter[binary_operation[literal["No work units to run in container "], +, cal... | Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[workUnits] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SE... |
@NonNull
public static AlterMaterializedViewStart alterMaterializedView(
@Nullable String keyspace, @NonNull String viewName) {
return alterMaterializedView(
keyspace == null ? null : CqlIdentifier.fromCql(keyspace), CqlIdentifier.fromCql(viewName));
} | class class_name[name] begin[{]
method[alterMaterializedView, return_type[type[AlterMaterializedViewStart]], modifier[public static], parameter[keyspace, viewName]] begin[{]
return[call[.alterMaterializedView, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=keyspac... | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[AlterMaterializedViewStart] identifier[alterMaterializedView] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[keyspace] , annotation[@] identifier[NonNull] identifier[String] identifier[viewName] operator[SEP] ... |
public void scan(Reader r0, ScanHandler h) throws IOException, SAXException {
theState = S_PCDATA;
PushbackReader r;
if (r0 instanceof PushbackReader) {
r = (PushbackReader) r0;
} else if (r0 instanceof BufferedReader) {
r = new PushbackReader(r0);
} else ... | class class_name[name] begin[{]
method[scan, return_type[void], modifier[public], parameter[r0, h]] begin[{]
assign[member[.theState], member[.S_PCDATA]]
local_variable[type[PushbackReader], r]
if[binary_operation[member[.r0], instanceof, type[PushbackReader]]] begin[{]
... | Keyword[public] Keyword[void] identifier[scan] operator[SEP] identifier[Reader] identifier[r0] , identifier[ScanHandler] identifier[h] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] {
identifier[theState] operator[=] identifier[S_PCDATA] operator[SEP] identifier[PushbackReader... |
public static void addDependencyManagement(File pom, Dependency dependency, Log logger) throws IOException, XmlPullParserException {
Model model = getModelFromPOM(pom, logger);
DependencyManagement dMgmt = model.getDependencyManagement();
if (dMgmt == null) {
model.setDependencyManagement(new DependencyMana... | class class_name[name] begin[{]
method[addDependencyManagement, return_type[void], modifier[public static], parameter[pom, dependency, logger]] begin[{]
local_variable[type[Model], model]
local_variable[type[DependencyManagement], dMgmt]
if[binary_operation[member[.dMgmt], ==, l... | Keyword[public] Keyword[static] Keyword[void] identifier[addDependencyManagement] operator[SEP] identifier[File] identifier[pom] , identifier[Dependency] identifier[dependency] , identifier[Log] identifier[logger] operator[SEP] Keyword[throws] identifier[IOException] , identifier[XmlPullParserException] {
ide... |
public Entity setFieldNames(String... fieldNames) {
if (ArrayUtil.isNotEmpty(fieldNames)) {
this.fieldNames = CollectionUtil.newHashSet(fieldNames);
}
return this;
} | class class_name[name] begin[{]
method[setFieldNames, return_type[type[Entity]], modifier[public], parameter[fieldNames]] begin[{]
if[call[ArrayUtil.isNotEmpty, parameter[member[.fieldNames]]]] begin[{]
assign[THIS[member[None.fieldNames]], call[CollectionUtil.newHashSet... | Keyword[public] identifier[Entity] identifier[setFieldNames] operator[SEP] identifier[String] operator[...] identifier[fieldNames] operator[SEP] {
Keyword[if] operator[SEP] identifier[ArrayUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[fieldNames] operator[SEP] operator[SEP] {
Key... |
@Override
public void add(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException {
getClient().sendAdd(null, subject, predicate, object, contexts);
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[subject, predicate, object, contexts]] begin[{]
call[.getClient, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[Resource] identifier[subject] , identifier[URI] identifier[predicate] , identifier[Value] identifier[object] , identifier[Resource] operator[...] identifier[contexts] operator[SEP] Keyword[throws] identifier[Rep... |
public ListDocumentClassificationJobsResult withDocumentClassificationJobPropertiesList(
DocumentClassificationJobProperties... documentClassificationJobPropertiesList) {
if (this.documentClassificationJobPropertiesList == null) {
setDocumentClassificationJobPropertiesList(new java.util.... | class class_name[name] begin[{]
method[withDocumentClassificationJobPropertiesList, return_type[type[ListDocumentClassificationJobsResult]], modifier[public], parameter[documentClassificationJobPropertiesList]] begin[{]
if[binary_operation[THIS[member[None.documentClassificationJobPropertiesLis... | Keyword[public] identifier[ListDocumentClassificationJobsResult] identifier[withDocumentClassificationJobPropertiesList] operator[SEP] identifier[DocumentClassificationJobProperties] operator[...] identifier[documentClassificationJobPropertiesList] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator... |
public String getState()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getState");
//The only valid states in the SourceStream are Uncommitted,
//Value and Completed so all tick ranges will be in one of
//these states
TickRange range = getTickRange();
... | class class_name[name] begin[{]
method[getState, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc],... | Keyword[public] identifier[String] identifier[getState] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] ope... |
public static AddTorrentParams parseMagnetUri(String uri) {
error_code ec = new error_code();
add_torrent_params params = add_torrent_params.parse_magnet_uri(uri, ec);
if (ec.value() != 0) {
throw new IllegalArgumentException("Invalid magnet uri: " + ec.message());
}
... | class class_name[name] begin[{]
method[parseMagnetUri, return_type[type[AddTorrentParams]], modifier[public static], parameter[uri]] begin[{]
local_variable[type[error_code], ec]
local_variable[type[add_torrent_params], params]
if[binary_operation[call[ec.value, parameter[]], !=... | Keyword[public] Keyword[static] identifier[AddTorrentParams] identifier[parseMagnetUri] operator[SEP] identifier[String] identifier[uri] operator[SEP] {
identifier[error_code] identifier[ec] operator[=] Keyword[new] identifier[error_code] operator[SEP] operator[SEP] operator[SEP] identifier[add_torrent_params] i... |
public SparseSquareMatrix plus(SparseSquareMatrix B) {
SparseSquareMatrix A = this;
if (A.N != B.N) throw new IllegalArgumentException("Dimensions disagree. " + A.N + " != " + B.N);
SparseSquareMatrix C = new SparseSquareMatrix(N);
for (int i = 0; i < N; i++)
C.rows[i] = A.rows[i].plus(B.rows[i]);
ret... | class class_name[name] begin[{]
method[plus, return_type[type[SparseSquareMatrix]], modifier[public], parameter[B]] begin[{]
local_variable[type[SparseSquareMatrix], A]
if[binary_operation[member[A.N], !=, member[B.N]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOp... | Keyword[public] identifier[SparseSquareMatrix] identifier[plus] operator[SEP] identifier[SparseSquareMatrix] identifier[B] operator[SEP] {
identifier[SparseSquareMatrix] identifier[A] operator[=] Keyword[this] operator[SEP] Keyword[if] operator[SEP] identifier[A] operator[SEP] identifier[N] operator[!=] identifi... |
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "tel_privat")
public JAXBElement<String> createTelPrivat(String value) {
return new JAXBElement<String>(_TelPrivat_QNAME, String.class, null, value);
} | class class_name[name] begin[{]
method[createTelPrivat, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_TelPrivat_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_opera... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[String] operator[>] identifier[createTelPrivat] operator[SEP] identifier[String] identifie... |
void setFaviconIfExist() {
try {
CmsResource favicon = m_clonedCms.readResource(m_site.getSiteRoot() + "/" + CmsSiteManager.FAVICON);
setCurrentFavIcon(m_clonedCms.readFile(favicon).getContents()); //FavIcon was found -> give it to the UI
} catch (CmsException e) {
/... | class class_name[name] begin[{]
method[setFaviconIfExist, return_type[void], modifier[default], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperat... | Keyword[void] identifier[setFaviconIfExist] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[CmsResource] identifier[favicon] operator[=] identifier[m_clonedCms] operator[SEP] identifier[readResource] operator[SEP] identifier[m_site] operator[SEP] identifier[getSiteRoot] operator[SEP] operator[... |
public void addChild(TreeNode node) {
if (children == null)
children = new ArrayList<TreeNode>();
children.add(node);
} | class class_name[name] begin[{]
method[addChild, return_type[void], modifier[public], parameter[node]] begin[{]
if[binary_operation[member[.children], ==, literal[null]]] begin[{]
assign[member[.children], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfi... | Keyword[public] Keyword[void] identifier[addChild] operator[SEP] identifier[TreeNode] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[children] operator[==] Other[null] operator[SEP] identifier[children] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TreeNode] operato... |
public void loadNextPage() {
this.currentPage = cachedPage;
cachedPage = null;
this.items.addAll(currentPage.items());
cachePage(currentPage.nextPageLink());
} | class class_name[name] begin[{]
method[loadNextPage, return_type[void], modifier[public], parameter[]] begin[{]
assign[THIS[member[None.currentPage]], member[.cachedPage]]
assign[member[.cachedPage], literal[null]]
THIS[member[None.items]call[None.addAll, paramet... | Keyword[public] Keyword[void] identifier[loadNextPage] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[currentPage] operator[=] identifier[cachedPage] operator[SEP] identifier[cachedPage] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[items] operator[SEP] identi... |
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
DateTimePicker dtp = (DateTimePicker) component;
ResponseWriter rw = context.getResponseWriter();
String dateTimePickerId = encodeHTML(context, rw, dtp);
encodeJS... | class class_name[name] begin[{]
method[encodeBegin, return_type[void], modifier[public], parameter[context, component]] begin[{]
if[call[component.isRendered, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[DateTimePicker], d... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[encodeBegin] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[component] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[component] ... |
@Override
public RebootRelationalDatabaseResult rebootRelationalDatabase(RebootRelationalDatabaseRequest request) {
request = beforeClientExecution(request);
return executeRebootRelationalDatabase(request);
} | class class_name[name] begin[{]
method[rebootRelationalDatabase, return_type[type[RebootRelationalDatabaseResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeRebootRelationalData... | annotation[@] identifier[Override] Keyword[public] identifier[RebootRelationalDatabaseResult] identifier[rebootRelationalDatabase] operator[SEP] identifier[RebootRelationalDatabaseRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifi... |
private static void collectDecorators(List<DecoratorAndOrder> list, List<Annotation> annotations) {
if (annotations.isEmpty()) {
return;
}
// Respect the order of decorators which is specified by a user. The first one is first applied
// for most of the cases. But if @Decora... | class class_name[name] begin[{]
method[collectDecorators, return_type[void], modifier[private static], parameter[list, annotations]] begin[{]
if[call[annotations.isEmpty, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStatement(body=BlockSta... | Keyword[private] Keyword[static] Keyword[void] identifier[collectDecorators] operator[SEP] identifier[List] operator[<] identifier[DecoratorAndOrder] operator[>] identifier[list] , identifier[List] operator[<] identifier[Annotation] operator[>] identifier[annotations] operator[SEP] {
Keyword[if] operator[SEP] i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.