code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public boolean isServerStarted() {
String thisMethodName = CLASS_NAME + ".isServerStarted()";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
... | class class_name[name] begin[{]
method[isServerStarted, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[String], thisMethodName]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] ... | Keyword[public] Keyword[boolean] identifier[isServerStarted] operator[SEP] operator[SEP] {
identifier[String] identifier[thisMethodName] operator[=] identifier[CLASS_NAME] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] ... |
public SnackbarBuilder timeoutDismissCallback(final SnackbarTimeoutDismissCallback callback) {
callbacks.add(new SnackbarCallback() {
public void onSnackbarTimedOut(Snackbar snackbar) {
callback.onSnackbarTimedOut(snackbar);
}
});
return this;
} | class class_name[name] begin[{]
method[timeoutDismissCallback, return_type[type[SnackbarBuilder]], modifier[public], parameter[callback]] begin[{]
call[callbacks.add, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocati... | Keyword[public] identifier[SnackbarBuilder] identifier[timeoutDismissCallback] operator[SEP] Keyword[final] identifier[SnackbarTimeoutDismissCallback] identifier[callback] operator[SEP] {
identifier[callbacks] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[SnackbarCallback] operator[SEP] ope... |
public final <R> Ix<R> lift(IxFunction<? super Iterator<T>, ? extends Iterator<R>> lifter) {
return new IxLift<T, R>(this, nullCheck(lifter, "lifter is null"));
} | class class_name[name] begin[{]
method[lift, return_type[type[Ix]], modifier[final public], parameter[lifter]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[MemberReference(member=lifter, postfix_operat... | Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Ix] operator[<] identifier[R] operator[>] identifier[lift] operator[SEP] identifier[IxFunction] operator[<] operator[?] Keyword[super] identifier[Iterator] operator[<] identifier[T] operator[>] , operator[?] Keyword[extends] identifier[Ite... |
protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) {
switch (state) {
case FIND_ICON_ENABLED:
paintSearchGlass(g, 0, 0, width, height, false);
break;
case FIND_ICON_ENABLED_POPUP:
paintSearchGlass(g, 0, 0, wid... | class class_name[name] begin[{]
method[doPaint, return_type[void], modifier[protected], parameter[g, c, width, height, extendedCacheKeys]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['FIND_ICON_ENABLED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReferen... | Keyword[protected] Keyword[void] identifier[doPaint] operator[SEP] identifier[Graphics2D] identifier[g] , identifier[JComponent] identifier[c] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Object] operator[SEP] operator[SEP] identifier[extendedCacheKeys] operator[SEP] {
Keyw... |
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions)
{
if ((MenuConstants.FORM.equalsIgnoreCase(strCommand))
|| (MenuConstants.FORMLINK.equalsIgnoreCase(strCommand)))
{
return this.handleCommand(UserInfo.VERBOSE_MAINT_SCREEN, sourceSField... | class class_name[name] begin[{]
method[doCommand, return_type[type[boolean]], modifier[public], parameter[strCommand, sourceSField, iCommandOptions]] begin[{]
if[binary_operation[call[MenuConstants.FORM.equalsIgnoreCase, parameter[member[.strCommand]]], ||, call[MenuConstants.FORMLINK.equalsIgn... | Keyword[public] Keyword[boolean] identifier[doCommand] operator[SEP] identifier[String] identifier[strCommand] , identifier[ScreenField] identifier[sourceSField] , Keyword[int] identifier[iCommandOptions] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[MenuConstants] operator[SEP] identifier... |
void add(CacheDisposable<T> consumer) {
for (;;) {
CacheDisposable<T>[] current = observers.get();
if (current == TERMINATED) {
return;
}
int n = current.length;
@SuppressWarnings("unchecked")
CacheDisposable<T>[] next = ne... | class class_name[name] begin[{]
method[add, return_type[void], modifier[default], parameter[consumer]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], mem... | Keyword[void] identifier[add] operator[SEP] identifier[CacheDisposable] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[CacheDisposable] operator[<] identifier[T] operator[>] operator[SEP] oper... |
public static base_response disable(nitro_service client, service resource) throws Exception {
service disableresource = new service();
disableresource.name = resource.name;
disableresource.delay = resource.delay;
disableresource.graceful = resource.graceful;
return disableresource.perform_operation(client,"d... | class class_name[name] begin[{]
method[disable, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[service], disableresource]
assign[member[disableresource.name], member[resource.name]]
assign[member[disab... | Keyword[public] Keyword[static] identifier[base_response] identifier[disable] operator[SEP] identifier[nitro_service] identifier[client] , identifier[service] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[service] identifier[disableresource] operator[=] Keyword[new] ident... |
@Override
public Step resolveExtJsonFile(Step thisStep) {
try {
if (!checkDigNeeded(thisStep)) {
return thisStep;
}
JsonNode stepNode = objectMapper.convertValue(thisStep, JsonNode.class);
Map<String, Object> stepMap = objectMapper.readValu... | class class_name[name] begin[{]
method[resolveExtJsonFile, return_type[type[Step]], modifier[public], parameter[thisStep]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=thisStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | annotation[@] identifier[Override] Keyword[public] identifier[Step] identifier[resolveExtJsonFile] operator[SEP] identifier[Step] identifier[thisStep] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[checkDigNeeded] operator[SEP] identifier[thisStep] operator[SEP] operat... |
public VarSetBuilder varSetAtPath( String[] path)
{
VarSet varSet = null;
if( path != null && path.length > 0)
{
varSet = new VarSet( path[0]);
varSet_.addMember( varSet);
for( int i = 1; i < path.length; i++)
{
VarSet child = new VarSet( path[i]);
varSet.add... | class class_name[name] begin[{]
method[varSetAtPath, return_type[type[VarSetBuilder]], modifier[public], parameter[path]] begin[{]
local_variable[type[VarSet], varSet]
if[binary_operation[binary_operation[member[.path], !=, literal[null]], &&, binary_operation[member[path.length], >, li... | Keyword[public] identifier[VarSetBuilder] identifier[varSetAtPath] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[path] operator[SEP] {
identifier[VarSet] identifier[varSet] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[!=] Other[null] operator... |
public static String toHalfWidthString(CharSequence str) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < str.length(); i++) {
sb.append(toHalfWidthCharacter(str.charAt(i)));
}
return sb.toString();
} | class class_name[name] begin[{]
method[toHalfWidthString, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Meth... | Keyword[public] Keyword[static] identifier[String] identifier[toHalfWidthString] operator[SEP] identifier[CharSequence] identifier[str] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] ... |
public void writeNameValuePair(String name, double value) throws IOException
{
internalWriteNameValuePair(name, Double.toString(value));
} | class class_name[name] begin[{]
method[writeNameValuePair, return_type[void], modifier[public], parameter[name, value]] begin[{]
call[.internalWriteNameValuePair, parameter[member[.name], call[Double.toString, parameter[member[.value]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[writeNameValuePair] operator[SEP] identifier[String] identifier[name] , Keyword[double] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[internalWriteNameValuePair] operator[SEP] identifier[name] , identifier[Double] operator[SEP] ide... |
public void setScalingPlans(java.util.Collection<ScalingPlan> scalingPlans) {
if (scalingPlans == null) {
this.scalingPlans = null;
return;
}
this.scalingPlans = new java.util.ArrayList<ScalingPlan>(scalingPlans);
} | class class_name[name] begin[{]
method[setScalingPlans, return_type[void], modifier[public], parameter[scalingPlans]] begin[{]
if[binary_operation[member[.scalingPlans], ==, literal[null]]] begin[{]
assign[THIS[member[None.scalingPlans]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setScalingPlans] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ScalingPlan] operator[>] identifier[scalingPlans] operator[SEP] {
Keyword[if] operator[SEP] identifier[scalingPlans] operator[==] Oth... |
public List<V> removeAll(K key) {
key = sanitizeKey(key);
List<V> removed = map.remove(key);
if (removed == null) {
return Collections.emptyList();
}
List<V> unmodifiableCopy = Collections.unmodifiableList(new ArrayList<V>(removed));
removed.clear();
return unmodifiableCopy;
} | class class_name[name] begin[{]
method[removeAll, return_type[type[List]], modifier[public], parameter[key]] begin[{]
assign[member[.key], call[.sanitizeKey, parameter[member[.key]]]]
local_variable[type[List], removed]
if[binary_operation[member[.removed], ==, literal[n... | Keyword[public] identifier[List] operator[<] identifier[V] operator[>] identifier[removeAll] operator[SEP] identifier[K] identifier[key] operator[SEP] {
identifier[key] operator[=] identifier[sanitizeKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[V] operato... |
protected void appendWhereClause(FieldDescriptor[] fields, StringBuffer stmt) throws PersistenceBrokerException
{
stmt.append(" WHERE ");
for(int i = 0; i < fields.length; i++)
{
FieldDescriptor fmd = fields[i];
stmt.append(fmd.getColumnName());
... | class class_name[name] begin[{]
method[appendWhereClause, return_type[void], modifier[protected], parameter[fields, stmt]] begin[{]
call[stmt.append, parameter[literal[" WHERE "]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarat... | Keyword[protected] Keyword[void] identifier[appendWhereClause] operator[SEP] identifier[FieldDescriptor] operator[SEP] operator[SEP] identifier[fields] , identifier[StringBuffer] identifier[stmt] operator[SEP] Keyword[throws] identifier[PersistenceBrokerException] {
identifier[stmt] operator[SEP] identifier[app... |
@Override
public X509Certificate[] extract(final HttpServletRequest request) {
val certHeaderValue = getCertFromHeader(request);
if (StringUtils.isBlank(certHeaderValue)) {
LOGGER.debug("No header [{}] found in request (or value was null)", sslClientCertHeader);
return null;
... | class class_name[name] begin[{]
method[extract, return_type[type[X509Certificate]], modifier[public], parameter[request]] begin[{]
local_variable[type[val], certHeaderValue]
if[call[StringUtils.isBlank, parameter[member[.certHeaderValue]]]] begin[{]
call[LOGGER.d... | annotation[@] identifier[Override] Keyword[public] identifier[X509Certificate] operator[SEP] operator[SEP] identifier[extract] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] operator[SEP] {
identifier[val] identifier[certHeaderValue] operator[=] identifier[getCertFromHeader] oper... |
@Pure
public IntegerProperty minXProperty() {
if (this.minX == null) {
this.minX = new SimpleIntegerProperty(this, MathFXAttributeNames.MINIMUM_X) {
@Override
protected void invalidated() {
final int currentMin = get();
final int currentMax = getMaxX();
if (currentMax < currentMin) {
... | class class_name[name] begin[{]
method[minXProperty, return_type[type[IntegerProperty]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.minX]], ==, literal[null]]] begin[{]
assign[THIS[member[None.minX]], ClassCreator(arguments=[This(postfix... | annotation[@] identifier[Pure] Keyword[public] identifier[IntegerProperty] identifier[minXProperty] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[minX] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[minX] operator[=] Key... |
public static boolean isValid(
int yearOfEra,
int month,
int dayOfMonth
) {
return CALSYS.isValid(JucheEra.JUCHE, yearOfEra, month, dayOfMonth);
} | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public static], parameter[yearOfEra, month, dayOfMonth]] begin[{]
return[call[CALSYS.isValid, parameter[member[JucheEra.JUCHE], member[.yearOfEra], member[.month], member[.dayOfMonth]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isValid] operator[SEP] Keyword[int] identifier[yearOfEra] , Keyword[int] identifier[month] , Keyword[int] identifier[dayOfMonth] operator[SEP] {
Keyword[return] identifier[CALSYS] operator[SEP] identifier[isValid] operator[SEP] identifier[JucheEra] op... |
private void doFlush() throws SQLException {
if (batchCount > 0) {
try {
statement.executeBatch();
batchCount = 0;
} catch (SQLException ex) {
resetConnection();
throw ex;
}
}
} | class class_name[name] begin[{]
method[doFlush, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.batchCount], >, literal[0]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=executeBatch, postfi... | Keyword[private] Keyword[void] identifier[doFlush] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[batchCount] operator[>] Other[0] operator[SEP] {
Keyword[try] {
identifier[statement] operator[SEP] identifier[executeBatch] ope... |
public void setLocal(Object key, Object value) {
if (data == null) {
data = new HashMap();
}
data.put(key, value);
} | class class_name[name] begin[{]
method[setLocal, return_type[void], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[member[.data], ==, literal[null]]] begin[{]
assign[member[.data], ClassCreator(arguments=[], body=None, constructor_type_arguments=No... | Keyword[public] Keyword[void] identifier[setLocal] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] {
identifier[data] operator[=] Keyword[new] identifier[HashMap] ... |
private int checkVariants(String variants, String sep) {
StringTokenIterator itr = new StringTokenIterator(variants, sep);
while (!itr.isDone()) {
String s = itr.current();
if (!LanguageTag.isVariant(s)) {
return itr.currentStart();
}
itr.n... | class class_name[name] begin[{]
method[checkVariants, return_type[type[int]], modifier[private], parameter[variants, sep]] begin[{]
local_variable[type[StringTokenIterator], itr]
while[call[itr.isDone, parameter[]]] begin[{]
local_variable[type[String], s]
... | Keyword[private] Keyword[int] identifier[checkVariants] operator[SEP] identifier[String] identifier[variants] , identifier[String] identifier[sep] operator[SEP] {
identifier[StringTokenIterator] identifier[itr] operator[=] Keyword[new] identifier[StringTokenIterator] operator[SEP] identifier[variants] , identi... |
public java.lang.String getKernelName() {
java.lang.Object ref = kernelName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ke... | class class_name[name] begin[{]
method[getKernelName, return_type[type[java]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
return[Cast(expression=MemberReference(member=ref, postf... | Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getKernelName] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[kernelName_] operator[SEP] Keyword[if] o... |
public void readFields(DataInput in) throws IOException {
byte version = in.readByte(); // read version
if (version != getVersion())
throw new VersionMismatchException(getVersion(), version);
} | class class_name[name] begin[{]
method[readFields, return_type[void], modifier[public], parameter[in]] begin[{]
local_variable[type[byte], version]
if[binary_operation[member[.version], !=, call[.getVersion, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Metho... | Keyword[public] Keyword[void] identifier[readFields] operator[SEP] identifier[DataInput] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] identifier[version] operator[=] identifier[in] operator[SEP] identifier[readByte] operator[SEP] operator[SEP] operator[SEP] Keyword[if] ope... |
final public void andExpression() throws ParseException {
equalityExpression();
label_6:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 13:
case 14:
;
break;
default:
jj_la1[11] = jj_gen;
break label_6;
}
switch ((jj_ntk==-1)?j... | class class_name[name] begin[{]
method[andExpression, return_type[void], modifier[final public], parameter[]] begin[{]
call[.equalityExpression, parameter[]]
while[literal[true]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], ... | Keyword[final] Keyword[public] Keyword[void] identifier[andExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[equalityExpression] operator[SEP] operator[SEP] operator[SEP] identifier[label_6] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
... |
public final Operation updateField(Field field) {
UpdateFieldRequest request = UpdateFieldRequest.newBuilder().setField(field).build();
return updateField(request);
} | class class_name[name] begin[{]
method[updateField, return_type[type[Operation]], modifier[final public], parameter[field]] begin[{]
local_variable[type[UpdateFieldRequest], request]
return[call[.updateField, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Operation] identifier[updateField] operator[SEP] identifier[Field] identifier[field] operator[SEP] {
identifier[UpdateFieldRequest] identifier[request] operator[=] identifier[UpdateFieldRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SE... |
public final void ruleXDoWhileExpression() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXbase.g:1046:2: ( ( ( rule__XDoWhileExpression__Group__0 ) ) )
// InternalXbase.g:1047:2: ( ( rule__XDoWhileExpression__Group__0 ) )
... | class class_name[name] begin[{]
method[ruleXDoWhileExpression, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], stackSize]
TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOper... | Keyword[public] Keyword[final] Keyword[void] identifier[ruleXDoWhileExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[int] identifier[stackSize] operator[=] identifier[keepStackSize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
{
... |
public static void quote(StringBuilder buf, String str) {
buf.append('"');
escape(buf, str);
buf.append('"');
} | class class_name[name] begin[{]
method[quote, return_type[void], modifier[public static], parameter[buf, str]] begin[{]
call[buf.append, parameter[literal['"']]]
call[.escape, parameter[member[.buf], member[.str]]]
call[buf.append, parameter[literal['"']]]
en... | Keyword[public] Keyword[static] Keyword[void] identifier[quote] operator[SEP] identifier[StringBuilder] identifier[buf] , identifier[String] identifier[str] operator[SEP] {
identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[escape] operator[SEP]... |
public synchronized UserAgent getUserAgent() {
if (this.userAgent == null) {
if (isService) {
this.userAgent =
new UserAgent(
this.serviceName,
this.projectId,
this.sslEnabled,
this.nfvoIp,
this.nfvoPort,
... | class class_name[name] begin[{]
method[getUserAgent, return_type[type[UserAgent]], modifier[synchronized public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.userAgent]], ==, literal[null]]] begin[{]
if[member[.isService]] begin[{]
... | Keyword[public] Keyword[synchronized] identifier[UserAgent] identifier[getUserAgent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[userAgent] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[isService] operator[SEP] {
... |
static void interceptWritingFiles( Properties props, File outputDirectory ) throws IOException {
if( outputDirectory == null )
return;
Logger logger = Logger.getLogger( UserDataHelpers.class.getName());
Set<String> keys = props.stringPropertyNames();
for( final String key : keys ) {
if( ! key.startsWith... | class class_name[name] begin[{]
method[interceptWritingFiles, return_type[void], modifier[static], parameter[props, outputDirectory]] begin[{]
if[binary_operation[member[.outputDirectory], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable... | Keyword[static] Keyword[void] identifier[interceptWritingFiles] operator[SEP] identifier[Properties] identifier[props] , identifier[File] identifier[outputDirectory] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[outputDirectory] operator[==] Other[null] operator[SE... |
@Override
protected boolean isValid() {
// Get the date we are validating.
WDateField dateField = (WDateField) this.getInputField();
Date date = dateField.getDate();
if (date == null) {
// No date, so nothing to validate.
return true;
}
// Determine the pivot date
Date pivot = null;
if (variab... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[protected], parameter[]] begin[{]
local_variable[type[WDateField], dateField]
local_variable[type[Date], date]
if[binary_operation[member[.date], ==, literal[null]]] begin[{]
return[... | annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[isValid] operator[SEP] operator[SEP] {
identifier[WDateField] identifier[dateField] operator[=] operator[SEP] identifier[WDateField] operator[SEP] Keyword[this] operator[SEP] identifier[getInputField] operator[SEP] operator[SEP] op... |
public void setAsText(String text)
{
ParseException pe = null;
for (int i = 0; i < formats.length; i++)
{
try
{
// try to parse the date
DateFormat df = formats[i];
Date date = df.parse(text);
// store the date in... | class class_name[name] begin[{]
method[setAsText, return_type[void], modifier[public], parameter[text]] begin[{]
local_variable[type[ParseException], pe]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDe... | Keyword[public] Keyword[void] identifier[setAsText] operator[SEP] identifier[String] identifier[text] operator[SEP] {
identifier[ParseException] identifier[pe] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] ... |
@Override
public void render(final ActionRequest actionRequest, final Object resultValue) {
final Chain chainResult;
if (resultValue == null) {
chainResult = Chain.to(StringPool.EMPTY);
} else {
if (resultValue instanceof String) {
chainResult = Chain.to((String)resultValue);
}
else {
chainR... | class class_name[name] begin[{]
method[render, return_type[void], modifier[public], parameter[actionRequest, resultValue]] begin[{]
local_variable[type[Chain], chainResult]
if[binary_operation[member[.resultValue], ==, literal[null]]] begin[{]
assign[member[.chai... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[render] operator[SEP] Keyword[final] identifier[ActionRequest] identifier[actionRequest] , Keyword[final] identifier[Object] identifier[resultValue] operator[SEP] {
Keyword[final] identifier[Chain] identifier[chainResult] operator[SEP] ... |
@Override
public String getCharacterEncoding() {
if (null == this.encoding) {
EncodingUtils encodingUtils = connection.getEncodingUtils();
this.encoding = encodingUtils.getEncodingFromLocale(this.locale);
if (null == this.encoding) {
this.encoding = encodi... | class class_name[name] begin[{]
method[getCharacterEncoding, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[literal[null], ==, THIS[member[None.encoding]]]] begin[{]
local_variable[type[EncodingUtils], encodingUtils]
as... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getCharacterEncoding] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] Keyword[this] operator[SEP] identifier[encoding] operator[SEP] {
identifier[EncodingUtils] identifier[encodingUtils] o... |
private static int asInteger(final long[] data, final int n) {
int t;
int cnt = 0;
long seed = 0;
if (n < 2) {
throw new SketchesArgumentException("Given value of n must be > 1.");
}
if (n > (1 << 30)) {
while (++cnt < 10000) {
final long[] h = MurmurHash3.hash(data, seed)... | class class_name[name] begin[{]
method[asInteger, return_type[type[int]], modifier[private static], parameter[data, n]] begin[{]
local_variable[type[int], t]
local_variable[type[int], cnt]
local_variable[type[long], seed]
if[binary_operation[member[.n], <, literal[2]]] b... | Keyword[private] Keyword[static] Keyword[int] identifier[asInteger] operator[SEP] Keyword[final] Keyword[long] operator[SEP] operator[SEP] identifier[data] , Keyword[final] Keyword[int] identifier[n] operator[SEP] {
Keyword[int] identifier[t] operator[SEP] Keyword[int] identifier[cnt] operator[=] Other[0] opera... |
private static GeoPackageConnection connect(File file) {
String databaseUrl = "jdbc:sqlite:" + file.getPath();
// load the sqlite-JDBC driver using the current class loader
try {
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
throw new GeoPackageException(
"Failed to load th... | class class_name[name] begin[{]
method[connect, return_type[type[GeoPackageConnection]], modifier[private static], parameter[file]] begin[{]
local_variable[type[String], databaseUrl]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], pre... | Keyword[private] Keyword[static] identifier[GeoPackageConnection] identifier[connect] operator[SEP] identifier[File] identifier[file] operator[SEP] {
identifier[String] identifier[databaseUrl] operator[=] literal[String] operator[+] identifier[file] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] o... |
String readField() throws IOException {
int c;
while (true) {
c = reader.read();
if (c == -1) {
return "";
} else if (!Character.isWhitespace(c)) {
reader.unread(c);
break;
} else if (c == '\n') {
reader.unread(c);
return "";
}
}
if (c == QUOTE_CHAR) {
return readEscaped();... | class class_name[name] begin[{]
method[readField, return_type[type[String]], modifier[default], parameter[]] begin[{]
local_variable[type[int], c]
while[literal[true]] begin[{]
assign[member[.c], call[reader.read, parameter[]]]
if[binary_o... | identifier[String] identifier[readField] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[c] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
identifier[c] operator[=] identifier[reader] operator[SEP] identifier[read] operator[SEP... |
public void setCrumbRequestField(String requestField) {
if (Util.fixEmptyAndTrim(requestField) == null) {
crumbRequestField = CrumbIssuer.DEFAULT_CRUMB_NAME;
} else {
crumbRequestField = requestField;
}
} | class class_name[name] begin[{]
method[setCrumbRequestField, return_type[void], modifier[public], parameter[requestField]] begin[{]
if[binary_operation[call[Util.fixEmptyAndTrim, parameter[member[.requestField]]], ==, literal[null]]] begin[{]
assign[member[.crumbRequestF... | Keyword[public] Keyword[void] identifier[setCrumbRequestField] operator[SEP] identifier[String] identifier[requestField] operator[SEP] {
Keyword[if] operator[SEP] identifier[Util] operator[SEP] identifier[fixEmptyAndTrim] operator[SEP] identifier[requestField] operator[SEP] operator[==] Other[null] operator[SEP]... |
public static int numChunksForMessage(NDArrayMessage message, int chunkSize) {
int sizeOfMessage = NDArrayMessage.byteBufferSizeForMessage(message);
int numMessages = sizeOfMessage / chunkSize;
//increase by 1 for padding
if (numMessages * chunkSize < sizeOfMessage)
numMessag... | class class_name[name] begin[{]
method[numChunksForMessage, return_type[type[int]], modifier[public static], parameter[message, chunkSize]] begin[{]
local_variable[type[int], sizeOfMessage]
local_variable[type[int], numMessages]
if[binary_operation[binary_operation[member[.numMe... | Keyword[public] Keyword[static] Keyword[int] identifier[numChunksForMessage] operator[SEP] identifier[NDArrayMessage] identifier[message] , Keyword[int] identifier[chunkSize] operator[SEP] {
Keyword[int] identifier[sizeOfMessage] operator[=] identifier[NDArrayMessage] operator[SEP] identifier[byteBufferSizeForM... |
public UserAttributeType<PortletAppType<T>> getOrCreateUserAttribute()
{
List<Node> nodeList = childNode.get("user-attribute");
if (nodeList != null && nodeList.size() > 0)
{
return new UserAttributeTypeImpl<PortletAppType<T>>(this, "user-attribute", childNode, nodeList.get(0));
}
... | class class_name[name] begin[{]
method[getOrCreateUserAttribute, return_type[type[UserAttributeType]], modifier[public], parameter[]] begin[{]
local_variable[type[List], nodeList]
if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[call[nodeL... | Keyword[public] identifier[UserAttributeType] operator[<] identifier[PortletAppType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateUserAttribute] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode... |
public void connect(String eventSourceUrl) throws IOException {
LOG.entering(CLASS_NAME, "connect", eventSourceUrl);
if (stream != null) {
LOG.warning("Reusing the same event source for a differnt URL, please create a new EventSource object");
throw new IllegalArgumentException(
... | class class_name[name] begin[{]
method[connect, return_type[void], modifier[public], parameter[eventSourceUrl]] begin[{]
call[LOG.entering, parameter[member[.CLASS_NAME], literal["connect"], member[.eventSourceUrl]]]
if[binary_operation[member[.stream], !=, literal[null]]] begin... | Keyword[public] Keyword[void] identifier[connect] operator[SEP] identifier[String] identifier[eventSourceUrl] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LOG] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] , identifier[eventSourceUrl] operator[S... |
public String getString(String key, String defaultValue) {
return configuration.getString(key, defaultValue);
} | class class_name[name] begin[{]
method[getString, return_type[type[String]], modifier[public], parameter[key, defaultValue]] begin[{]
return[call[configuration.getString, parameter[member[.key], member[.defaultValue]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getString] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[defaultValue] operator[SEP] {
Keyword[return] identifier[configuration] operator[SEP] identifier[getString] operator[SEP] identifier[key] , identifier[defaultValue] operator... |
private static void checkMandatoryProperties( final Analyzer analyzer,
final Jar jar,
final String symbolicName )
{
final String importPackage = analyzer.getProperty( Analyzer.IMPORT_PACKAGE );
if( im... | class class_name[name] begin[{]
method[checkMandatoryProperties, return_type[void], modifier[private static], parameter[analyzer, jar, symbolicName]] begin[{]
local_variable[type[String], importPackage]
if[binary_operation[binary_operation[member[.importPackage], ==, literal[null]], ||,... | Keyword[private] Keyword[static] Keyword[void] identifier[checkMandatoryProperties] operator[SEP] Keyword[final] identifier[Analyzer] identifier[analyzer] , Keyword[final] identifier[Jar] identifier[jar] , Keyword[final] identifier[String] identifier[symbolicName] operator[SEP] {
Keyword[final] identifier[Stri... |
public static <U extends Comparable<? super U>> int canonicalCompare(List<? extends U> o1, List<? extends U> o2) {
int siz1 = o1.size(), siz2 = o2.size();
if (siz1 != siz2) {
return siz1 - siz2;
}
return lexCompare(o1, o2);
} | class class_name[name] begin[{]
method[canonicalCompare, return_type[type[int]], modifier[public static], parameter[o1, o2]] begin[{]
local_variable[type[int], siz1]
if[binary_operation[member[.siz1], !=, member[.siz2]]] begin[{]
return[binary_operation[member[.siz1], -, mem... | Keyword[public] Keyword[static] operator[<] identifier[U] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[U] operator[>] operator[>] Keyword[int] identifier[canonicalCompare] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[U] operator[>] ident... |
public com.google.api.ads.adwords.axis.v201809.cm.PolicyTopicEntryType getPolicyTopicEntryType() {
return policyTopicEntryType;
} | class class_name[name] begin[{]
method[getPolicyTopicEntryType, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.policyTopicEntryType]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[PolicyTopicEntryType] identifier[getPolicy... |
void draw(Canvas canvas) {
updateRadius();
drawRipple(canvas);
ViewInvalidator invalidator = getActionButton().getInvalidator();
if (isDrawingInProgress()) {
invalidator.requireInvalidation();
LOGGER.trace("Drawing Ripple Effect in progress, invalidating the Action Button");
} else if (isDrawingFinished... | class class_name[name] begin[{]
method[draw, return_type[void], modifier[default], parameter[canvas]] begin[{]
call[.updateRadius, parameter[]]
call[.drawRipple, parameter[member[.canvas]]]
local_variable[type[ViewInvalidator], invalidator]
if[call[.isDra... | Keyword[void] identifier[draw] operator[SEP] identifier[Canvas] identifier[canvas] operator[SEP] {
identifier[updateRadius] operator[SEP] operator[SEP] operator[SEP] identifier[drawRipple] operator[SEP] identifier[canvas] operator[SEP] operator[SEP] identifier[ViewInvalidator] identifier[invalidator] operator[=]... |
public static <L, R> Tuple<L, R> newTuple (L left, R right)
{
return new Tuple<L, R>(left, right);
} | class class_name[name] begin[{]
method[newTuple, return_type[type[Tuple]], modifier[public static], parameter[left, right]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=right, postfix_op... | Keyword[public] Keyword[static] operator[<] identifier[L] , identifier[R] operator[>] identifier[Tuple] operator[<] identifier[L] , identifier[R] operator[>] identifier[newTuple] operator[SEP] identifier[L] identifier[left] , identifier[R] identifier[right] operator[SEP] {
Keyword[return] Keyword[new] identif... |
public static Request create(HttpMethod httpMethod,
String url,
Map<String, Collection<String>> headers,
Body body) {
return new Request(httpMethod, url, headers, body);
} | class class_name[name] begin[{]
method[create, return_type[type[Request]], modifier[public static], parameter[httpMethod, url, headers, body]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=httpMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference... | Keyword[public] Keyword[static] identifier[Request] identifier[create] operator[SEP] identifier[HttpMethod] identifier[httpMethod] , identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Collection] operator[<] identifier[String] operator[>] operator[>] identifier[headers] ... |
public void marshall(NotebookInstanceSummary notebookInstanceSummary, ProtocolMarshaller protocolMarshaller) {
if (notebookInstanceSummary == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(notebookIn... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[notebookInstanceSummary, protocolMarshaller]] begin[{]
if[binary_operation[member[.notebookInstanceSummary], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[NotebookInstanceSummary] identifier[notebookInstanceSummary] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[notebookInstanceSummary] operator[==] Other[null] operator... |
public EClass getIfcVirtualGridIntersection() {
if (ifcVirtualGridIntersectionEClass == null) {
ifcVirtualGridIntersectionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(639);
}
return ifcVirtualGridIntersectionEClass;
} | class class_name[name] begin[{]
method[getIfcVirtualGridIntersection, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcVirtualGridIntersectionEClass], ==, literal[null]]] begin[{]
assign[member[.ifcVirtualGridIntersectionE... | Keyword[public] identifier[EClass] identifier[getIfcVirtualGridIntersection] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcVirtualGridIntersectionEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcVirtualGridIntersectionEClass] operator[=] operator[SEP] identifier[E... |
protected MaterialHelpBlock findHelpBlock(Widget widget) {
if (widget != null) {
if (widget instanceof MaterialHelpBlock) {
return (MaterialHelpBlock) widget;
}
// Try and find the MaterialHelpBlock in the children of the given widget.
if (widget i... | class class_name[name] begin[{]
method[findHelpBlock, return_type[type[MaterialHelpBlock]], modifier[protected], parameter[widget]] begin[{]
if[binary_operation[member[.widget], !=, literal[null]]] begin[{]
if[binary_operation[member[.widget], instanceof, type[MaterialHe... | Keyword[protected] identifier[MaterialHelpBlock] identifier[findHelpBlock] operator[SEP] identifier[Widget] identifier[widget] operator[SEP] {
Keyword[if] operator[SEP] identifier[widget] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[widget] Keyword[instanceof] identifi... |
public void marshall(IdentityDescription identityDescription, ProtocolMarshaller protocolMarshaller) {
if (identityDescription == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(identityDescription.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[identityDescription, protocolMarshaller]] begin[{]
if[binary_operation[member[.identityDescription], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[IdentityDescription] identifier[identityDescription] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[identityDescription] operator[==] Other[null] operator[SEP] {
... |
public static <T extends File> T createFile(final SecurityContext securityContext, final InputStream fileStream, final Class<T> fileType, final PropertyMap props)
throws FrameworkException, IOException {
T newFile = (T) StructrApp.getInstance(securityContext).create(fileType, props);
setFileData(newFile, fileSt... | class class_name[name] begin[{]
method[createFile, return_type[type[T]], modifier[public static], parameter[securityContext, fileStream, fileType, props]] begin[{]
local_variable[type[T], newFile]
call[.setFileData, parameter[member[.newFile], member[.fileStream], call[props.get, parame... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[File] operator[>] identifier[T] identifier[createFile] operator[SEP] Keyword[final] identifier[SecurityContext] identifier[securityContext] , Keyword[final] identifier[InputStream] identifier[fileStream] , Keyword[final] identifier[... |
public TypeName unbox() {
if (keyword != null) return this; // Already unboxed.
if (this.equals(BOXED_VOID)) return VOID;
if (this.equals(BOXED_BOOLEAN)) return BOOLEAN;
if (this.equals(BOXED_BYTE)) return BYTE;
if (this.equals(BOXED_SHORT)) return SHORT;
if (this.equals(BOXED_INT)) return INT;
... | class class_name[name] begin[{]
method[unbox, return_type[type[TypeName]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.keyword], !=, literal[null]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[THIS[call[None.equals, parameter[memb... | Keyword[public] identifier[TypeName] identifier[unbox] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[keyword] operator[!=] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[equals] operator[SEP] identifier[B... |
private Raster asByteRaster(final Raster raster, ColorModel colorModel) {
switch (raster.getTransferType()) {
case DataBuffer.TYPE_BYTE:
return raster;
case DataBuffer.TYPE_USHORT:
return raster; // TODO: we handle ushort especially for now..
c... | class class_name[name] begin[{]
method[asByteRaster, return_type[type[Raster]], modifier[private], parameter[raster, colorModel]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=TYPE_BYTE, postfix_operators=[], prefix_operators=[], qualifier=DataBuffer, selectors=[])], ... | Keyword[private] identifier[Raster] identifier[asByteRaster] operator[SEP] Keyword[final] identifier[Raster] identifier[raster] , identifier[ColorModel] identifier[colorModel] operator[SEP] {
Keyword[switch] operator[SEP] identifier[raster] operator[SEP] identifier[getTransferType] operator[SEP] operator[SEP] o... |
@Override
public final void setValue(JsonValue jsonValue) {
try {
this.setValue(convert(jsonValue));
} catch (Exception e) {
logger.error("Error while setting JSON value", e);
}
} | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[final public], parameter[jsonValue]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setValue] operator[SEP] identifier[JsonValue] identifier[jsonValue] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[convert] operator[SEP] identifier[json... |
private void appendEntity(OutputStream outputStream,
ByteArrayInputStream byteArrayInputStream) {
try {
byte[] buffer = new byte[BUFFER_SIZE];
while (true) {
int bytesRead = byteArrayInputStream.read(buffer);
if (bytesRead <= 0) {
... | class class_name[name] begin[{]
method[appendEntity, return_type[void], modifier[private], parameter[outputStream, byteArrayInputStream]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberRefer... | Keyword[private] Keyword[void] identifier[appendEntity] operator[SEP] identifier[OutputStream] identifier[outputStream] , identifier[ByteArrayInputStream] identifier[byteArrayInputStream] operator[SEP] {
Keyword[try] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[n... |
public static void main(String[] args) throws Exception {
CommandLineParser parser = new DefaultParser();
Options slaManagerCliOptions = constructCliOptions();
// parse the help options first.
Options helpOptions = constructHelpOptions();
CommandLine cmd = parser.parse(helpOptions, args, true);
... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[CommandLineParser], parser]
local_variable[type[Options], slaManagerCliOptions]
local_variable[type[Options], helpOptions]
local_variable[type[C... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[CommandLineParser] identifier[parser] operator[=] Keyword[new] identifier[DefaultParser] operator[SEP] oper... |
public Retryer<R> withBlockStrategy(BlockStrategy blockStrategy) {
checkState(this.blockStrategy == null, "a block strategy has already been set %s", this.blockStrategy);
this.blockStrategy = checkNotNull(blockStrategy, "BlockStrategy cannot be null");
return this;
} | class class_name[name] begin[{]
method[withBlockStrategy, return_type[type[Retryer]], modifier[public], parameter[blockStrategy]] begin[{]
call[.checkState, parameter[binary_operation[THIS[member[None.blockStrategy]], ==, literal[null]], literal["a block strategy has already been set %s"], THIS... | Keyword[public] identifier[Retryer] operator[<] identifier[R] operator[>] identifier[withBlockStrategy] operator[SEP] identifier[BlockStrategy] identifier[blockStrategy] operator[SEP] {
identifier[checkState] operator[SEP] Keyword[this] operator[SEP] identifier[blockStrategy] operator[==] Other[null] , literal[... |
@NotNull
public DbPreparedStatement<T> set(@NotNull String name, @Nullable DbLong value) throws SQLException {
return value == null ? setNull(name, JDBCType.BIGINT) : set(name, value.getDbValue());
} | class class_name[name] begin[{]
method[set, return_type[type[DbPreparedStatement]], modifier[public], parameter[name, value]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr... | annotation[@] identifier[NotNull] Keyword[public] identifier[DbPreparedStatement] operator[<] identifier[T] operator[>] identifier[set] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[name] , annotation[@] identifier[Nullable] identifier[DbLong] identifier[value] operator[SEP] Keyword[thr... |
public static SimpleModule getModule() {
SimpleModule module = new SimpleModule();
module.addSerializer(Headers.class, new HeadersSerializer());
return module;
} | class class_name[name] begin[{]
method[getModule, return_type[type[SimpleModule]], modifier[public static], parameter[]] begin[{]
local_variable[type[SimpleModule], module]
call[module.addSerializer, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[static] identifier[SimpleModule] identifier[getModule] operator[SEP] operator[SEP] {
identifier[SimpleModule] identifier[module] operator[=] Keyword[new] identifier[SimpleModule] operator[SEP] operator[SEP] operator[SEP] identifier[module] operator[SEP] identifier[addSerializer] operator[... |
private static int handleError(Throwable t) {
LOG.error("Error while running the command.", t);
System.err.println();
System.err.println("------------------------------------------------------------");
System.err.println(" The program finished with the following exception:");
System.err.println();
if (t.g... | class class_name[name] begin[{]
method[handleError, return_type[type[int]], modifier[private static], parameter[t]] begin[{]
call[LOG.error, parameter[literal["Error while running the command."], member[.t]]]
call[System.err.println, parameter[]]
call[System.err.... | Keyword[private] Keyword[static] Keyword[int] identifier[handleError] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] opera... |
public void marshall(UploadMetadata uploadMetadata, ProtocolMarshaller protocolMarshaller) {
if (uploadMetadata == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(uploadMetadata.getUploadUrl(), UPLOAD... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[uploadMetadata, protocolMarshaller]] begin[{]
if[binary_operation[member[.uploadMetadata], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UploadMetadata] identifier[uploadMetadata] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[uploadMetadata] operator[==] Other[null] operator[SEP] {
Keyword[... |
public FormMappingOption filterSimpleTextParameter(FormSimpleTextParameterFilter filter) {
if (filter == null) {
throw new IllegalArgumentException("The argument 'filter' should not be null.");
}
this.simpleTextParameterFilter = OptionalThing.of(filter);
return this;
} | class class_name[name] begin[{]
method[filterSimpleTextParameter, return_type[type[FormMappingOption]], modifier[public], parameter[filter]] begin[{]
if[binary_operation[member[.filter], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] identifier[FormMappingOption] identifier[filterSimpleTextParameter] operator[SEP] identifier[FormSimpleTextParameterFilter] identifier[filter] operator[SEP] {
Keyword[if] operator[SEP] identifier[filter] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Il... |
protected CmsLock getRelatedLock() {
if (m_relatedLock == null) {
CmsLockType type;
if (isSystemLock()) {
type = CmsLockType.UNLOCKED;
} else {
type = CmsLockType.SYSTEM_UNLOCKED;
}
CmsLock lock = new CmsLock(getResourc... | class class_name[name] begin[{]
method[getRelatedLock, return_type[type[CmsLock]], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.m_relatedLock], ==, literal[null]]] begin[{]
local_variable[type[CmsLockType], type]
if[call[.isSystemLoc... | Keyword[protected] identifier[CmsLock] identifier[getRelatedLock] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_relatedLock] operator[==] Other[null] operator[SEP] {
identifier[CmsLockType] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[isSystemLock] operato... |
public void removeDependency(T from, T to) {
lock.writeLock().lock();
try {
Set<T> dependencies = outgoingEdges.get(from);
if (dependencies == null || !dependencies.contains(to)) {
throw new IllegalArgumentException("Inexistent dependency");
}
dependencies.rem... | class class_name[name] begin[{]
method[removeDependency, return_type[void], modifier[public], parameter[from, to]] begin[{]
call[lock.writeLock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInv... | Keyword[public] Keyword[void] identifier[removeDependency] operator[SEP] identifier[T] identifier[from] , identifier[T] identifier[to] operator[SEP] {
identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword... |
protected void carriageReturn() {
// the arraylist with lines may not be null
if (lines == null) {
lines = new ArrayList();
}
// If the current line is not null
if (line != null) {
// we check if the end of the page is reached (bugfix by Francois Gravel)
... | class class_name[name] begin[{]
method[carriageReturn, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.lines], ==, literal[null]]] begin[{]
assign[member[.lines], ClassCreator(arguments=[], body=None, constructor_type_arguments=N... | Keyword[protected] Keyword[void] identifier[carriageReturn] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[lines] operator[==] Other[null] operator[SEP] {
identifier[lines] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP]
}
Keyw... |
@Override
public long getLongCardinality() {
if (doCacheCardinalities) {
if (highToBitmap.isEmpty()) {
return 0L;
}
int indexOk = ensureCumulatives(highestHigh());
// ensureCumulatives may have removed empty bitmaps
if (highToBitmap.isEmpty()) {
return 0L;
}
... | class class_name[name] begin[{]
method[getLongCardinality, return_type[type[long]], modifier[public], parameter[]] begin[{]
if[member[.doCacheCardinalities]] begin[{]
if[call[highToBitmap.isEmpty, parameter[]]] begin[{]
return[literal[0L]]
els... | annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[getLongCardinality] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[doCacheCardinalities] operator[SEP] {
Keyword[if] operator[SEP] identifier[highToBitmap] operator[SEP] identifier[isEmpty] operator[SEP] op... |
@Override
protected boolean beforeHandleRequest(final Request request) {
// Clear file upload ID (if set)
setFileUploadRequestId(null);
// Check if is targeted request (thumbnail request or file content request)
String targetParam = request.getParameter(Environment.TARGET_ID);
boolean targetted = (targetPa... | class class_name[name] begin[{]
method[beforeHandleRequest, return_type[type[boolean]], modifier[protected], parameter[request]] begin[{]
call[.setFileUploadRequestId, parameter[literal[null]]]
local_variable[type[String], targetParam]
local_variable[type[boolean], targetted]
... | annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[beforeHandleRequest] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
identifier[setFileUploadRequestId] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[String] identifier[target... |
public AnnotatedTypeBuilder<X> removeFromMethod(AnnotatedMethod<? super X> method, Class<? extends Annotation> annotationType) {
return removeFromMethod(method.getJavaMember(), annotationType);
} | class class_name[name] begin[{]
method[removeFromMethod, return_type[type[AnnotatedTypeBuilder]], modifier[public], parameter[method, annotationType]] begin[{]
return[call[.removeFromMethod, parameter[call[method.getJavaMember, parameter[]], member[.annotationType]]]]
end[}]
END[}] | Keyword[public] identifier[AnnotatedTypeBuilder] operator[<] identifier[X] operator[>] identifier[removeFromMethod] operator[SEP] identifier[AnnotatedMethod] operator[<] operator[?] Keyword[super] identifier[X] operator[>] identifier[method] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annot... |
protected static VideoProject createVideo() {
VideoProject video = FACTORY.createVideoProject();
video.setType(VideoType.LOCAL);
video.setValue("video-" + RandomUtils.nextInt(0, 999) + ".mp4");
return video;
} | class class_name[name] begin[{]
method[createVideo, return_type[type[VideoProject]], modifier[static protected], parameter[]] begin[{]
local_variable[type[VideoProject], video]
call[video.setType, parameter[member[VideoType.LOCAL]]]
call[video.setValue, parameter[binary_... | Keyword[protected] Keyword[static] identifier[VideoProject] identifier[createVideo] operator[SEP] operator[SEP] {
identifier[VideoProject] identifier[video] operator[=] identifier[FACTORY] operator[SEP] identifier[createVideoProject] operator[SEP] operator[SEP] operator[SEP] identifier[video] operator[SEP] ident... |
@Override
public void from(Map<KEY, VALUE> map) {
getMap().putAll(nullSafeMap(map));
} | class class_name[name] begin[{]
method[from, return_type[void], modifier[public], parameter[map]] begin[{]
call[.getMap, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[from] operator[SEP] identifier[Map] operator[<] identifier[KEY] , identifier[VALUE] operator[>] identifier[map] operator[SEP] {
identifier[getMap] operator[SEP] operator[SEP] operator[SEP] identifier[putAll] operator[SEP] identifier[nul... |
public static String replaceStringInString(final String text, final String searchString, final String replacement) {
if (stringIsBlank(text) || stringIsBlank(searchString) || replacement == null) {
return text;
}
int start = 0;
int end = text.indexOf(searchString, start);
... | class class_name[name] begin[{]
method[replaceStringInString, return_type[type[String]], modifier[public static], parameter[text, searchString, replacement]] begin[{]
if[binary_operation[binary_operation[call[.stringIsBlank, parameter[member[.text]]], ||, call[.stringIsBlank, parameter[member[.... | Keyword[public] Keyword[static] identifier[String] identifier[replaceStringInString] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] identifier[searchString] , Keyword[final] identifier[String] identifier[replacement] operator[SEP] {
Keyword[if] operator[SEP... |
@Override
public Void call() {
if (shouldAnalyze()) {
LOGGER.debug("Begin Analysis of '{}' ({})", dependency.getActualFilePath(), analyzer.getName());
try {
analyzer.analyze(dependency, engine);
} catch (AnalysisException ex) {
LOGGE... | class class_name[name] begin[{]
method[call, return_type[type[Void]], modifier[public], parameter[]] begin[{]
if[call[.shouldAnalyze, parameter[]]] begin[{]
call[LOGGER.debug, parameter[literal["Begin Analysis of '{}' ({})"], call[dependency.getActualFilePath, parameter[... | annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[shouldAnalyze] operator[SEP] operator[SEP] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identif... |
public AppHelper add(String name, String displayValue, String description, String defaultValue)
{
Arguments.add(new Argument(name, displayValue, description, defaultValue));
return this;
} | class class_name[name] begin[{]
method[add, return_type[type[AppHelper]], modifier[public], parameter[name, displayValue, description, defaultValue]] begin[{]
call[Arguments.add, parameter[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] identifier[AppHelper] identifier[add] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[displayValue] , identifier[String] identifier[description] , identifier[String] identifier[defaultValue] operator[SEP] {
identifier[Arguments] operator[SEP] identifier[add] o... |
@Action(name = "Merge Arrays",
outputs = {
@Output(OutputNames.RETURN_RESULT),
@Output(OutputNames.RETURN_CODE),
@Output(OutputNames.EXCEPTION)
},
responses = {
@Response(text = ResponseNames.SUCCESS, fie... | class class_name[name] begin[{]
method[execute, return_type[type[Map]], modifier[public], parameter[array1, array2]] begin[{]
local_variable[type[Map], returnResult]
if[call[StringUtilities.isBlank, parameter[member[.array1]]]] begin[{]
local_variable[type[String], exception... | annotation[@] identifier[Action] operator[SEP] identifier[name] operator[=] literal[String] , identifier[outputs] operator[=] {
annotation[@] identifier[Output] operator[SEP] identifier[OutputNames] operator[SEP] identifier[RETURN_RESULT] operator[SEP] , annotation[@] identifier[Output] operator[SEP] identifie... |
@Override
public com.liferay.commerce.account.service.persistence.CommerceAccountOrganizationRelPK getPrimaryKey() {
return _commerceAccountOrganizationRel.getPrimaryKey();
} | class class_name[name] begin[{]
method[getPrimaryKey, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[call[_commerceAccountOrganizationRel.getPrimaryKey, parameter[]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[account] operator[SEP] identifier[service] operator[SEP] identifier[persistence] operator[SEP] identifier[CommerceAccountOrganizationRelPK] identifier[getPrima... |
public boolean hasProperty(String category, String key) {
return this.categories.containsKey(category) && this.categories.get(category).containsKey(key);
} | class class_name[name] begin[{]
method[hasProperty, return_type[type[boolean]], modifier[public], parameter[category, key]] begin[{]
return[binary_operation[THIS[member[None.categories]call[None.containsKey, parameter[member[.category]]]], &&, THIS[member[None.categories]call[None.get, parameter[member... | Keyword[public] Keyword[boolean] identifier[hasProperty] operator[SEP] identifier[String] identifier[category] , identifier[String] identifier[key] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[categories] operator[SEP] identifier[containsKey] operator[SEP] identifier[category] operator... |
public List<?> getNotSelected() {
List options = getOptions();
if (options == null || options.isEmpty()) {
return Collections.EMPTY_LIST;
}
List notSelected = new ArrayList(options);
notSelected.removeAll(getSelected());
return Collections.unmodifiableList(notSelected);
} | class class_name[name] begin[{]
method[getNotSelected, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], options]
if[binary_operation[binary_operation[member[.options], ==, literal[null]], ||, call[options.isEmpty, parameter[]]]] begin[{]
... | Keyword[public] identifier[List] operator[<] operator[?] operator[>] identifier[getNotSelected] operator[SEP] operator[SEP] {
identifier[List] identifier[options] operator[=] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[options] operator[==] Other[null] op... |
private static void createSuperForwarder(ClassNode targetNode, MethodNode forwarder, final Map<String,ClassNode> genericsSpec) {
List<ClassNode> interfaces = new ArrayList<ClassNode>(Traits.collectAllInterfacesReverseOrder(targetNode, new LinkedHashSet<ClassNode>()));
String name = forwarder.getName();
... | class class_name[name] begin[{]
method[createSuperForwarder, return_type[void], modifier[private static], parameter[targetNode, forwarder, genericsSpec]] begin[{]
local_variable[type[List], interfaces]
local_variable[type[String], name]
local_variable[type[Parameter], forwarderParameter... | Keyword[private] Keyword[static] Keyword[void] identifier[createSuperForwarder] operator[SEP] identifier[ClassNode] identifier[targetNode] , identifier[MethodNode] identifier[forwarder] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[ClassNode] operator[>] identifier[genericsSpec] operat... |
public AddBrownNtoN_F32 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) {
params = new RadialTangential_F32(radial,t1,t2);
return this;
} | class class_name[name] begin[{]
method[setDistortion, return_type[type[AddBrownNtoN_F32]], modifier[public], parameter[radial, t1, t2]] begin[{]
assign[member[.params], ClassCreator(arguments=[MemberReference(member=radial, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), M... | Keyword[public] identifier[AddBrownNtoN_F32] identifier[setDistortion] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[radial] , Keyword[double] identifier[t1] , Keyword[double] identifier[t2] operator[SEP] {
identifier[params] operator[=] Keyword[new] identifier[RadialTangential_F32] oper... |
public static boolean status(HttpResponse response, int code, int... codes) {
int status = assertNotNull(response).getStatusLine().getStatusCode();
if(status == code) {
return true;
}
if(codes != null && codes.length > 0) {
for (int statusCode : codes) {
if(status == statusCode) ... | class class_name[name] begin[{]
method[status, return_type[type[boolean]], modifier[public static], parameter[response, code, codes]] begin[{]
local_variable[type[int], status]
if[binary_operation[member[.status], ==, member[.code]]] begin[{]
return[literal[true]]
el... | Keyword[public] Keyword[static] Keyword[boolean] identifier[status] operator[SEP] identifier[HttpResponse] identifier[response] , Keyword[int] identifier[code] , Keyword[int] operator[...] identifier[codes] operator[SEP] {
Keyword[int] identifier[status] operator[=] identifier[assertNotNull] operator[SEP] iden... |
private int reduceTableSize() {
int returnCode = HTODDynacache.NO_EXCEPTION;
int count = this.entryRemove;
if (count > 0) {
int removeSize = 5;
while (count > 0) {
int minSize = Integer.MAX_VALUE;
Iterator<Map.Entry<Object,Set<Object>>> e = dep... | class class_name[name] begin[{]
method[reduceTableSize, return_type[type[int]], modifier[private], parameter[]] begin[{]
local_variable[type[int], returnCode]
local_variable[type[int], count]
if[binary_operation[member[.count], >, literal[0]]] begin[{]
local_variable... | Keyword[private] Keyword[int] identifier[reduceTableSize] operator[SEP] operator[SEP] {
Keyword[int] identifier[returnCode] operator[=] identifier[HTODDynacache] operator[SEP] identifier[NO_EXCEPTION] operator[SEP] Keyword[int] identifier[count] operator[=] Keyword[this] operator[SEP] identifier[entryRemove] ope... |
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "typeId", scope = GetObjectRelationships.class)
public JAXBElement<String> createGetObjectRelationshipsTypeId(String value) {
return new JAXBElement<String>(_GetTypeChildrenTypeId_QNAME,
String.class, GetObjectRelations... | class class_name[name] begin[{]
method[createGetObjectRelationshipsTypeId, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_GetTypeChildrenTypeId_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetObjectRelationships] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] iden... |
private ResourceHandler createZipResourceHandler(final URL zipFile) throws IOException {
final FileSystem fileSystem = newFileSystem(URI.create("jar:" + zipFile), Collections.<String, Object>emptyMap());
final ResourceManager resMgr = new FileSystemResourceManager(fileSystem);
return new Resour... | class class_name[name] begin[{]
method[createZipResourceHandler, return_type[type[ResourceHandler]], modifier[private], parameter[zipFile]] begin[{]
local_variable[type[FileSystem], fileSystem]
local_variable[type[ResourceManager], resMgr]
return[ClassCreator(arguments=[MemberReference(... | Keyword[private] identifier[ResourceHandler] identifier[createZipResourceHandler] operator[SEP] Keyword[final] identifier[URL] identifier[zipFile] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[FileSystem] identifier[fileSystem] operator[=] identifier[newFileSystem] operator[SE... |
@Override
public Date computeFirstFireTime (final ICalendar calendar)
{
m_aNextFireTime = getFireTimeAfter (new Date (getStartTime ().getTime () - 1000L));
// Check calendar for date-time exclusion
while (m_aNextFireTime != null && calendar != null && !calendar.isTimeIncluded (m_aNextFireTime.getTime (... | class class_name[name] begin[{]
method[computeFirstFireTime, return_type[type[Date]], modifier[public], parameter[calendar]] begin[{]
assign[member[.m_aNextFireTime], call[.getFireTimeAfter, parameter[ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStar... | annotation[@] identifier[Override] Keyword[public] identifier[Date] identifier[computeFirstFireTime] operator[SEP] Keyword[final] identifier[ICalendar] identifier[calendar] operator[SEP] {
identifier[m_aNextFireTime] operator[=] identifier[getFireTimeAfter] operator[SEP] Keyword[new] identifier[Date] operator[SE... |
public Response<Double> incrByFloat(final String key, final double increment) {
return new PipelineOperation<Double>() {
@Override
Response<Double> execute(Pipeline jedisPipeline) throws DynoException {
return jedisPipeline.incrByFloat(key, increment);
}
}.execute(key, OpName.INCRBYFLOAT);
} | class class_name[name] begin[{]
method[incrByFloat, return_type[type[Response]], modifier[public], parameter[key, increment]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(argum... | Keyword[public] identifier[Response] operator[<] identifier[Double] operator[>] identifier[incrByFloat] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] Keyword[double] identifier[increment] operator[SEP] {
Keyword[return] Keyword[new] identifier[PipelineOperation] operator[<] id... |
@Override
public CommerceAvailabilityEstimate findByUuid_C_First(String uuid,
long companyId,
OrderByComparator<CommerceAvailabilityEstimate> orderByComparator)
throws NoSuchAvailabilityEstimateException {
CommerceAvailabilityEstimate commerceAvailabilityEstimate = fetchByUuid_C_First(uuid,
companyId, orde... | class class_name[name] begin[{]
method[findByUuid_C_First, return_type[type[CommerceAvailabilityEstimate]], modifier[public], parameter[uuid, companyId, orderByComparator]] begin[{]
local_variable[type[CommerceAvailabilityEstimate], commerceAvailabilityEstimate]
if[binary_operation[memb... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceAvailabilityEstimate] identifier[findByUuid_C_First] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CommerceAvailabilityEstimate] operator[>] identifier... |
@com.fasterxml.jackson.annotation.JsonProperty("DetectedLanguageCode")
public void setDetectedLanguageCode(String detectedLanguageCode) {
this.detectedLanguageCode = detectedLanguageCode;
} | class class_name[name] begin[{]
method[setDetectedLanguageCode, return_type[void], modifier[public], parameter[detectedLanguageCode]] begin[{]
assign[THIS[member[None.detectedLanguageCode]], member[.detectedLanguageCode]]
end[}]
END[}] | annotation[@] identifier[com] operator[SEP] identifier[fasterxml] operator[SEP] identifier[jackson] operator[SEP] identifier[annotation] operator[SEP] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setDetectedLanguageCode] operator[SEP] identifier[String] i... |
public AxisAngle4d set(Quaterniondc q) {
double acos = safeAcos(q.w());
double invSqrt = 1.0 / Math.sqrt(1.0 - q.w() * q.w());
this.x = q.x() * invSqrt;
this.y = q.y() * invSqrt;
this.z = q.z() * invSqrt;
this.angle = acos + acos;
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[AxisAngle4d]], modifier[public], parameter[q]] begin[{]
local_variable[type[double], acos]
local_variable[type[double], invSqrt]
assign[THIS[member[None.x]], binary_operation[call[q.x, parameter[]], *, member[.invSqrt]... | Keyword[public] identifier[AxisAngle4d] identifier[set] operator[SEP] identifier[Quaterniondc] identifier[q] operator[SEP] {
Keyword[double] identifier[acos] operator[=] identifier[safeAcos] operator[SEP] identifier[q] operator[SEP] identifier[w] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[do... |
public void addImage(Image image, boolean inlineImage) throws DocumentException {
if (!image.hasAbsoluteY())
throw new DocumentException("The image must have absolute positioning.");
float matrix[] = image.matrix();
matrix[Image.CX] = image.getAbsoluteX() - matrix[Image.CX];
... | class class_name[name] begin[{]
method[addImage, return_type[void], modifier[public], parameter[image, inlineImage]] begin[{]
if[call[image.hasAbsoluteY, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, s... | Keyword[public] Keyword[void] identifier[addImage] operator[SEP] identifier[Image] identifier[image] , Keyword[boolean] identifier[inlineImage] operator[SEP] Keyword[throws] identifier[DocumentException] {
Keyword[if] operator[SEP] operator[!] identifier[image] operator[SEP] identifier[hasAbsoluteY] operator[SE... |
private void addCalculateCrispValue(Program program, Java.CLASS clazz) {
Java.METHOD calc = clazz.addMETHOD("private", "Number", "calculateCrispValue");
calc.setComment("Calculate the crisp value");
calc.setReturnComment("the crisp value");
calc.addArg("Number", "from", "Start interval");
calc.addArg("Number... | class class_name[name] begin[{]
method[addCalculateCrispValue, return_type[void], modifier[private], parameter[program, clazz]] begin[{]
local_variable[type[Java], calc]
call[calc.setComment, parameter[literal["Calculate the crisp value"]]]
call[calc.setReturnComment, pa... | Keyword[private] Keyword[void] identifier[addCalculateCrispValue] operator[SEP] identifier[Program] identifier[program] , identifier[Java] operator[SEP] identifier[CLASS] identifier[clazz] operator[SEP] {
identifier[Java] operator[SEP] identifier[METHOD] identifier[calc] operator[=] identifier[clazz] operator[S... |
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the NetworkService.
NetworkServiceInterface networkService =
adManagerServices.get(session, NetworkServiceInterface.class);
// Get all networks that you have access to ... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session]] begin[{]
local_variable[type[NetworkServiceInterface], networkService]
local_variable[type[Network], networks]
if[binary_operation[binary_operati... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] operator[SEP] Keyword[throws] identifier[RemoteException] {
identifier[NetworkServiceInterface] identifier[networkServ... |
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
final String[] data = issue.getData();
if (data != null && data.length > 1) {
final String actionName = data[1];
final ActionAddModification modification = new ActionAddModification(actionName);
modifi... | class class_name[name] begin[{]
method[accept, return_type[void], modifier[public static], parameter[provider, issue, acceptor]] begin[{]
local_variable[type[String], data]
if[binary_operation[binary_operation[member[.data], !=, literal[null]], &&, binary_operation[member[data.length], ... | Keyword[public] Keyword[static] Keyword[void] identifier[accept] operator[SEP] identifier[SARLQuickfixProvider] identifier[provider] , identifier[Issue] identifier[issue] , identifier[IssueResolutionAcceptor] identifier[acceptor] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] ide... |
private Exception buildAndLogException(Exception e) throws Exception {
PartitionRecord pr = new PartitionRecord(false);
pr.setExecutor(_pe.name);
List<PartitionRecord> records = _pe.taskStore.find(pr);
PartitionRecord record = records.get(0);
String id = "PersistentExecutorMBean... | class class_name[name] begin[{]
method[buildAndLogException, return_type[type[Exception]], modifier[private], parameter[e]] begin[{]
local_variable[type[PartitionRecord], pr]
call[pr.setExecutor, parameter[member[_pe.name]]]
local_variable[type[List], records]
local_vari... | Keyword[private] identifier[Exception] identifier[buildAndLogException] operator[SEP] identifier[Exception] identifier[e] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[PartitionRecord] identifier[pr] operator[=] Keyword[new] identifier[PartitionRecord] operator[SEP] literal[boolean] operator[S... |
@Override
public ImageSource apply(ImageSource source) {
if (radius != 0) {
if (source.isGrayscale()) {
return applyGrayscale(source, radius);
} else {
return applyRGB(source, radius);
}
} else {
if (source.isGr... | class class_name[name] begin[{]
method[apply, return_type[type[ImageSource]], modifier[public], parameter[source]] begin[{]
if[binary_operation[member[.radius], !=, literal[0]]] begin[{]
if[call[source.isGrayscale, parameter[]]] begin[{]
return[call[.appl... | annotation[@] identifier[Override] Keyword[public] identifier[ImageSource] identifier[apply] operator[SEP] identifier[ImageSource] identifier[source] operator[SEP] {
Keyword[if] operator[SEP] identifier[radius] operator[!=] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[source] operator... |
public static void setupTracingConfig() {
TracingUtilities.setupTracingConfig();
List<String> descriptors = Arrays.asList(
"BigtableTable.getTableDescriptor",
"BigtableTable.exists",
"BigtableTable.existsAll",
"BigtableTable.batch",
"BigtableTable.batchCallback",
"BigtableTab... | class class_name[name] begin[{]
method[setupTracingConfig, return_type[void], modifier[public static], parameter[]] begin[{]
call[TracingUtilities.setupTracingConfig, parameter[]]
local_variable[type[List], descriptors]
call[Tracing.getExportComponent, parameter[]]
e... | Keyword[public] Keyword[static] Keyword[void] identifier[setupTracingConfig] operator[SEP] operator[SEP] {
identifier[TracingUtilities] operator[SEP] identifier[setupTracingConfig] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[descriptors] operat... |
public int add(int label,float score) {
int i = 0;
int max;
if(n==-1)
max = scores.size();
else
max = n>scores.size()?scores.size():n;
for (i = 0; i < max; i++) {
if (score > scores.get(i))
break;
}
//TODO: 没有删除多余的信息
if(n!=-1&&i>=n)
return -1;
if(i<scores.size()... | class class_name[name] begin[{]
method[add, return_type[type[int]], modifier[public], parameter[label, score]] begin[{]
local_variable[type[int], i]
local_variable[type[int], max]
if[binary_operation[member[.n], ==, literal[1]]] begin[{]
assign[member[.max], call[sco... | Keyword[public] Keyword[int] identifier[add] operator[SEP] Keyword[int] identifier[label] , Keyword[float] identifier[score] operator[SEP] {
Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[int] identifier[max] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[==] operator[-] O... |
@SuppressWarnings("unchecked")
public <T extends XPathBuilder> T addSearchTextType(SearchType... searchTextTypes) {
if (searchTextTypes != null) {
this.searchTextType.addAll(0, Arrays.asList(searchTextTypes));
}
this.searchTextType = cleanUpSearchType(this.searchTextType);
... | class class_name[name] begin[{]
method[addSearchTextType, return_type[type[T]], modifier[public], parameter[searchTextTypes]] begin[{]
if[binary_operation[member[.searchTextTypes], !=, literal[null]]] begin[{]
THIS[member[None.searchTextType]call[None.addAll, parameter[l... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[XPathBuilder] operator[>] identifier[T] identifier[addSearchTextType] operator[SEP] identifier[SearchType] operator[...] identifier[searchTextTypes] operator[SEP] ... |
protected void reconnect() {
disconnect().then(ok -> {
logger.info("Trying to reconnect...");
scheduler.schedule(this::connect, 5, TimeUnit.SECONDS);
}).catchError(cause -> {
logger.warn("Unable to disconnect from Redis server!", cause);
scheduler.schedule(this::connect, 5, TimeUnit.SECONDS);
}... | class class_name[name] begin[{]
method[reconnect, return_type[void], modifier[protected], parameter[]] begin[{]
call[.disconnect, parameter[]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[reconnect] operator[SEP] operator[SEP] {
identifier[disconnect] operator[SEP] operator[SEP] operator[SEP] identifier[then] operator[SEP] identifier[ok] operator[->] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SE... |
public Project getProject(String namespace, String project, Boolean includeStatistics) throws GitLabApiException {
if (namespace == null) {
throw new RuntimeException("namespace cannot be null");
}
if (project == null) {
throw new RuntimeException("project cannot be nul... | class class_name[name] begin[{]
method[getProject, return_type[type[Project]], modifier[public], parameter[namespace, project, includeStatistics]] begin[{]
if[binary_operation[member[.namespace], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(... | Keyword[public] identifier[Project] identifier[getProject] operator[SEP] identifier[String] identifier[namespace] , identifier[String] identifier[project] , identifier[Boolean] identifier[includeStatistics] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[if] operator[SEP] identifier[name... |
private void writeJobStates(JsonWriter jsonWriter, List<? extends JobState> jobStates) throws IOException {
jsonWriter.beginArray();
for (JobState jobState : jobStates) {
writeJobState(jsonWriter, jobState);
}
jsonWriter.endArray();
} | class class_name[name] begin[{]
method[writeJobStates, return_type[void], modifier[private], parameter[jsonWriter, jobStates]] begin[{]
call[jsonWriter.beginArray, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(argum... | Keyword[private] Keyword[void] identifier[writeJobStates] operator[SEP] identifier[JsonWriter] identifier[jsonWriter] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[JobState] operator[>] identifier[jobStates] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[jsonWriter] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.