code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@SuppressWarnings("unchecked")
@Override
public boolean contains(Object o) {
return o != null
&& o instanceof Pair<?, ?>
&& contains(((Pair<T, I>) o).transaction, ((Pair<T, I>) o).item);
} | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[public], parameter[o]] begin[{]
return[binary_operation[binary_operation[binary_operation[member[.o], !=, literal[null]], &&, binary_operation[member[.o], instanceof, type[Pair]]], &&, call[.contains, parameter[Cast(e... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[return] identifier[o] operator[!=] Other[null] operator[&&] identi... |
public Matrix multiplyTranspose(final Matrix B, ExecutorService threadPool)
{
Matrix C = new DenseMatrix(this.rows(), B.rows());
multiplyTranspose(B, C, threadPool);
return C;
} | class class_name[name] begin[{]
method[multiplyTranspose, return_type[type[Matrix]], modifier[public], parameter[B, threadPool]] begin[{]
local_variable[type[Matrix], C]
call[.multiplyTranspose, parameter[member[.B], member[.C], member[.threadPool]]]
return[member[.C]]
end[}... | Keyword[public] identifier[Matrix] identifier[multiplyTranspose] operator[SEP] Keyword[final] identifier[Matrix] identifier[B] , identifier[ExecutorService] identifier[threadPool] operator[SEP] {
identifier[Matrix] identifier[C] operator[=] Keyword[new] identifier[DenseMatrix] operator[SEP] Keyword[this] operat... |
public void onClickOk(CmsResource selected) {
try {
CmsResource target = selected;
CmsResource source = m_context.getResources().get(0);
CmsLocaleGroupService service = A_CmsUI.getCmsObject().getLocaleGroupService();
service.attachLocaleGroupIndirect(source, targ... | class class_name[name] begin[{]
method[onClickOk, return_type[void], modifier[public], parameter[selected]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=selected, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[void] identifier[onClickOk] operator[SEP] identifier[CmsResource] identifier[selected] operator[SEP] {
Keyword[try] {
identifier[CmsResource] identifier[target] operator[=] identifier[selected] operator[SEP] identifier[CmsResource] identifier[source] operator[=] identifier[m_co... |
public long set(ReadablePartial partial, long instant) {
for (int i = 0, isize = partial.size(); i < isize; i++) {
instant = partial.getFieldType(i).getField(this).set(instant, partial.getValue(i));
}
return instant;
} | class class_name[name] begin[{]
method[set, return_type[type[long]], modifier[public], parameter[partial, instant]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=instant, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[long] identifier[set] operator[SEP] identifier[ReadablePartial] identifier[partial] , Keyword[long] identifier[instant] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[isize] operator[=] identifier[partial] operator[SEP] identifier... |
boolean isInsideCircle(float centerPointX, float centerPointY, float radius) {
double xValue = Math.pow((getX() - centerPointX), 2);
double yValue = Math.pow((getY() - centerPointY), 2);
double radiusValue = Math.pow(radius, 2);
boolean touchPointInsideCircle = xValue + yValue <= radiusValue;
LOGGER.trace("De... | class class_name[name] begin[{]
method[isInsideCircle, return_type[type[boolean]], modifier[default], parameter[centerPointX, centerPointY, radius]] begin[{]
local_variable[type[double], xValue]
local_variable[type[double], yValue]
local_variable[type[double], radiusValue]
local... | Keyword[boolean] identifier[isInsideCircle] operator[SEP] Keyword[float] identifier[centerPointX] , Keyword[float] identifier[centerPointY] , Keyword[float] identifier[radius] operator[SEP] {
Keyword[double] identifier[xValue] operator[=] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SE... |
private static void addLogoToHeader(final HorizontalLayout topHeader) {
final ThemeResource ciaLogoResource = new ThemeResource("cia-logo.png");
final Image ciaLogoImage = new Image(null,ciaLogoResource);
topHeader.addComponent(ciaLogoImage);
ciaLogoImage.setWidth("60px");
ciaLogoImage.setHeight("60px");
to... | class class_name[name] begin[{]
method[addLogoToHeader, return_type[void], modifier[private static], parameter[topHeader]] begin[{]
local_variable[type[ThemeResource], ciaLogoResource]
local_variable[type[Image], ciaLogoImage]
call[topHeader.addComponent, parameter[member[.ciaLo... | Keyword[private] Keyword[static] Keyword[void] identifier[addLogoToHeader] operator[SEP] Keyword[final] identifier[HorizontalLayout] identifier[topHeader] operator[SEP] {
Keyword[final] identifier[ThemeResource] identifier[ciaLogoResource] operator[=] Keyword[new] identifier[ThemeResource] operator[SEP] literal[... |
private static BindingConfiguration parseDocument(Document doc) {
BindingConfiguration result = new BindingConfiguration();
Element docRoot = doc.getDocumentElement();
for (Node next : new IterableNodeList(docRoot.getChildNodes())) {
if (Node.ELEMENT_NODE == next.getNodeType(... | class class_name[name] begin[{]
method[parseDocument, return_type[type[BindingConfiguration]], modifier[private static], parameter[doc]] begin[{]
local_variable[type[BindingConfiguration], result]
local_variable[type[Element], docRoot]
ForStatement(body=BlockStatement(label=None, statem... | Keyword[private] Keyword[static] identifier[BindingConfiguration] identifier[parseDocument] operator[SEP] identifier[Document] identifier[doc] operator[SEP] {
identifier[BindingConfiguration] identifier[result] operator[=] Keyword[new] identifier[BindingConfiguration] operator[SEP] operator[SEP] operator[SEP] id... |
public List<Token> scan() {
ArrayList<Token> tokens = new ArrayList<>();
pos = 0;
while (pos < input.length()) {
char c = input.charAt(pos);
if (isDigit(c)) {
tokens.add(scanNumericLiteral());
} else if (c == '"') {
tokens.add(scanStringLiteral());
} else if (c == '\'') {
tokens.add(scan... | class class_name[name] begin[{]
method[scan, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[ArrayList], tokens]
assign[member[.pos], literal[0]]
while[binary_operation[member[.pos], <, call[input.length, parameter[]]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[Token] operator[>] identifier[scan] operator[SEP] operator[SEP] {
identifier[ArrayList] operator[<] identifier[Token] operator[>] identifier[tokens] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[... |
private void addResponseHeaders(Record record, Response response) throws StageException {
if (conf.headerOutputLocation == HeaderOutputLocation.NONE) {
return;
}
Record.Header header = record.getHeader();
if (conf.headerOutputLocation == HeaderOutputLocation.FIELD) {
writeResponseHeaderToF... | class class_name[name] begin[{]
method[addResponseHeaders, return_type[void], modifier[private], parameter[record, response]] begin[{]
if[binary_operation[member[conf.headerOutputLocation], ==, member[HeaderOutputLocation.NONE]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[addResponseHeaders] operator[SEP] identifier[Record] identifier[record] , identifier[Response] identifier[response] operator[SEP] Keyword[throws] identifier[StageException] {
Keyword[if] operator[SEP] identifier[conf] operator[SEP] identifier[headerOutputLocation] opera... |
protected void createGatewayRequestCheckDecisionState(final Flow flow) {
createDecisionState(flow, CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK,
"requestParameters.gateway != '' and requestParameters.gateway != null and flowScope.service != null",
CasWebflowConstants.STATE_ID_GATEW... | class class_name[name] begin[{]
method[createGatewayRequestCheckDecisionState, return_type[void], modifier[protected], parameter[flow]] begin[{]
call[.createDecisionState, parameter[member[.flow], member[CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK], literal["requestParameters.gateway != ... | Keyword[protected] Keyword[void] identifier[createGatewayRequestCheckDecisionState] operator[SEP] Keyword[final] identifier[Flow] identifier[flow] operator[SEP] {
identifier[createDecisionState] operator[SEP] identifier[flow] , identifier[CasWebflowConstants] operator[SEP] identifier[STATE_ID_GATEWAY_REQUEST_CH... |
private String createHandler(TypeElement type, ExecutableElement execute, String[] paths, boolean isRest) {
FieldSpec hostField = FieldSpec.builder(Object.class, "mHost").addModifiers(Modifier.PRIVATE).build();
MethodSpec rootMethod = MethodSpec.constructorBuilder()
.addModifiers(Modifier.P... | class class_name[name] begin[{]
method[createHandler, return_type[type[String]], modifier[private], parameter[type, execute, paths, isRest]] begin[{]
local_variable[type[FieldSpec], hostField]
local_variable[type[MethodSpec], rootMethod]
local_variable[type[CodeBlock], handleCode]
... | Keyword[private] identifier[String] identifier[createHandler] operator[SEP] identifier[TypeElement] identifier[type] , identifier[ExecutableElement] identifier[execute] , identifier[String] operator[SEP] operator[SEP] identifier[paths] , Keyword[boolean] identifier[isRest] operator[SEP] {
identifier[FieldSpec... |
public static base_responses add(nitro_service client, snmpuser resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
snmpuser addresources[] = new snmpuser[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new snmpuser();
... | class class_name[name] begin[{]
method[add, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[m... | Keyword[public] Keyword[static] identifier[base_responses] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[snmpuser] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result] opera... |
public static boolean isInitialAckDRId(long drId) {
if (drId == -1) return true;
int clusterId = getClusterIdFromDRId(drId);
if (clusterId >= 0 && clusterId <= MAX_CLUSTER_ID) {
return ((drId >>> 63) != 1L) && (getSequenceNumberFromDRId(drId) == MAX_SEQUENCE_NUMBER);
}
... | class class_name[name] begin[{]
method[isInitialAckDRId, return_type[type[boolean]], modifier[public static], parameter[drId]] begin[{]
if[binary_operation[member[.drId], ==, literal[1]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
local_variable[type[int], ... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isInitialAckDRId] operator[SEP] Keyword[long] identifier[drId] operator[SEP] {
Keyword[if] operator[SEP] identifier[drId] operator[==] operator[-] Other[1] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[int] identifier[clusterId] o... |
protected Optional<SamlRegisteredServiceServiceProviderMetadataFacade> getSamlMetadataFacadeFor(
final SamlRegisteredService registeredService, final String entityId) {
return SamlRegisteredServiceServiceProviderMetadataFacade.get(
samlProfileHandlerConfigurationContext.getSamlRegisteredServ... | class class_name[name] begin[{]
method[getSamlMetadataFacadeFor, return_type[type[Optional]], modifier[protected], parameter[registeredService, entityId]] begin[{]
return[call[SamlRegisteredServiceServiceProviderMetadataFacade.get, parameter[call[samlProfileHandlerConfigurationContext.getSamlRegistered... | Keyword[protected] identifier[Optional] operator[<] identifier[SamlRegisteredServiceServiceProviderMetadataFacade] operator[>] identifier[getSamlMetadataFacadeFor] operator[SEP] Keyword[final] identifier[SamlRegisteredService] identifier[registeredService] , Keyword[final] identifier[String] identifier[entityId] opera... |
public static <T> OptionalValue<T> ofNullable(ResourceKey key, T value) {
return new GenericOptionalValue<T>(RUNTIME_SOURCE, key, value);
} | class class_name[name] begin[{]
method[ofNullable, return_type[type[OptionalValue]], modifier[public static], parameter[key, value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=RUNTIME_SOURCE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(membe... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[OptionalValue] operator[<] identifier[T] operator[>] identifier[ofNullable] operator[SEP] identifier[ResourceKey] identifier[key] , identifier[T] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[GenericOpti... |
public void add(final Object obj) {
final Class<?> clazz = obj.getClass();
if (this.clazzes.contains(clazz)) {
throw new IllegalArgumentException(
"Only one class-instance per benchmark allowed");
} else {
this.clazzes.add(clazz);
this.objects.add(obj);
}
} | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[obj]] begin[{]
local_variable[type[Class], clazz]
if[THIS[member[None.clazzes]call[None.contains, parameter[member[.clazz]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments... | Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[SEP] {
Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[... |
private boolean isInt(String str) {
try {
Integer.parseInt(str);
} catch (NumberFormatException e) {
return false;
}
return true;
} | class class_name[name] begin[{]
method[isInt, return_type[type[boolean]], modifier[private], parameter[str]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=... | Keyword[private] Keyword[boolean] identifier[isInt] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[try] {
identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[str] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[N... |
@SuppressFBWarnings(value = "DP_DO_INSIDE_DO_PRIVILEGED", justification = "Only called in test code, not production.")
public Object get() {
field.setAccessible(true);
try {
return field.get(object);
}
catch (IllegalAccessException e) {
throw new ReflectionExc... | class class_name[name] begin[{]
method[get, return_type[type[Object]], modifier[public], parameter[]] begin[{]
call[field.setAccessible, parameter[literal[true]]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=... | annotation[@] identifier[SuppressFBWarnings] operator[SEP] identifier[value] operator[=] literal[String] , identifier[justification] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Object] identifier[get] operator[SEP] operator[SEP] {
identifier[field] operator[SEP] identifier[setAccessible... |
public Field getField(String name) {
if (fieldMap == null) {
return null;
}
return fieldMap.get(name);
} | class class_name[name] begin[{]
method[getField, return_type[type[Field]], modifier[public], parameter[name]] begin[{]
if[binary_operation[member[.fieldMap], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[call[fieldMap.get... | Keyword[public] identifier[Field] identifier[getField] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[fieldMap] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[return] identifier[fieldMap... |
protected SqlForClass getSqlForClass(ClassDescriptor cld)
{
SqlForClass result = (SqlForClass) sqlForClass.get(cld);
if(result == null)
{
result = newInstanceSqlForClass();
sqlForClass.put(cld, result);
}
return result;
} | class class_name[name] begin[{]
method[getSqlForClass, return_type[type[SqlForClass]], modifier[protected], parameter[cld]] begin[{]
local_variable[type[SqlForClass], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
assign[member[.result]... | Keyword[protected] identifier[SqlForClass] identifier[getSqlForClass] operator[SEP] identifier[ClassDescriptor] identifier[cld] operator[SEP] {
identifier[SqlForClass] identifier[result] operator[=] operator[SEP] identifier[SqlForClass] operator[SEP] identifier[sqlForClass] operator[SEP] identifier[get] operator... |
public static long getMBRss(Client client) {
assert(client != null);
long rssMax = 0;
try {
ClientResponse r = client.callProcedure("@Statistics", "MEMORY", 0);
VoltTable stats = r.getResults()[0];
stats.resetRowPosition();
while (stats.advanceRow(... | class class_name[name] begin[{]
method[getMBRss, return_type[type[long]], modifier[public static], parameter[client]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix... | Keyword[public] Keyword[static] Keyword[long] identifier[getMBRss] operator[SEP] identifier[Client] identifier[client] operator[SEP] {
Keyword[assert] operator[SEP] identifier[client] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[long] identifier[rssMax] operator[=] Other[0] operator[SEP] Keyword[... |
@Override
public final void createPartControl(Composite parent) {
root = createRootControl(parent);
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
} | class class_name[name] begin[{]
method[createPartControl, return_type[void], modifier[final public], parameter[parent]] begin[{]
assign[member[.root], call[.createRootControl, parameter[member[.parent]]]]
call[.makeActions, parameter[]]
call[.hookContextMenu, par... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[createPartControl] operator[SEP] identifier[Composite] identifier[parent] operator[SEP] {
identifier[root] operator[=] identifier[createRootControl] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[m... |
@Override
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException {
// Just get the ClassContext from the analysis cache
// and apply the detector to it.
IAnalysisCache analysisCache = Global.getAnalysisCache();
ClassContext classContext = analysisCa... | class class_name[name] begin[{]
method[visitClass, return_type[void], modifier[public], parameter[classDescriptor]] begin[{]
local_variable[type[IAnalysisCache], analysisCache]
local_variable[type[ClassContext], classContext]
local_variable[type[Profiler], profiler]
call... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitClass] operator[SEP] identifier[ClassDescriptor] identifier[classDescriptor] operator[SEP] Keyword[throws] identifier[CheckedAnalysisException] {
identifier[IAnalysisCache] identifier[analysisCache] operator[=] identifier[Global] op... |
private static Legend createLegendOutside() {
return setLegendStyling(new Legend().setShow(true)
.setRendererOptions(
new EnhancedLegendRenderer().setSeriesToggle(SeriesToggles.NORMAL).setSeriesToggleReplot(true).setNumberColumns(LEGEND_COLUMNS).setNumberRows(LEGEND_ROWS))
.setPlacement(LegendPlacements... | class class_name[name] begin[{]
method[createLegendOutside, return_type[type[Legend]], modifier[private static], parameter[]] begin[{]
return[call[.setLegendStyling, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=Non... | Keyword[private] Keyword[static] identifier[Legend] identifier[createLegendOutside] operator[SEP] operator[SEP] {
Keyword[return] identifier[setLegendStyling] operator[SEP] Keyword[new] identifier[Legend] operator[SEP] operator[SEP] operator[SEP] identifier[setShow] operator[SEP] literal[boolean] operator[SEP] o... |
public final void annotateNEsToKAF(final KAFDocument kaf) throws IOException {
List<Span> allSpans = null;
List<List<WF>> sentences = kaf.getSentences();
for (List<WF> sentence : sentences) {
// process each sentence
String[] tokens = new String[sentence.size()];
String[] tokenIds = new ... | class class_name[name] begin[{]
method[annotateNEsToKAF, return_type[void], modifier[final public], parameter[kaf]] begin[{]
local_variable[type[List], allSpans]
local_variable[type[List], sentences]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annot... | Keyword[public] Keyword[final] Keyword[void] identifier[annotateNEsToKAF] operator[SEP] Keyword[final] identifier[KAFDocument] identifier[kaf] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[List] operator[<] identifier[Span] operator[>] identifier[allSpans] operator[=] Other[null] operator[SE... |
public static String sanitizeAsString(String url, @CompileTimeConstant final String identifier) {
if (!isSafeUrl(url, EMPTY_CUSTOM_SCHEMES)) {
return "about:invalid#" + identifier;
}
return url;
} | class class_name[name] begin[{]
method[sanitizeAsString, return_type[type[String]], modifier[public static], parameter[url, identifier]] begin[{]
if[call[.isSafeUrl, parameter[member[.url], member[.EMPTY_CUSTOM_SCHEMES]]]] begin[{]
return[binary_operation[literal["about:invalid#"], ... | Keyword[public] Keyword[static] identifier[String] identifier[sanitizeAsString] operator[SEP] identifier[String] identifier[url] , annotation[@] identifier[CompileTimeConstant] Keyword[final] identifier[String] identifier[identifier] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isSafeUrl] op... |
@Override
public void run()
{
try {
runImpl();
} catch (final Throwable e) {
// env/0203 vs env/0206
if (e instanceof DisplayableException)
log.warning(e.getMessage());
else
log.warning(e.toString());
_exception = e;
} finally {
notifyComplete()... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=runImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[runImpl] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] Keyword[final] identifier[Throwable] identifier[e] operator[SEP] {
... |
@Override
public RateLimiter rateLimiter(String name, String configName) {
return computeIfAbsent(name, () -> RateLimiter.of(name, getConfiguration(configName)
.orElseThrow(() -> new ConfigurationNotFoundException(configName))));
} | class class_name[name] begin[{]
method[rateLimiter, return_type[type[RateLimiter]], modifier[public], parameter[name, configName]] begin[{]
return[call[.computeIfAbsent, parameter[member[.name], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_... | annotation[@] identifier[Override] Keyword[public] identifier[RateLimiter] identifier[rateLimiter] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[configName] operator[SEP] {
Keyword[return] identifier[computeIfAbsent] operator[SEP] identifier[name] , operator[SEP] operator[SE... |
@Override
public void write(final byte[] b, final int offset, final int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if (offset < 0 || len < 0) {
throw new IndexOutOfBoundsException();
} else if (offset > b.length || offset + len... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[b, offset, len]] begin[{]
if[binary_operation[member[.b], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] ... |
@Override
public Long handle(ResultSet rs) throws SQLException {
if (rs.next()) {
if (this.columnName == null) {
return ((Number) rs.getObject(this.columnIndex)).longValue();
}
return ((Number) rs.getObject(this.columnIndex)).longValue();
}
return null;
} | class class_name[name] begin[{]
method[handle, return_type[type[Long]], modifier[public], parameter[rs]] begin[{]
if[call[rs.next, parameter[]]] begin[{]
if[binary_operation[THIS[member[None.columnName]], ==, literal[null]]] begin[{]
return[Cast(expressio... | annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[handle] operator[SEP] identifier[ResultSet] identifier[rs] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[rs] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] {
... |
public RuleSet getRuleTree(String surt) {
RuleSet rules = new RuleSet();
// add the root SURT
rules.addAll(getRulesWithExactSurt("("));
boolean first = true;
for (String search: new NewSurtTokenizer(surt).getSearchList()) {
if (first) {
... | class class_name[name] begin[{]
method[getRuleTree, return_type[type[RuleSet]], modifier[public], parameter[surt]] begin[{]
local_variable[type[RuleSet], rules]
call[rules.addAll, parameter[call[.getRulesWithExactSurt, parameter[literal["("]]]]]
local_variable[type[boolean], fir... | Keyword[public] identifier[RuleSet] identifier[getRuleTree] operator[SEP] identifier[String] identifier[surt] operator[SEP] {
identifier[RuleSet] identifier[rules] operator[=] Keyword[new] identifier[RuleSet] operator[SEP] operator[SEP] operator[SEP] identifier[rules] operator[SEP] identifier[addAll] operator[SE... |
public String nextString() {
nextClean('"');
StringBuilder sb = new StringBuilder();
for (;;) {
char c = next();
switch (c) {
case 0:
case '\n':
case '\r':
throw syntaxError("Unterminated string");
... | class class_name[name] begin[{]
method[nextString, return_type[type[String]], modifier[public], parameter[]] begin[{]
call[.nextClean, parameter[literal['"']]]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclarati... | Keyword[public] identifier[String] identifier[nextString] operator[SEP] operator[SEP] {
identifier[nextClean] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for... |
@Override
public void putInfo(String name, String val) {
this.infoMap.put(name, val);
} | class class_name[name] begin[{]
method[putInfo, return_type[void], modifier[public], parameter[name, val]] begin[{]
THIS[member[None.infoMap]call[None.put, parameter[member[.name], member[.val]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[putInfo] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[val] operator[SEP] {
Keyword[this] operator[SEP] identifier[infoMap] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[v... |
void setId(String sessionAuthId) {
synchronized (lock) {
if (isCreatingSession.get()) {
this.sessionAuthId = sessionAuthId;
}
lock.notifyAll();
}
} | class class_name[name] begin[{]
method[setId, return_type[void], modifier[default], parameter[sessionAuthId]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[call[isCreatingSession.get, parameter[]]] begin[{]
assign[THIS[member[None.sessi... | Keyword[void] identifier[setId] operator[SEP] identifier[String] identifier[sessionAuthId] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] identifier[isCreatingSession] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP... |
public List<Subject> setupSubjects(List<Map<URI, List<AttributeValue>>> subjs) {
if (subjs == null || subjs.size() == 0) {
return Collections.singletonList(new Subject(new ArrayList<Attribute>()));
}
List<Subject> subjects = new ArrayList<Subject>(subjs.size());
// Go throu... | class class_name[name] begin[{]
method[setupSubjects, return_type[type[List]], modifier[public], parameter[subjs]] begin[{]
if[binary_operation[binary_operation[member[.subjs], ==, literal[null]], ||, binary_operation[call[subjs.size, parameter[]], ==, literal[0]]]] begin[{]
return[... | Keyword[public] identifier[List] operator[<] identifier[Subject] operator[>] identifier[setupSubjects] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[URI] , identifier[List] operator[<] identifier[AttributeValue] operator[>] operator[>] operator[>] identifier[subjs] operator[SEP] {
... |
public String getSubtext() {
String subtext = attrMixin.getAttribute(SUBTEXT);
return subtext.isEmpty() ? null : subtext;
} | class class_name[name] begin[{]
method[getSubtext, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], subtext]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=subt... | Keyword[public] identifier[String] identifier[getSubtext] operator[SEP] operator[SEP] {
identifier[String] identifier[subtext] operator[=] identifier[attrMixin] operator[SEP] identifier[getAttribute] operator[SEP] identifier[SUBTEXT] operator[SEP] operator[SEP] Keyword[return] identifier[subtext] operator[SEP] i... |
public static BigFloat acosh(BigFloat x) {
return x.context.valueOf(BigDecimalMath.acosh(x.value, x.context.mathContext));
} | class class_name[name] begin[{]
method[acosh, return_type[type[BigFloat]], modifier[public static], parameter[x]] begin[{]
return[call[x.context.valueOf, parameter[call[BigDecimalMath.acosh, parameter[member[x.value], member[x.context.mathContext]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[BigFloat] identifier[acosh] operator[SEP] identifier[BigFloat] identifier[x] operator[SEP] {
Keyword[return] identifier[x] operator[SEP] identifier[context] operator[SEP] identifier[valueOf] operator[SEP] identifier[BigDecimalMath] operator[SEP] identifier[acosh] operat... |
@Override
public PersistenceResource store(final ModelNode model, Set<PathAddress> affectedAddresses) {
return NullPersistenceResource.INSTANCE;
} | class class_name[name] begin[{]
method[store, return_type[type[PersistenceResource]], modifier[public], parameter[model, affectedAddresses]] begin[{]
return[member[NullPersistenceResource.INSTANCE]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[PersistenceResource] identifier[store] operator[SEP] Keyword[final] identifier[ModelNode] identifier[model] , identifier[Set] operator[<] identifier[PathAddress] operator[>] identifier[affectedAddresses] operator[SEP] {
Keyword[return] identifier[Nul... |
public Resolution intercept(ExecutionContext executionContext)
throws Exception
{
Resolution resolution;
if (securityManager != null)
{
// Add the security manager to the request.
// This is used (for example) by the security tag.
executionContext.getActionBeanContext().getRequest().setAttribute(Sec... | class class_name[name] begin[{]
method[intercept, return_type[type[Resolution]], modifier[public], parameter[executionContext]] begin[{]
local_variable[type[Resolution], resolution]
if[binary_operation[member[.securityManager], !=, literal[null]]] begin[{]
call[e... | Keyword[public] identifier[Resolution] identifier[intercept] operator[SEP] identifier[ExecutionContext] identifier[executionContext] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Resolution] identifier[resolution] operator[SEP] Keyword[if] operator[SEP] identifier[securityManager] operator[!=]... |
@Override
public void onNext(final String alarmId) {
LOG.log(Level.INFO, "Alarm {0} triggered", alarmId);
final ClientAlarm clientAlarm = this.alarmMap.remove(alarmId);
if (clientAlarm != null) {
clientAlarm.run();
} else {
LOG.log(Level.SEVERE, "Unknown alarm id {0}", alarmId);
}
} | class class_name[name] begin[{]
method[onNext, return_type[void], modifier[public], parameter[alarmId]] begin[{]
call[LOG.log, parameter[member[Level.INFO], literal["Alarm {0} triggered"], member[.alarmId]]]
local_variable[type[ClientAlarm], clientAlarm]
if[binary_operat... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onNext] operator[SEP] Keyword[final] identifier[String] identifier[alarmId] operator[SEP] {
identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] , literal[String] , identifier[ala... |
protected final CnvTfsInteger
lazyGetCnvTfsInteger() throws Exception {
CnvTfsInteger convrt = (CnvTfsInteger) this.convertersMap
.get(CnvTfsInteger.class.getSimpleName());
if (convrt == null) {
convrt = new CnvTfsInteger();
this.convertersMap.put(CnvTfsInteger.class.getSimpleName(), convr... | class class_name[name] begin[{]
method[lazyGetCnvTfsInteger, return_type[type[CnvTfsInteger]], modifier[final protected], parameter[]] begin[{]
local_variable[type[CnvTfsInteger], convrt]
if[binary_operation[member[.convrt], ==, literal[null]]] begin[{]
assign[me... | Keyword[protected] Keyword[final] identifier[CnvTfsInteger] identifier[lazyGetCnvTfsInteger] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[CnvTfsInteger] identifier[convrt] operator[=] operator[SEP] identifier[CnvTfsInteger] operator[SEP] Keyword[this] operator[SEP] identifier[co... |
@Override
public void writeRef(int ref)
{
require(1);
_buffer[_offset++] = (byte) ConstH3.REF;
writeUnsigned(ref);
} | class class_name[name] begin[{]
method[writeRef, return_type[void], modifier[public], parameter[ref]] begin[{]
call[.require, parameter[literal[1]]]
assign[member[._buffer], Cast(expression=MemberReference(member=REF, postfix_operators=[], prefix_operators=[], qualifier=ConstH3,... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeRef] operator[SEP] Keyword[int] identifier[ref] operator[SEP] {
identifier[require] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[_buffer] operator[SEP] identifier[_offset] operator[++] operator[SEP] operator[=] oper... |
public static String formatStackTrace(StackTraceElement[] stackTrace) {
StringBuilder sb = new StringBuilder();
for (StackTraceElement element : stackTrace) {
sb.append(" at ").append(element.toString());
sb.append("\n");
}
return sb.toString();
} | class class_name[name] begin[{]
method[formatStackTrace, return_type[type[String]], modifier[public static], parameter[stackTrace]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments... | Keyword[public] Keyword[static] identifier[String] identifier[formatStackTrace] operator[SEP] identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[stackTrace] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] op... |
protected Map<String, Object> findAccountViaRestApi(final Map<String, Object> headers) {
HttpResponse response = null;
try {
response = HttpUtils.execute(properties.getUrl(), properties.getMethod(),
properties.getBasicAuthUsername(), properties.getBasicAuthPassword(),
... | class class_name[name] begin[{]
method[findAccountViaRestApi, return_type[type[Map]], modifier[protected], parameter[headers]] begin[{]
local_variable[type[HttpResponse], response]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix... | Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[findAccountViaRestApi] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[headers] operator[SEP] {
identifier[HttpResponse] identifi... |
public PagedList<NetworkInterfaceInner> listVirtualMachineScaleSetNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName) {
ServiceResponse<Page<NetworkInterfaceInner>> response = listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScale... | class class_name[name] begin[{]
method[listVirtualMachineScaleSetNetworkInterfaces, return_type[type[PagedList]], modifier[public], parameter[resourceGroupName, virtualMachineScaleSetName]] begin[{]
local_variable[type[ServiceResponse], response]
return[ClassCreator(arguments=[MethodInvocation(... | Keyword[public] identifier[PagedList] operator[<] identifier[NetworkInterfaceInner] operator[>] identifier[listVirtualMachineScaleSetNetworkInterfaces] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[virtualMachineScaleSetName] operator[SEP] ... |
private static int getDimensions(Type type) {
int dimensions = 0;
while (type instanceof GenericArrayType) {
dimensions++;
type = ((GenericArrayType) type).getGenericComponentType();
}
return dimensions;
} | class class_name[name] begin[{]
method[getDimensions, return_type[type[int]], modifier[private static], parameter[type]] begin[{]
local_variable[type[int], dimensions]
while[binary_operation[member[.type], instanceof, type[GenericArrayType]]] begin[{]
member[.dim... | Keyword[private] Keyword[static] Keyword[int] identifier[getDimensions] operator[SEP] identifier[Type] identifier[type] operator[SEP] {
Keyword[int] identifier[dimensions] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[type] Keyword[instanceof] identifier[GenericArrayType] operator[SE... |
public Schema flatten(Schema schema, boolean flattenComplexTypes) {
Preconditions.checkNotNull(schema);
// To help make it configurable later
this.flattenedNameJoiner = FLATTENED_NAME_JOINER;
this.flattenedSourceJoiner = FLATTENED_SOURCE_JOINER;
Schema flattenedSchema = flatten(schema, false, flat... | class class_name[name] begin[{]
method[flatten, return_type[type[Schema]], modifier[public], parameter[schema, flattenComplexTypes]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.schema]]]
assign[THIS[member[None.flattenedNameJoiner]], member[.FLATTENED_NAME_JOINER... | Keyword[public] identifier[Schema] identifier[flatten] operator[SEP] identifier[Schema] identifier[schema] , Keyword[boolean] identifier[flattenComplexTypes] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[schema] operator[SEP] operator[SEP] Keyword[this... |
public void rotateByAxisWithPivot(float angle, float axisX, float axisY,
float axisZ, float pivotX, float pivotY, float pivotZ) {
NativeTransform.rotateByAxisWithPivot(getNative(), angle * TO_RADIANS, axisX, axisY,
axisZ, pivotX, pivotY, pivotZ);
} | class class_name[name] begin[{]
method[rotateByAxisWithPivot, return_type[void], modifier[public], parameter[angle, axisX, axisY, axisZ, pivotX, pivotY, pivotZ]] begin[{]
call[NativeTransform.rotateByAxisWithPivot, parameter[call[.getNative, parameter[]], binary_operation[member[.angle], *, mem... | Keyword[public] Keyword[void] identifier[rotateByAxisWithPivot] operator[SEP] Keyword[float] identifier[angle] , Keyword[float] identifier[axisX] , Keyword[float] identifier[axisY] , Keyword[float] identifier[axisZ] , Keyword[float] identifier[pivotX] , Keyword[float] identifier[pivotY] , Keyword[float] identifie... |
@UiThread
public int getChildAdapterPosition() {
int flatPosition = getAdapterPosition();
if (mExpandableAdapter == null || flatPosition == RecyclerView.NO_POSITION) {
return RecyclerView.NO_POSITION;
}
return mExpandableAdapter.getChildPosition(flatPosition);
} | class class_name[name] begin[{]
method[getChildAdapterPosition, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], flatPosition]
if[binary_operation[binary_operation[member[.mExpandableAdapter], ==, literal[null]], ||, binary_operation[member[.flat... | annotation[@] identifier[UiThread] Keyword[public] Keyword[int] identifier[getChildAdapterPosition] operator[SEP] operator[SEP] {
Keyword[int] identifier[flatPosition] operator[=] identifier[getAdapterPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mExpandableAdapter] ope... |
@Override
public void writeBytes(byte[] value, int offset, int length) throws JMSException
{
try
{
getOutput().write(value,offset,length);
}
catch (IOException e)
{
throw new FFMQException("Cannot write message body","IO_ERROR",e);
}
} | class class_name[name] begin[{]
method[writeBytes, return_type[void], modifier[public], parameter[value, offset, length]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[Method... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[JMSException] {
Keyword[try] {
... |
public int executeUpdate(Map params, String sql) throws SQLException {
return executeUpdate(sql, singletonList(params));
} | class class_name[name] begin[{]
method[executeUpdate, return_type[type[int]], modifier[public], parameter[params, sql]] begin[{]
return[call[.executeUpdate, parameter[member[.sql], call[.singletonList, parameter[member[.params]]]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[executeUpdate] operator[SEP] identifier[Map] identifier[params] , identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[executeUpdate] operator[SEP] identifier[sql] , identifier[singletonList] operator[SEP]... |
public Coding addCoding() { //3
Coding t = new Coding();
if (this.coding == null)
this.coding = new ArrayList<Coding>();
this.coding.add(t);
return t;
} | class class_name[name] begin[{]
method[addCoding, return_type[type[Coding]], modifier[public], parameter[]] begin[{]
local_variable[type[Coding], t]
if[binary_operation[THIS[member[None.coding]], ==, literal[null]]] begin[{]
assign[THIS[member[None.coding]], ClassCreator(arg... | Keyword[public] identifier[Coding] identifier[addCoding] operator[SEP] operator[SEP] {
identifier[Coding] identifier[t] operator[=] Keyword[new] identifier[Coding] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[coding] operator[==] Other[null] operator[... |
public synchronized void initialize(
ListeningExecutorService nonIoExecutorService,
ServerChannelFactory serverChannelFactory,
ChannelFactory clientChannelFactory,
RPCReceiver receiver) {
checkState(!running);
checkState(server == null);
checkState... | class class_name[name] begin[{]
method[initialize, return_type[void], modifier[synchronized public], parameter[nonIoExecutorService, serverChannelFactory, clientChannelFactory, receiver]] begin[{]
call[.checkState, parameter[member[.running]]]
call[.checkState, parameter[binary_... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[initialize] operator[SEP] identifier[ListeningExecutorService] identifier[nonIoExecutorService] , identifier[ServerChannelFactory] identifier[serverChannelFactory] , identifier[ChannelFactory] identifier[clientChannelFactory] , identifier[RPCReceiver] id... |
private SiftsResidue getResidue(Element residue) {
SiftsResidue res = new SiftsResidue();
String dbResNumS = residue.getAttribute("dbResNum");
res.setNaturalPos(Integer.parseInt(dbResNumS));
String seqResName = residue.getAttribute("dbResName");
res.setSeqResName(seqResName);
boolean observed = tr... | class class_name[name] begin[{]
method[getResidue, return_type[type[SiftsResidue]], modifier[private], parameter[residue]] begin[{]
local_variable[type[SiftsResidue], res]
local_variable[type[String], dbResNumS]
call[res.setNaturalPos, parameter[call[Integer.parseInt, parameter[... | Keyword[private] identifier[SiftsResidue] identifier[getResidue] operator[SEP] identifier[Element] identifier[residue] operator[SEP] {
identifier[SiftsResidue] identifier[res] operator[=] Keyword[new] identifier[SiftsResidue] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[dbResNumS] oper... |
public void ignorableWhitespace(String text) throws IOException {
if (startTagIncomplete || setPrefixCalled || seenBracket)
closeStartTag();
if (doIndent && seenTag)
seenTag = false;
if (text.length() == 0) {
throw new IllegalArgumentException("empty string is not allowed for ignorable whitespace" + getL... | class class_name[name] begin[{]
method[ignorableWhitespace, return_type[void], modifier[public], parameter[text]] begin[{]
if[binary_operation[binary_operation[member[.startTagIncomplete], ||, member[.setPrefixCalled]], ||, member[.seenBracket]]] begin[{]
call[.closeStartTag, parame... | Keyword[public] Keyword[void] identifier[ignorableWhitespace] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[startTagIncomplete] operator[||] identifier[setPrefixCalled] operator[||] identifier[seenBracket] operator[S... |
public void execInternal(@Nonnull final DockerClient client, @Nonnull final String imageName, TaskListener listener)
throws IOException {
PrintStream llog = listener.getLogger();
if (shouldPullImage(client, imageName)) {
LOG.info("Pulling image '{}'. This may take awhile...", im... | class class_name[name] begin[{]
method[execInternal, return_type[void], modifier[public], parameter[client, imageName, listener]] begin[{]
local_variable[type[PrintStream], llog]
if[call[.shouldPullImage, parameter[member[.client], member[.imageName]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[execInternal] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[DockerClient] identifier[client] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[imageName] , identifier[TaskListener] identifier[listener] operator[SEP] Ke... |
public static void replaceMainThreadExecutor(MainThreadExecutor executor) {
MainThreadExecutor previous;
synchronized (LCCore.class) {
previous = mainThreadExecutor;
mainThreadExecutor = executor;
}
do {
Runnable toExecute = previous.pop();
if (toExecute == null) break;
executor.execute(... | class class_name[name] begin[{]
method[replaceMainThreadExecutor, return_type[void], modifier[public static], parameter[executor]] begin[{]
local_variable[type[MainThreadExecutor], previous]
SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[],... | Keyword[public] Keyword[static] Keyword[void] identifier[replaceMainThreadExecutor] operator[SEP] identifier[MainThreadExecutor] identifier[executor] operator[SEP] {
identifier[MainThreadExecutor] identifier[previous] operator[SEP] Keyword[synchronized] operator[SEP] identifier[LCCore] operator[SEP] Keyword[clas... |
@Override
public void injectServices(ServiceRegistryImplementor serviceRegistry) {
if ( gridDialect instanceof ServiceRegistryAwareService ) {
( (ServiceRegistryAwareService) gridDialect ).injectServices( serviceRegistry );
}
} | class class_name[name] begin[{]
method[injectServices, return_type[void], modifier[public], parameter[serviceRegistry]] begin[{]
if[binary_operation[member[.gridDialect], instanceof, type[ServiceRegistryAwareService]]] begin[{]
Cast(expression=MemberReference(member=grid... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[injectServices] operator[SEP] identifier[ServiceRegistryImplementor] identifier[serviceRegistry] operator[SEP] {
Keyword[if] operator[SEP] identifier[gridDialect] Keyword[instanceof] identifier[ServiceRegistryAwareService] operator[SEP] ... |
public URI getResultPath() {
final String str = _customProperties.get(PROPERTY_RESULT_PATH);
if (Strings.isNullOrEmpty(str)) {
return null;
}
return URI.create(str);
} | class class_name[name] begin[{]
method[getResultPath, return_type[type[URI]], modifier[public], parameter[]] begin[{]
local_variable[type[String], str]
if[call[Strings.isNullOrEmpty, parameter[member[.str]]]] begin[{]
return[literal[null]]
else begin[{]
None
... | Keyword[public] identifier[URI] identifier[getResultPath] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] identifier[str] operator[=] identifier[_customProperties] operator[SEP] identifier[get] operator[SEP] identifier[PROPERTY_RESULT_PATH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] id... |
public static int compareHashes(int[] leftHashes, int[] rightHashes) {
assert(leftHashes != null);
assert(rightHashes != null);
assert(leftHashes.length >= 3);
assert(rightHashes.length >= 3);
// Compare total checksum first
if (leftHashes[0] == rightHashes[0]) {
... | class class_name[name] begin[{]
method[compareHashes, return_type[type[int]], modifier[public static], parameter[leftHashes, rightHashes]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=leftHashes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] Keyword[static] Keyword[int] identifier[compareHashes] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[leftHashes] , Keyword[int] operator[SEP] operator[SEP] identifier[rightHashes] operator[SEP] {
Keyword[assert] operator[SEP] identifier[leftHashes] operator[!=] Other[null] op... |
public synchronized boolean startUpgrade() throws IOException {
if(upgradeState) { // upgrade is already in progress
assert currentUpgrades != null :
"UpgradeManagerDatanode.currentUpgrades is null.";
UpgradeObjectDatanode curUO = (UpgradeObjectDatanode)currentUpgrades.first();
curUO.sta... | class class_name[name] begin[{]
method[startUpgrade, return_type[type[boolean]], modifier[synchronized public], parameter[]] begin[{]
if[member[.upgradeState]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=currentUpgrades, postfix_operators=[], p... | Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[startUpgrade] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[upgradeState] operator[SEP] {
Keyword[assert] identifier[currentUpgrades] operator[!=] Other[null] operator[:] lit... |
@Override
public void removeByG_A(long groupId, boolean active) {
for (CommerceCurrency commerceCurrency : findByG_A(groupId, active,
QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceCurrency);
}
} | class class_name[name] begin[{]
method[removeByG_A, return_type[void], modifier[public], parameter[groupId, active]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceCurrency, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByG_A] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[active] operator[SEP] {
Keyword[for] operator[SEP] identifier[CommerceCurrency] identifier[commerceCurrency] operator[:] identifier[findByG_A] o... |
public static void main(String[] args) throws Exception {
for (String arg : args) {
Class clazz = Class.forName(arg);
System.out.println("Examining: " + clazz.getName());
try {
examine(clazz);
System.out.println("Passed");
} ... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Mem... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[for] operator[SEP] identifier[String] identifier[arg] operator[:] identifier[args] operator[SEP] {
... |
public void setPublishedName(String name) {
//log.debug("setPublishedName: {}", name);
// a publish name of "false" is a special case, used when stopping a stream
if (StringUtils.isNotEmpty(name) && !"false".equals(name)) {
this.publishedName = name;
registerJMX();
... | class class_name[name] begin[{]
method[setPublishedName, return_type[void], modifier[public], parameter[name]] begin[{]
if[binary_operation[call[StringUtils.isNotEmpty, parameter[member[.name]]], &&, literal["false"]]] begin[{]
assign[THIS[member[None.publishedName]], me... | Keyword[public] Keyword[void] identifier[setPublishedName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[name] operator[SEP] operator[&&] operator[!] literal[String] operator[SEP] i... |
@BackpressureSupport(BackpressureKind.SPECIAL)
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> toFlowable(BackpressureStrategy strategy) {
Flowable<T> f = new FlowableFromObservable<T>(this);
switch (strategy) {
case DROP:
retu... | class class_name[name] begin[{]
method[toFlowable, return_type[type[Flowable]], modifier[final public], parameter[strategy]] begin[{]
local_variable[type[Flowable], f]
SwitchStatement(cases=[SwitchStatementCase(case=['DROP'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[],... | annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[SPECIAL] operator[SEP] annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[p... |
protected synchronized void lock(ManagedObject managedObject)
throws ObjectManagerException
{
throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
} | class class_name[name] begin[{]
method[lock, return_type[void], modifier[synchronized protected], parameter[managedObject]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=stateTerminated, p... | Keyword[protected] Keyword[synchronized] Keyword[void] identifier[lock] operator[SEP] identifier[ManagedObject] identifier[managedObject] operator[SEP] Keyword[throws] identifier[ObjectManagerException] {
Keyword[throw] Keyword[new] identifier[InvalidStateException] operator[SEP] Keyword[this] , identifier[Inte... |
public void setStyleDefault(FeatureRow featureRow, StyleRow style) {
setStyle(featureRow.getTable().getTableName(), featureRow.getId(),
null, style);
} | class class_name[name] begin[{]
method[setStyleDefault, return_type[void], modifier[public], parameter[featureRow, style]] begin[{]
call[.setStyle, parameter[call[featureRow.getTable, parameter[]], call[featureRow.getId, parameter[]], literal[null], member[.style]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setStyleDefault] operator[SEP] identifier[FeatureRow] identifier[featureRow] , identifier[StyleRow] identifier[style] operator[SEP] {
identifier[setStyle] operator[SEP] identifier[featureRow] operator[SEP] identifier[getTable] operator[SEP] operator[SEP] operator[SEP] id... |
public SoapClient setCharset(Charset charset) {
this.charset = charset;
try {
this.message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, this.charset.toString());
this.message.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
} catch (SOAPException e) {
// ignore
}
return this;
... | class class_name[name] begin[{]
method[setCharset, return_type[type[SoapClient]], modifier[public], parameter[charset]] begin[{]
assign[THIS[member[None.charset]], member[.charset]]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] identifier[SoapClient] identifier[setCharset] operator[SEP] identifier[Charset] identifier[charset] operator[SEP] {
Keyword[this] operator[SEP] identifier[charset] operator[=] identifier[charset] operator[SEP] Keyword[try] {
Keyword[this] operator[SEP] identifier[message] operator[SEP]... |
private void updateReadonly(EntityType entityType, Attribute attr, Attribute updatedAttr) {
Map<String, Attribute> readonlyTableAttrs =
getTableAttributesReadonly(entityType)
.collect(toLinkedMap(Attribute::getName, Function.identity()));
if (!readonlyTableAttrs.isEmpty()) {
dropTableT... | class class_name[name] begin[{]
method[updateReadonly, return_type[void], modifier[private], parameter[entityType, attr, updatedAttr]] begin[{]
local_variable[type[Map], readonlyTableAttrs]
if[call[readonlyTableAttrs.isEmpty, parameter[]]] begin[{]
call[.dropTabl... | Keyword[private] Keyword[void] identifier[updateReadonly] operator[SEP] identifier[EntityType] identifier[entityType] , identifier[Attribute] identifier[attr] , identifier[Attribute] identifier[updatedAttr] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Attribute] operator[>] iden... |
public void printDataEndForm(PrintWriter out, int iPrintOptions)
{
out.println("</tr>\n</table>");
if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) != 0)
out.println("</td>\n</tr>");
} | class class_name[name] begin[{]
method[printDataEndForm, return_type[void], modifier[public], parameter[out, iPrintOptions]] begin[{]
call[out.println, parameter[literal["</tr>\n</table>"]]]
if[binary_operation[binary_operation[member[.iPrintOptions], &, member[HtmlConstants.DET... | Keyword[public] Keyword[void] identifier[printDataEndForm] operator[SEP] identifier[PrintWriter] identifier[out] , Keyword[int] identifier[iPrintOptions] operator[SEP] {
identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator... |
public void setTransportControlFlags(int transportControlFlags) {
if (sHasRemoteControlAPIs) {
try {
sRCCSetTransportControlFlags.invoke(mActualRemoteControlClient,
transportControlFlags);
} catch (Exception e) {
throw new RuntimeEx... | class class_name[name] begin[{]
method[setTransportControlFlags, return_type[void], modifier[public], parameter[transportControlFlags]] begin[{]
if[member[.sHasRemoteControlAPIs]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference... | Keyword[public] Keyword[void] identifier[setTransportControlFlags] operator[SEP] Keyword[int] identifier[transportControlFlags] operator[SEP] {
Keyword[if] operator[SEP] identifier[sHasRemoteControlAPIs] operator[SEP] {
Keyword[try] {
identifier[sRCCSetTransportControlFlags] operator[SE... |
public static URL matches(final String pattern)
{
return new URL(pattern) {
@Override
public String toString()
{
return "URL.matches(\"" + pattern + "\")";
}
};
} | class class_name[name] begin[{]
method[matches, return_type[type[URL]], modifier[public static], parameter[pattern]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=[MethodDeclaration(annotations=[Annota... | Keyword[public] Keyword[static] identifier[URL] identifier[matches] operator[SEP] Keyword[final] identifier[String] identifier[pattern] operator[SEP] {
Keyword[return] Keyword[new] identifier[URL] operator[SEP] identifier[pattern] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] iden... |
@Deprecated
public static void write(String str, final OutputStream outputStream) throws IOException {
write(str, outputStream, Charset.defaultCharset());
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[str, outputStream]] begin[{]
call[.write, parameter[member[.str], member[.outputStream], call[Charset.defaultCharset, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[String] identifier[str] , Keyword[final] identifier[OutputStream] identifier[outputStream] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[write] operator[SEP] identif... |
@Override
public Expression<Long> count(Expression<?> arg0)
{
// TODO Auto-generated method stub
String arg1 = "Count("+arg0.getAlias()+")";
return new AggregateExpression(arg0, arg1);
} | class class_name[name] begin[{]
method[count, return_type[type[Expression]], modifier[public], parameter[arg0]] begin[{]
local_variable[type[String], arg1]
return[ClassCreator(arguments=[MemberReference(member=arg0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRef... | annotation[@] identifier[Override] Keyword[public] identifier[Expression] operator[<] identifier[Long] operator[>] identifier[count] operator[SEP] identifier[Expression] operator[<] operator[?] operator[>] identifier[arg0] operator[SEP] {
identifier[String] identifier[arg1] operator[=] literal[String] operator[+... |
public void checkCanSetCreateOption(String option) {
if (isOptColor() || isOptNoColor() || isOptR() || isOptA() || isOptVerbose() ||
isOptMerged() || isOptNoMerged() || (null != getOptContains()) || isOptMLower() ||
isOptMUpper() || isOptDLower() || isOptDUpper()) {
throw new IllegalArgumentE... | class class_name[name] begin[{]
method[checkCanSetCreateOption, return_type[void], modifier[public], parameter[option]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_ope... | Keyword[public] Keyword[void] identifier[checkCanSetCreateOption] operator[SEP] identifier[String] identifier[option] operator[SEP] {
Keyword[if] operator[SEP] identifier[isOptColor] operator[SEP] operator[SEP] operator[||] identifier[isOptNoColor] operator[SEP] operator[SEP] operator[||] identifier[isOptR] oper... |
public static void bytes (TraceComponent tc, byte[] data) {
int length = 0;
if (data != null) length = data.length;
bytes(null, tc, data, 0, length, "");
} | class class_name[name] begin[{]
method[bytes, return_type[void], modifier[public static], parameter[tc, data]] begin[{]
local_variable[type[int], length]
if[binary_operation[member[.data], !=, literal[null]]] begin[{]
assign[member[.length], member[data.length]]
else... | Keyword[public] Keyword[static] Keyword[void] identifier[bytes] operator[SEP] identifier[TraceComponent] identifier[tc] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[int] identifier[length] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[data] opera... |
public boolean isTriggeringEvent(LoggingEvent event) {
//
// in the abnormal case of no contained filters
// always return true to avoid each logging event
// from having its own file.
if (headFilter == null) {
return false;
}
//
// otherwise loop through the filters
... | class class_name[name] begin[{]
method[isTriggeringEvent, return_type[type[boolean]], modifier[public], parameter[event]] begin[{]
if[binary_operation[member[.headFilter], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
ForStatem... | Keyword[public] Keyword[boolean] identifier[isTriggeringEvent] operator[SEP] identifier[LoggingEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] identifier[headFilter] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[for] ... |
public alluxio.grpc.MetricValue getMetricsOrDefault(
java.lang.String key,
alluxio.grpc.MetricValue defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, alluxio.grpc.MetricValue> map =
internalGetMetrics().getMap();
return map.c... | class class_name[name] begin[{]
method[getMetricsOrDefault, return_type[type[alluxio]], modifier[public], parameter[key, defaultValue]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor... | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[MetricValue] identifier[getMetricsOrDefault] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[key] , identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] iden... |
private void addFactoryMethodToCriteria(TopLevelClass topLevelClass, InnerClass innerClass, IntrospectedTable introspectedTable) {
// example field
Field exampleField = JavaElementGeneratorTools.generateField(
"example",
JavaVisibility.PRIVATE,
topLevelCla... | class class_name[name] begin[{]
method[addFactoryMethodToCriteria, return_type[void], modifier[private], parameter[topLevelClass, innerClass, introspectedTable]] begin[{]
local_variable[type[Field], exampleField]
call[commentGenerator.addFieldComment, parameter[member[.exampleField], me... | Keyword[private] Keyword[void] identifier[addFactoryMethodToCriteria] operator[SEP] identifier[TopLevelClass] identifier[topLevelClass] , identifier[InnerClass] identifier[innerClass] , identifier[IntrospectedTable] identifier[introspectedTable] operator[SEP] {
identifier[Field] identifier[exampleField] operat... |
public Term term(DecoratedKey partitionKey, CellName clusteringKey) {
ByteBuffer fullKey = byteBuffer(partitionKey, clusteringKey);
return new Term(FIELD_NAME, ByteBufferUtils.toString(fullKey));
} | class class_name[name] begin[{]
method[term, return_type[type[Term]], modifier[public], parameter[partitionKey, clusteringKey]] begin[{]
local_variable[type[ByteBuffer], fullKey]
return[ClassCreator(arguments=[MemberReference(member=FIELD_NAME, postfix_operators=[], prefix_operators=[], qualifi... | Keyword[public] identifier[Term] identifier[term] operator[SEP] identifier[DecoratedKey] identifier[partitionKey] , identifier[CellName] identifier[clusteringKey] operator[SEP] {
identifier[ByteBuffer] identifier[fullKey] operator[=] identifier[byteBuffer] operator[SEP] identifier[partitionKey] , identifier[cl... |
@Override
protected void onEvent(GHEvent event, String payload) {
GHEventPayload.Ping ping;
try {
ping = GitHub.offline().parseEventPayload(new StringReader(payload), GHEventPayload.Ping.class);
} catch (IOException e) {
LOGGER.warn("Received malformed PingEvent: " + ... | class class_name[name] begin[{]
method[onEvent, return_type[void], modifier[protected], parameter[event, payload]] begin[{]
local_variable[type[GHEventPayload], ping]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ping, postfix_operators=[], pre... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onEvent] operator[SEP] identifier[GHEvent] identifier[event] , identifier[String] identifier[payload] operator[SEP] {
identifier[GHEventPayload] operator[SEP] identifier[Ping] identifier[ping] operator[SEP] Keyword[try] {
... |
public static StandardDiskConfiguration of(DiskTypeId diskType, long sizeGb) {
return newBuilder().setDiskType(diskType).setSizeGb(sizeGb).build();
} | class class_name[name] begin[{]
method[of, return_type[type[StandardDiskConfiguration]], modifier[public static], parameter[diskType, sizeGb]] begin[{]
return[call[.newBuilder, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[StandardDiskConfiguration] identifier[of] operator[SEP] identifier[DiskTypeId] identifier[diskType] , Keyword[long] identifier[sizeGb] operator[SEP] {
Keyword[return] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setDiskType] operator[SEP]... |
@Override
public void merge(EJB annotation, Class<?> instanceClass, Member member)
throws InjectionException
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "merge : " + annotation + ", " + membe... | class class_name[name] begin[{]
method[merge, return_type[void], modifier[public], parameter[annotation, instanceClass, member]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[merge] operator[SEP] identifier[EJB] identifier[annotation] , identifier[Class] operator[<] operator[?] operator[>] identifier[instanceClass] , identifier[Member] identifier[member] operator[SEP] Keyword[throws] identifier[InjectionException]... |
public void marshall(StringAttributeConstraintsType stringAttributeConstraintsType, ProtocolMarshaller protocolMarshaller) {
if (stringAttributeConstraintsType == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshalle... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[stringAttributeConstraintsType, protocolMarshaller]] begin[{]
if[binary_operation[member[.stringAttributeConstraintsType], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCrea... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StringAttributeConstraintsType] identifier[stringAttributeConstraintsType] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[stringAttributeConstraintsType] operator[==]... |
public static String getSDbl( double Value, int DecPrec, boolean ShowPlusSign ) {
//
String PlusSign = "";
//
if ( ShowPlusSign && Value > 0 ) PlusSign = "+";
if ( ShowPlusSign && Value == 0 ) PlusSign = " ";
//
return PlusSign + getSDbl( Value, DecPrec );
} | class class_name[name] begin[{]
method[getSDbl, return_type[type[String]], modifier[public static], parameter[Value, DecPrec, ShowPlusSign]] begin[{]
local_variable[type[String], PlusSign]
if[binary_operation[member[.ShowPlusSign], &&, binary_operation[member[.Value], >, literal[0]]]] b... | Keyword[public] Keyword[static] identifier[String] identifier[getSDbl] operator[SEP] Keyword[double] identifier[Value] , Keyword[int] identifier[DecPrec] , Keyword[boolean] identifier[ShowPlusSign] operator[SEP] {
identifier[String] identifier[PlusSign] operator[=] literal[String] operator[SEP] Keyword[if] ope... |
public int convertFieldToIndex()
{
int index = -1;
FieldInfo field = this.getField();
if (field != null)
{
if (!field.isNull())
{
boolean bFound = false;
Object bookmark = null;
try {
if (fi... | class class_name[name] begin[{]
method[convertFieldToIndex, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], index]
local_variable[type[FieldInfo], field]
if[binary_operation[member[.field], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[int] identifier[convertFieldToIndex] operator[SEP] operator[SEP] {
Keyword[int] identifier[index] operator[=] operator[-] Other[1] operator[SEP] identifier[FieldInfo] identifier[field] operator[=] Keyword[this] operator[SEP] identifier[getField] operator[SEP] operator[SEP] operator[SEP] K... |
private ChronoLocalDateTimeImpl<D> with(Temporal newDate, LocalTime newTime) {
if (date == newDate && time == newTime) {
return this;
}
// Validate that the new DateTime is a ChronoLocalDate (and not something else)
D cd = date.getChronology().ensureChronoLocalDate(newDate);
... | class class_name[name] begin[{]
method[with, return_type[type[ChronoLocalDateTimeImpl]], modifier[private], parameter[newDate, newTime]] begin[{]
if[binary_operation[binary_operation[member[.date], ==, member[.newDate]], &&, binary_operation[member[.time], ==, member[.newTime]]]] begin[{]
... | Keyword[private] identifier[ChronoLocalDateTimeImpl] operator[<] identifier[D] operator[>] identifier[with] operator[SEP] identifier[Temporal] identifier[newDate] , identifier[LocalTime] identifier[newTime] operator[SEP] {
Keyword[if] operator[SEP] identifier[date] operator[==] identifier[newDate] operator[&&] ... |
@Override
public void step(SimState simulation) {
this.simulation = (ShanksSimulation) simulation;
this.checkMail();
this.executeReasoningCycle((ShanksSimulation) simulation);
} | class class_name[name] begin[{]
method[step, return_type[void], modifier[public], parameter[simulation]] begin[{]
assign[THIS[member[None.simulation]], Cast(expression=MemberReference(member=simulation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arg... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[step] operator[SEP] identifier[SimState] identifier[simulation] operator[SEP] {
Keyword[this] operator[SEP] identifier[simulation] operator[=] operator[SEP] identifier[ShanksSimulation] operator[SEP] identifier[simulation] operator[SEP] ... |
public Properties getProperties() {
if (System.getSecurityManager() == null)
return System.getProperties();
return AccessController.doPrivileged(new PrivilegedAction<Properties>() {
@Override
public Properties run() {
return System.getProperties();
... | class class_name[name] begin[{]
method[getProperties, return_type[type[Properties]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[System.getSecurityManager, parameter[]], ==, literal[null]]] begin[{]
return[call[System.getProperties, parameter[]]]
else begin[{]
None
... | Keyword[public] identifier[Properties] identifier[getProperties] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[return] identifier[System] operator[SEP] identifier[g... |
public static ErrorMessageFactory elementsShouldHave(Object actual, Object notSatisfies, Matcher<?> condition) {
return new ElementsShouldHave(actual, notSatisfies, condition);
} | class class_name[name] begin[{]
method[elementsShouldHave, return_type[type[ErrorMessageFactory]], modifier[public static], parameter[actual, notSatisfies, condition]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors... | Keyword[public] Keyword[static] identifier[ErrorMessageFactory] identifier[elementsShouldHave] operator[SEP] identifier[Object] identifier[actual] , identifier[Object] identifier[notSatisfies] , identifier[Matcher] operator[<] operator[?] operator[>] identifier[condition] operator[SEP] {
Keyword[return] Keywor... |
public void initWithNextMajorVersionDefaults_V3() {
usePackageGrouping = true;
useBooleanFieldErgonomics = true;
reservePrimaryKeyIndexForTypeWithPrimaryKey = true;
useHollowPrimitiveTypes = true;
restrictApiToFieldType = true;
useVerboseToString = true;
} | class class_name[name] begin[{]
method[initWithNextMajorVersionDefaults_V3, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.usePackageGrouping], literal[true]]
assign[member[.useBooleanFieldErgonomics], literal[true]]
assign[member[.rese... | Keyword[public] Keyword[void] identifier[initWithNextMajorVersionDefaults_V3] operator[SEP] operator[SEP] {
identifier[usePackageGrouping] operator[=] literal[boolean] operator[SEP] identifier[useBooleanFieldErgonomics] operator[=] literal[boolean] operator[SEP] identifier[reservePrimaryKeyIndexForTypeWithPrimar... |
public ServiceBuilder withCacheFactory(Function<ComponentSetup, CacheFactory> cacheFactoryCreator) {
Preconditions.checkNotNull(cacheFactoryCreator, "cacheFactoryCreator");
this.cacheFactoryCreator = cacheFactoryCreator;
return this;
} | class class_name[name] begin[{]
method[withCacheFactory, return_type[type[ServiceBuilder]], modifier[public], parameter[cacheFactoryCreator]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.cacheFactoryCreator], literal["cacheFactoryCreator"]]]
assign[THIS[member[Non... | Keyword[public] identifier[ServiceBuilder] identifier[withCacheFactory] operator[SEP] identifier[Function] operator[<] identifier[ComponentSetup] , identifier[CacheFactory] operator[>] identifier[cacheFactoryCreator] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] ... |
public Presence getPresence(Jid user) {
Jid key = getPresenceMapKey(user);
Map<Resourcepart, Presence> userPresences = presenceMap.get(key);
if (userPresences == null) {
Presence presence = new Presence(Presence.Type.unavailable);
presence.setFrom(user);
retur... | class class_name[name] begin[{]
method[getPresence, return_type[type[Presence]], modifier[public], parameter[user]] begin[{]
local_variable[type[Jid], key]
local_variable[type[Map], userPresences]
if[binary_operation[member[.userPresences], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Presence] identifier[getPresence] operator[SEP] identifier[Jid] identifier[user] operator[SEP] {
identifier[Jid] identifier[key] operator[=] identifier[getPresenceMapKey] operator[SEP] identifier[user] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Resourcepart] , ... |
public Response registDeptUser(String corpNum, String deptUserID, String deptUserPWD) throws PopbillException{
if (corpNum == null || corpNum.isEmpty())
throw new PopbillException(-99999999, "์ฐ๋ํ์ ์ฌ์
์๋ฒํธ(corpNum)๊ฐ ์
๋ ฅ๋์ง ์์์ต๋๋ค.");
if (deptUserID == null || deptUserID.isEmpty())
throw new PopbillException(-999999... | class class_name[name] begin[{]
method[registDeptUser, return_type[type[Response]], modifier[public], parameter[corpNum, deptUserID, deptUserPWD]] begin[{]
if[binary_operation[binary_operation[member[.corpNum], ==, literal[null]], ||, call[corpNum.isEmpty, parameter[]]]] begin[{]
ThrowStatement... | Keyword[public] identifier[Response] identifier[registDeptUser] operator[SEP] identifier[String] identifier[corpNum] , identifier[String] identifier[deptUserID] , identifier[String] identifier[deptUserPWD] operator[SEP] Keyword[throws] identifier[PopbillException] {
Keyword[if] operator[SEP] identifier[corpNum... |
public static HttpURLConnection getServiceProperties(final URI uri, final RequestOptions options,
UriQueryBuilder builder, final OperationContext opContext) throws IOException, URISyntaxException,
StorageException {
if (builder == null) {
builder = new UriQueryBuilder();
... | class class_name[name] begin[{]
method[getServiceProperties, return_type[type[HttpURLConnection]], modifier[public static], parameter[uri, options, builder, opContext]] begin[{]
if[binary_operation[member[.builder], ==, literal[null]]] begin[{]
assign[member[.builder], C... | Keyword[public] Keyword[static] identifier[HttpURLConnection] identifier[getServiceProperties] operator[SEP] Keyword[final] identifier[URI] identifier[uri] , Keyword[final] identifier[RequestOptions] identifier[options] , identifier[UriQueryBuilder] identifier[builder] , Keyword[final] identifier[OperationContext] i... |
@Override
public int[] executeBatch() throws SQLException {
checkClose();
int queryParameterSize = queryParameters.size();
if (queryParameterSize == 0) {
return new int[0];
}
executeBatchInternal(queryParameterSize);
return results.getCmdInformation().getUpdateCounts();
} | class class_name[name] begin[{]
method[executeBatch, return_type[type[int]], modifier[public], parameter[]] begin[{]
call[.checkClose, parameter[]]
local_variable[type[int], queryParameterSize]
if[binary_operation[member[.queryParameterSize], ==, literal[0]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[executeBatch] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkClose] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[queryParameterSize] operator[=] iden... |
public String mapRequestPath(HttpServletRequest request) {
String endpointName = Path.newInstance(request).firstSegment();
return StringUtils.lowerCase(endpointName);
} | class class_name[name] begin[{]
method[mapRequestPath, return_type[type[String]], modifier[public], parameter[request]] begin[{]
local_variable[type[String], endpointName]
return[call[StringUtils.lowerCase, parameter[member[.endpointName]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[mapRequestPath] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[String] identifier[endpointName] operator[=] identifier[Path] operator[SEP] identifier[newInstance] operator[SEP] identifier[request] operator[SEP] operator[SE... |
public static Object getValueToRender(FacesContext context, UIComponent component) {
if (component instanceof ValueHolder) {
if (component instanceof EditableValueHolder) {
EditableValueHolder input = (EditableValueHolder) component;
Object submittedValue = input.getSubmittedValue();
ConfigContainer c... | class class_name[name] begin[{]
method[getValueToRender, return_type[type[Object]], modifier[public static], parameter[context, component]] begin[{]
if[binary_operation[member[.component], instanceof, type[ValueHolder]]] begin[{]
if[binary_operation[member[.component], i... | Keyword[public] Keyword[static] identifier[Object] identifier[getValueToRender] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[component] operator[SEP] {
Keyword[if] operator[SEP] identifier[component] Keyword[instanceof] identifier[ValueHolder] operator[SEP] {
... |
private void writeMethod(Definition def, Writer out, int indent) throws IOException
{
if (def.getMcfDefs().get(getNumOfMcf()).isDefineMethodInConnection())
{
if (def.getMcfDefs().get(getNumOfMcf()).getMethods().size() > 0)
{
for (MethodForConnection method : def.getMcfDefs()... | class class_name[name] begin[{]
method[writeMethod, return_type[void], modifier[private], parameter[def, out, indent]] begin[{]
if[call[def.getMcfDefs, parameter[]]] begin[{]
if[binary_operation[call[def.getMcfDefs, parameter[]], >, literal[0]]] begin[{]
... | Keyword[private] Keyword[void] identifier[writeMethod] operator[SEP] identifier[Definition] identifier[def] , identifier[Writer] identifier[out] , Keyword[int] identifier[indent] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getMcfDef... |
public static void setGlobalSettings(final WebApplication application, final int httpPort,
final int httpsPort, final String footerFilterName, final String encoding,
final String... patterns)
{
// Standard-Encoding for Markup-Files
application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
// Sets t... | class class_name[name] begin[{]
method[setGlobalSettings, return_type[void], modifier[public static], parameter[application, httpPort, httpsPort, footerFilterName, encoding, patterns]] begin[{]
call[application.getMarkupSettings, parameter[]]
call[application.getRequestCycleSett... | Keyword[public] Keyword[static] Keyword[void] identifier[setGlobalSettings] operator[SEP] Keyword[final] identifier[WebApplication] identifier[application] , Keyword[final] Keyword[int] identifier[httpPort] , Keyword[final] Keyword[int] identifier[httpsPort] , Keyword[final] identifier[String] identifier[footerFilte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.