code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public BaseTemplate pi(Map<?, ?> attrs) throws IOException {
for (Map.Entry<?, ?> entry : attrs.entrySet()) {
Object target = entry.getKey();
Object instruction = entry.getValue();
out.write("<?");
if (instruction instanceof Map) {
out.write(target... | class class_name[name] begin[{]
method[pi, return_type[type[BaseTemplate]], modifier[public], parameter[attrs]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argument... | Keyword[public] identifier[BaseTemplate] identifier[pi] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[attrs] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] operator[?] , ... |
public static QualifiedName getQualifiedName(Element element) throws MalformedElementException {
Assert.isNotNull(element);
String nsName = getNSName(element);
String nsLocalName = getNSLocalName(element);
if (nsLocalName == null)
throw new MalformedElementException(Policy.bi... | class class_name[name] begin[{]
method[getQualifiedName, return_type[type[QualifiedName]], modifier[public static], parameter[element]] begin[{]
call[Assert.isNotNull, parameter[member[.element]]]
local_variable[type[String], nsName]
local_variable[type[String], nsLocalName]
... | Keyword[public] Keyword[static] identifier[QualifiedName] identifier[getQualifiedName] operator[SEP] identifier[Element] identifier[element] operator[SEP] Keyword[throws] identifier[MalformedElementException] {
identifier[Assert] operator[SEP] identifier[isNotNull] operator[SEP] identifier[element] operator[SEP]... |
public static String escapeXml(String s) {
if (s == null) return null;
StringBuilder sb = new StringBuilder();
for(int i=0; i<s.length(); i++) {
char c = s.charAt(i);
if (c == '<') {
sb.append("<");
} else if (c == '>') {
sb.... | class class_name[name] begin[{]
method[escapeXml, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[StringBuilder], s... | Keyword[public] Keyword[static] identifier[String] identifier[escapeXml] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Key... |
public Object convert( String value, TypeLiteral<?> toType )
{
Exception firstEx = null;
for ( String pattern : this.patterns )
{
try
{
DateFormat format;
if ( this.locale != null )
{
format = new Sim... | class class_name[name] begin[{]
method[convert, return_type[type[Object]], modifier[public], parameter[value, toType]] begin[{]
local_variable[type[Exception], firstEx]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarat... | Keyword[public] identifier[Object] identifier[convert] operator[SEP] identifier[String] identifier[value] , identifier[TypeLiteral] operator[<] operator[?] operator[>] identifier[toType] operator[SEP] {
identifier[Exception] identifier[firstEx] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] id... |
public VariableVisibility getVariableVisibility(Node declaringNameNode) {
Node parent = declaringNameNode.getParent();
checkArgument(parent.isVar() || parent.isFunction() || parent.isParamList());
return visibilityByDeclaringNameNode.get(declaringNameNode);
} | class class_name[name] begin[{]
method[getVariableVisibility, return_type[type[VariableVisibility]], modifier[public], parameter[declaringNameNode]] begin[{]
local_variable[type[Node], parent]
call[.checkArgument, parameter[binary_operation[binary_operation[call[parent.isVar, parameter[... | Keyword[public] identifier[VariableVisibility] identifier[getVariableVisibility] operator[SEP] identifier[Node] identifier[declaringNameNode] operator[SEP] {
identifier[Node] identifier[parent] operator[=] identifier[declaringNameNode] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP]... |
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> reduce(BiFunction<T, T, T> reducer) {
ObjectHelper.requireNonNull(reducer, "reducer is null");
return RxJavaPlugins.onAssembly(new FlowableReduceM... | class class_name[name] begin[{]
method[reduce, return_type[type[Maybe]], modifier[final public], parameter[reducer]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.reducer], literal["reducer is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[UNBOUNDED_IN] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] i... |
public static long getVisibilityCacheWeight(FluoConfiguration conf) {
long size = conf.getLong(VISIBILITY_CACHE_WEIGHT, VISIBILITY_CACHE_WEIGHT_DEFAULT);
if (size <= 0) {
throw new IllegalArgumentException(
"Cache size must be positive for " + VISIBILITY_CACHE_WEIGHT);
}
return size;
} | class class_name[name] begin[{]
method[getVisibilityCacheWeight, return_type[type[long]], modifier[public static], parameter[conf]] begin[{]
local_variable[type[long], size]
if[binary_operation[member[.size], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(a... | Keyword[public] Keyword[static] Keyword[long] identifier[getVisibilityCacheWeight] operator[SEP] identifier[FluoConfiguration] identifier[conf] operator[SEP] {
Keyword[long] identifier[size] operator[=] identifier[conf] operator[SEP] identifier[getLong] operator[SEP] identifier[VISIBILITY_CACHE_WEIGHT] , identi... |
protected int getBinNr(double coord) {
if (Double.isInfinite(coord) || Double.isNaN(coord)) {
throw new UnsupportedOperationException("Encountered non-finite value in Histogram: " + coord);
}
if (coord == max) {
// System.err.println("Triggered special case: "+ (Math.floor((coord -
// base... | class class_name[name] begin[{]
method[getBinNr, return_type[type[int]], modifier[protected], parameter[coord]] begin[{]
if[binary_operation[call[Double.isInfinite, parameter[member[.coord]]], ||, call[Double.isNaN, parameter[member[.coord]]]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[protected] Keyword[int] identifier[getBinNr] operator[SEP] Keyword[double] identifier[coord] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[coord] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[isNaN] oper... |
private static CharSequence validName(final CharSequence name) {
if (!RsWithCookie.CNAME_PTRN.matcher(name).matches()) {
throw new IllegalArgumentException(
String.format(
"Cookie name \"%s\" contains invalid characters",
name
)... | class class_name[name] begin[{]
method[validName, return_type[type[CharSequence]], modifier[private static], parameter[name]] begin[{]
if[call[RsWithCookie.CNAME_PTRN.matcher, parameter[member[.name]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(argu... | Keyword[private] Keyword[static] identifier[CharSequence] identifier[validName] operator[SEP] Keyword[final] identifier[CharSequence] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[RsWithCookie] operator[SEP] identifier[CNAME_PTRN] operator[SEP] identifier[matcher] operator[SEP... |
public Pager<Group> getSubGroups(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Group>(this, Group.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "subgroups"));
} | class class_name[name] begin[{]
method[getSubGroups, return_type[type[Pager]], modifier[public], parameter[groupIdOrPath, itemsPerPage]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_ope... | Keyword[public] identifier[Pager] operator[<] identifier[Group] operator[>] identifier[getSubGroups] operator[SEP] identifier[Object] identifier[groupIdOrPath] , Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[SEP] Keyword[new] identi... |
private base_resource[] post_request(nitro_service service, options option) throws Exception
{
return add_resource(service, option);
} | class class_name[name] begin[{]
method[post_request, return_type[type[base_resource]], modifier[private], parameter[service, option]] begin[{]
return[call[.add_resource, parameter[member[.service], member[.option]]]]
end[}]
END[}] | Keyword[private] identifier[base_resource] operator[SEP] operator[SEP] identifier[post_request] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[add_resource] operator[SEP] identi... |
public String getTableNames(boolean bAddQuotes)
{
return (m_tableName == null) ? Record.formatTableNames(PROJECT_CONTROL_FILE, bAddQuotes) : super.getTableNames(bAddQuotes);
} | class class_name[name] begin[{]
method[getTableNames, return_type[type[String]], modifier[public], parameter[bAddQuotes]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=m_tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operan... | Keyword[public] identifier[String] identifier[getTableNames] operator[SEP] Keyword[boolean] identifier[bAddQuotes] operator[SEP] {
Keyword[return] operator[SEP] identifier[m_tableName] operator[==] Other[null] operator[SEP] operator[?] identifier[Record] operator[SEP] identifier[formatTableNames] operator[SEP] i... |
private void moveIndexesToNextCombination()
{
for (int i = currentIndexes.length - 1, j = list.size() - 1; i >= 0; i--, j--)
{
if (currentIndexes[i] != j)
{
currentIndexes[i]++;
for (int k = i + 1; k < currentIndexes.length; k++)
... | class class_name[name] begin[{]
method[moveIndexesToNextCombination, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentIndexes, postfix_operators=[], prefix_op... | Keyword[private] Keyword[void] identifier[moveIndexesToNextCombination] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[currentIndexes] operator[SEP] identifier[length] operator[-] Other[1] , identifier[j] operator[=] identifier[list] operator[SEP] iden... |
@NotNull
protected CompletableFuture<R> enqueue(@NotNull final Meta meta, @NotNull final T context) {
State<T, R> state = objectQueue.get(meta.getOid());
if (state != null) {
if (state.future.isCancelled()) {
objectQueue.remove(meta.getOid(), state);
state = null;
}
}
if (s... | class class_name[name] begin[{]
method[enqueue, return_type[type[CompletableFuture]], modifier[protected], parameter[meta, context]] begin[{]
local_variable[type[State], state]
if[binary_operation[member[.state], !=, literal[null]]] begin[{]
if[call[state.future.... | annotation[@] identifier[NotNull] Keyword[protected] identifier[CompletableFuture] operator[<] identifier[R] operator[>] identifier[enqueue] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Meta] identifier[meta] , annotation[@] identifier[NotNull] Keyword[final] identifier[T] identifier[conte... |
public static String checkRequiredProperties(Properties props,
String ... requiredProps) {
for (String required : requiredProps) {
if (props.getProperty(required) == null) {
return required;
}
}
return null;
} | class class_name[name] begin[{]
method[checkRequiredProperties, return_type[type[String]], modifier[public static], parameter[props, requiredProps]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReferen... | Keyword[public] Keyword[static] identifier[String] identifier[checkRequiredProperties] operator[SEP] identifier[Properties] identifier[props] , identifier[String] operator[...] identifier[requiredProps] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[required] operator[:] identifier[re... |
public void addInputDeletions(VersionEdit edit)
{
for (FileMetaData input : levelInputs) {
edit.deleteFile(level, input.getNumber());
}
for (FileMetaData input : levelUpInputs) {
edit.deleteFile(level + 1, input.getNumber());
}
} | class class_name[name] begin[{]
method[addInputDeletions, return_type[void], modifier[public], parameter[edit]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=level, postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[addInputDeletions] operator[SEP] identifier[VersionEdit] identifier[edit] operator[SEP] {
Keyword[for] operator[SEP] identifier[FileMetaData] identifier[input] operator[:] identifier[levelInputs] operator[SEP] {
identifier[edit] operator[SEP] identifier[delete... |
protected void removeNeighbour(
SIBUuid8 meUUID,
String busId,
Transaction transaction) throws SIConnectionLostException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"removeNeighbour",
new Objec... | class class_name[name] begin[{]
method[removeNeighbour, return_type[void], modifier[protected], parameter[meUUID, busId, transaction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.e... | Keyword[protected] Keyword[void] identifier[removeNeighbour] operator[SEP] identifier[SIBUuid8] identifier[meUUID] , identifier[String] identifier[busId] , identifier[Transaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SIConnectionLostException] , identifier[SIResourceException] , identifi... |
@Override
public EClass getIfcSurfaceCurveSweptAreaSolid() {
if (ifcSurfaceCurveSweptAreaSolidEClass == null) {
ifcSurfaceCurveSweptAreaSolidEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(673);
}
return ifcSurfaceCurveSweptAreaSolidEClass;
} | class class_name[name] begin[{]
method[getIfcSurfaceCurveSweptAreaSolid, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcSurfaceCurveSweptAreaSolidEClass], ==, literal[null]]] begin[{]
assign[member[.ifcSurfaceCurveSweptA... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcSurfaceCurveSweptAreaSolid] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcSurfaceCurveSweptAreaSolidEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcSurfaceCurveSweptAreaSolidEC... |
public Observable<Void> beginTerminateAsync(String resourceGroupName, String workspaceName, String experimentName, String jobName) {
return beginTerminateWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName, jobName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | class class_name[name] begin[{]
method[beginTerminateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workspaceName, experimentName, jobName]] begin[{]
return[call[.beginTerminateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.workspaceName], ... | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[beginTerminateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workspaceName] , identifier[String] identifier[experimentName] , identifier[String] identifier[jobName] operat... |
protected synchronized void skipForward(int eventsToSkip)
throws IOException {
int offset = 0;
for (int i = 0; i < eventsToSkip; i++) {
// adjust position for reading offset
storage.seek(position);
// read forward skip offset
offset = storage.readInt();
// set file pointer to next event position
... | class class_name[name] begin[{]
method[skipForward, return_type[void], modifier[synchronized protected], parameter[eventsToSkip]] begin[{]
local_variable[type[int], offset]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Member... | Keyword[protected] Keyword[synchronized] Keyword[void] identifier[skipForward] operator[SEP] Keyword[int] identifier[eventsToSkip] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] opera... |
public static Date parseToDate(final String datum, final String[] formats, final Locale locale)
{
for (final String format : formats)
{
final SimpleDateFormat sdf = new SimpleDateFormat(format, locale);
try
{
return sdf.parse(datum);
}
catch (final ParseException e)
{
// Do nothing...
... | class class_name[name] begin[{]
method[parseToDate, return_type[type[Date]], modifier[public static], parameter[datum, formats, locale]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=... | Keyword[public] Keyword[static] identifier[Date] identifier[parseToDate] operator[SEP] Keyword[final] identifier[String] identifier[datum] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[formats] , Keyword[final] identifier[Locale] identifier[locale] operator[SEP] {
Keyword[for] oper... |
public UniformTileSet loadTileSet (String rset, String imgPath, int width, int height)
{
return loadTileSet(getImageProvider(rset), rset, imgPath, width, height);
} | class class_name[name] begin[{]
method[loadTileSet, return_type[type[UniformTileSet]], modifier[public], parameter[rset, imgPath, width, height]] begin[{]
return[call[.loadTileSet, parameter[call[.getImageProvider, parameter[member[.rset]]], member[.rset], member[.imgPath], member[.width], member[.heig... | Keyword[public] identifier[UniformTileSet] identifier[loadTileSet] operator[SEP] identifier[String] identifier[rset] , identifier[String] identifier[imgPath] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
Keyword[return] identifier[loadTileSet] operator[SEP] identifier[getI... |
public Map<String, List<? extends Object>> getUnionParameters() {
if( unionParameters == null ) {
unionParameters = new HashMap<String, List<? extends Object>>();
}
return unionParameters;
} | class class_name[name] begin[{]
method[getUnionParameters, return_type[type[Map]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.unionParameters], ==, literal[null]]] begin[{]
assign[member[.unionParameters], ClassCreator(arguments=[], body=None, co... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[Object] operator[>] operator[>] identifier[getUnionParameters] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[unionParameters] operator[==] Other[null] operat... |
@Override
public MappingWithProvenance inferMissingDatatypes(MappingWithProvenance mapping, DBMetadata dbMetadata) throws UnknownDatatypeException {
MappingDataTypeCompletion typeCompletion = new MappingDataTypeCompletion(dbMetadata,
settings.isDefaultDatatypeInferred(), relation2Predicate, ... | class class_name[name] begin[{]
method[inferMissingDatatypes, return_type[type[MappingWithProvenance]], modifier[public], parameter[mapping, dbMetadata]] begin[{]
local_variable[type[MappingDataTypeCompletion], typeCompletion]
local_variable[type[ImmutableMap], ruleMap]
ForStatement(bod... | annotation[@] identifier[Override] Keyword[public] identifier[MappingWithProvenance] identifier[inferMissingDatatypes] operator[SEP] identifier[MappingWithProvenance] identifier[mapping] , identifier[DBMetadata] identifier[dbMetadata] operator[SEP] Keyword[throws] identifier[UnknownDatatypeException] {
identifi... |
@Override
public IEntityGroup find(String key) throws GroupsException {
if (isTreeRefreshRequired()) {
refreshTree();
}
log.debug("Invoking find() for key: {}", key);
// All of our groups (incl. ROOT_GROUP)
// are indexed in the 'groups' map by key...
... | class class_name[name] begin[{]
method[find, return_type[type[IEntityGroup]], modifier[public], parameter[key]] begin[{]
if[call[.isTreeRefreshRequired, parameter[]]] begin[{]
call[.refreshTree, parameter[]]
else begin[{]
None
end[}]
call[... | annotation[@] identifier[Override] Keyword[public] identifier[IEntityGroup] identifier[find] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[GroupsException] {
Keyword[if] operator[SEP] identifier[isTreeRefreshRequired] operator[SEP] operator[SEP] operator[SEP] {
... |
public static boolean dependencyExistsManagement(File pom, Dependency dependency, Log logger) throws IOException, XmlPullParserException {
Model model = getModelFromPOM(pom, logger);
DependencyManagement dMgmt = model.getDependencyManagement();
if (dMgmt == null) {
model.setDependencyManagement(new Dependen... | class class_name[name] begin[{]
method[dependencyExistsManagement, return_type[type[boolean]], modifier[public static], parameter[pom, dependency, logger]] begin[{]
local_variable[type[Model], model]
local_variable[type[DependencyManagement], dMgmt]
if[binary_operation[member[.d... | Keyword[public] Keyword[static] Keyword[boolean] identifier[dependencyExistsManagement] operator[SEP] identifier[File] identifier[pom] , identifier[Dependency] identifier[dependency] , identifier[Log] identifier[logger] operator[SEP] Keyword[throws] identifier[IOException] , identifier[XmlPullParserException] {
... |
public View getHeaderAt(int position) {
if (position == MATCHED_STICKIED_HEADER) {
return mStickiedHeader;
}
try {
return (View)getChildAt(position).getTag();
} catch (Exception e) {
}
return null;
} | class class_name[name] begin[{]
method[getHeaderAt, return_type[type[View]], modifier[public], parameter[position]] begin[{]
if[binary_operation[member[.position], ==, member[.MATCHED_STICKIED_HEADER]]] begin[{]
return[member[.mStickiedHeader]]
else begin[{]
None
end... | Keyword[public] identifier[View] identifier[getHeaderAt] operator[SEP] Keyword[int] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[position] operator[==] identifier[MATCHED_STICKIED_HEADER] operator[SEP] {
Keyword[return] identifier[mStickiedHeader] operator[SEP]
}
... |
private Path2D getPath(double simplifyTolerance, BoundingBox boundingBox,
ProjectionTransform transform, LineString lineString) {
Path2D path = null;
// Try to simplify the number of points in the LineString
List<Point> lineStringPoints = simplifyPoints(simplifyTolerance,
lineString.getPoints());
for ... | class class_name[name] begin[{]
method[getPath, return_type[type[Path2D]], modifier[private], parameter[simplifyTolerance, boundingBox, transform, lineString]] begin[{]
local_variable[type[Path2D], path]
local_variable[type[List], lineStringPoints]
ForStatement(body=BlockStatement(label... | Keyword[private] identifier[Path2D] identifier[getPath] operator[SEP] Keyword[double] identifier[simplifyTolerance] , identifier[BoundingBox] identifier[boundingBox] , identifier[ProjectionTransform] identifier[transform] , identifier[LineString] identifier[lineString] operator[SEP] {
identifier[Path2D] ident... |
@Nullable
public static String [] getAllMatchingGroupValues (@Nonnull @RegEx final String sRegEx, @Nonnull final String sValue)
{
final Matcher aMatcher = getMatcher (sRegEx, sValue);
if (!aMatcher.find ())
{
// Values does not match RegEx
return null;
}
// groupCount is excluding t... | class class_name[name] begin[{]
method[getAllMatchingGroupValues, return_type[type[String]], modifier[public static], parameter[sRegEx, sValue]] begin[{]
local_variable[type[Matcher], aMatcher]
if[call[aMatcher.find, parameter[]]] begin[{]
return[literal[null]]
else ... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getAllMatchingGroupValues] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[RegEx] Keyword[final] identifier[String] identifier[sRegEx] , annotation[@] identifier[Nonnull... |
public void nameBound(String name) {
final Node node = getNamesBoundNode(true);
if (!node.hasChild(name)) {
node.addChild(Fqn.fromElements(name));
}
} | class class_name[name] begin[{]
method[nameBound, return_type[void], modifier[public], parameter[name]] begin[{]
local_variable[type[Node], node]
if[call[node.hasChild, parameter[member[.name]]]] begin[{]
call[node.addChild, parameter[call[Fqn.fromElements, param... | Keyword[public] Keyword[void] identifier[nameBound] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[final] identifier[Node] identifier[node] operator[=] identifier[getNamesBoundNode] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identif... |
static String removeLeadingAndTrailingQuotes(String s)
{
Matcher m = extraQuotes.matcher(s);
if (m.find())
{
s = m.group(2);
}
return s;
} | class class_name[name] begin[{]
method[removeLeadingAndTrailingQuotes, return_type[type[String]], modifier[static], parameter[s]] begin[{]
local_variable[type[Matcher], m]
if[call[m.find, parameter[]]] begin[{]
assign[member[.s], call[m.group, parameter[literal[2... | Keyword[static] identifier[String] identifier[removeLeadingAndTrailingQuotes] operator[SEP] identifier[String] identifier[s] operator[SEP] {
identifier[Matcher] identifier[m] operator[=] identifier[extraQuotes] operator[SEP] identifier[matcher] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[if] ... |
@Override
public boolean isSameRM(final XAResource _xares)
{
final boolean ret = _xares.toString().equals(toString());
AbstractResource.LOG.trace("is Same RM: {}", ret);
return ret;
} | class class_name[name] begin[{]
method[isSameRM, return_type[type[boolean]], modifier[public], parameter[_xares]] begin[{]
local_variable[type[boolean], ret]
call[AbstractResource.LOG.trace, parameter[literal["is Same RM: {}"], member[.ret]]]
return[member[.ret]]
end[}]
END[... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isSameRM] operator[SEP] Keyword[final] identifier[XAResource] identifier[_xares] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[ret] operator[=] identifier[_xares] operator[SEP] identifier[toString] operator[SEP] operator[... |
public static boolean isReachable(String processDefinitionId, String sourceElementId, String targetElementId) {
// Fetch source and target elements
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement sourceFlowElement = process.getFlowElement(sourceElementId, true);
Fl... | class class_name[name] begin[{]
method[isReachable, return_type[type[boolean]], modifier[public static], parameter[processDefinitionId, sourceElementId, targetElementId]] begin[{]
local_variable[type[Process], process]
local_variable[type[FlowElement], sourceFlowElement]
local_variable[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isReachable] operator[SEP] identifier[String] identifier[processDefinitionId] , identifier[String] identifier[sourceElementId] , identifier[String] identifier[targetElementId] operator[SEP] {
identifier[Process] identifier[process] operator[=] identif... |
public ServiceFuture<Void> beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCa... | class class_name[name] begin[{]
method[beginStopAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, networkWatcherName, connectionMonitorName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginStopWithServiceResponseAsync, parame... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[beginStopAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[String] identifier[connectionMonitorName] , Keyword[final] identifier[ServiceCa... |
public void reset()
{
// Reset the resolver to completely clear out its domain.
resolver.reset();
// Create a token source to load the model rules from.
Source<Token> tokenSource =
TokenSource.getTokenSourceForInputStream(WAMEngine.class.getClassLoader().getResourceAsStr... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[]] begin[{]
call[resolver.reset, parameter[]]
local_variable[type[Source], tokenSource]
local_variable[type[Parser], libParser]
call[libParser.setTokenSource, parameter[m... | Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] {
identifier[resolver] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[Source] operator[<] identifier[Token] operator[>] identifier[tokenSource] operator[=] identifier[TokenSource] operator[SEP] ident... |
static Node getArgumentForCallOrNew(Node call, int index) {
checkState(isCallOrNew(call));
return getNthSibling(call.getSecondChild(), index);
} | class class_name[name] begin[{]
method[getArgumentForCallOrNew, return_type[type[Node]], modifier[static], parameter[call, index]] begin[{]
call[.checkState, parameter[call[.isCallOrNew, parameter[member[.call]]]]]
return[call[.getNthSibling, parameter[call[call.getSecondChild, paramete... | Keyword[static] identifier[Node] identifier[getArgumentForCallOrNew] operator[SEP] identifier[Node] identifier[call] , Keyword[int] identifier[index] operator[SEP] {
identifier[checkState] operator[SEP] identifier[isCallOrNew] operator[SEP] identifier[call] operator[SEP] operator[SEP] operator[SEP] Keyword[retu... |
public void processNextRelationshipInjections(final SpecTopic topic, final Document doc, final boolean useFixedUrls) {
if (topic.getNextTopicRelationships().isEmpty()) return;
// Attempt to get the previous topic and process it
final List<TopicRelationship> nextList = topic.getNextTopicRelation... | class class_name[name] begin[{]
method[processNextRelationshipInjections, return_type[void], modifier[public], parameter[topic, doc, useFixedUrls]] begin[{]
if[call[topic.getNextTopicRelationships, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_varia... | Keyword[public] Keyword[void] identifier[processNextRelationshipInjections] operator[SEP] Keyword[final] identifier[SpecTopic] identifier[topic] , Keyword[final] identifier[Document] identifier[doc] , Keyword[final] Keyword[boolean] identifier[useFixedUrls] operator[SEP] {
Keyword[if] operator[SEP] identifier[... |
public SmartBinder castVirtual(Class<?> returnType, Class<?> firstArg, Class<?>... restArgs) {
return new SmartBinder(this, new Signature(returnType, firstArg, restArgs, signature().argNames()), binder.castVirtual(returnType, firstArg, restArgs));
} | class class_name[name] begin[{]
method[castVirtual, return_type[type[SmartBinder]], modifier[public], parameter[returnType, firstArg, restArgs]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassCreator(arguments=[MemberReference... | Keyword[public] identifier[SmartBinder] identifier[castVirtual] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[returnType] , identifier[Class] operator[<] operator[?] operator[>] identifier[firstArg] , identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[restA... |
public NonStandardFontFamily get(String fontFamily) {
NonStandardFontFamily f = standardUnicodeFontFamilySet
.getFontFamilyByName(fontFamily);
if (f != null)
return f;
f = standardNonUnicodeFontFamilySet.getFontFamilyByName(fontFamily);
if (f != null)
... | class class_name[name] begin[{]
method[get, return_type[type[NonStandardFontFamily]], modifier[public], parameter[fontFamily]] begin[{]
local_variable[type[NonStandardFontFamily], f]
if[binary_operation[member[.f], !=, literal[null]]] begin[{]
return[member[.f]]
else begin[{]
No... | Keyword[public] identifier[NonStandardFontFamily] identifier[get] operator[SEP] identifier[String] identifier[fontFamily] operator[SEP] {
identifier[NonStandardFontFamily] identifier[f] operator[=] identifier[standardUnicodeFontFamilySet] operator[SEP] identifier[getFontFamilyByName] operator[SEP] identifier[fon... |
@Override
public void deleteAll() {
switch (keyMode) {
case NAMESPACE:
throw new CacheException.OperationNotSupportedException(
"Key mode[" + keyMode + "] does not support flushall operation.");
case MONOPOLISTIC:
try {
getMemcached... | class class_name[name] begin[{]
method[deleteAll, return_type[void], modifier[public], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['NAMESPACE'], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_ope... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deleteAll] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[keyMode] operator[SEP] {
Keyword[case] identifier[NAMESPACE] operator[:] Keyword[throw] Keyword[new] identifier[CacheException] operator[SEP] i... |
@Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<DiscordianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<DiscordianDate>) super.localDateTime(temporal);
} | class class_name[name] begin[{]
method[localDateTime, return_type[type[ChronoLocalDateTime]], modifier[public], parameter[temporal]] begin[{]
return[Cast(expression=SuperMethodInvocation(arguments=[MemberReference(member=temporal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], m... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ChronoLocalDateTime] operator[<] identifier[DiscordianDate] operator[>] identifier[localDateTime] operator[SEP] identifier[TemporalAccessor] identifier[temporal] operator[... |
public List<URL> getClasspathURLs() {
scanSpec.performScan = false;
try (ScanResult scanResult = scan()) {
return scanResult.getClasspathURLs();
}
} | class class_name[name] begin[{]
method[getClasspathURLs, return_type[type[List]], modifier[public], parameter[]] begin[{]
assign[member[scanSpec.performScan], literal[false]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getClasspathURLs, postfix_o... | Keyword[public] identifier[List] operator[<] identifier[URL] operator[>] identifier[getClasspathURLs] operator[SEP] operator[SEP] {
identifier[scanSpec] operator[SEP] identifier[performScan] operator[=] literal[boolean] operator[SEP] Keyword[try] operator[SEP] identifier[ScanResult] identifier[scanResult] operat... |
JCExpression argumentsOpt(List<JCExpression> typeArgs, JCExpression t) {
if ((mode & EXPR) != 0 && token.kind == LPAREN || typeArgs != null) {
mode = EXPR;
return arguments(typeArgs, t);
} else {
return t;
}
} | class class_name[name] begin[{]
method[argumentsOpt, return_type[type[JCExpression]], modifier[default], parameter[typeArgs, t]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.mode], &, member[.EXPR]], !=, literal[0]], &&, binary_operation[member[token.k... | identifier[JCExpression] identifier[argumentsOpt] operator[SEP] identifier[List] operator[<] identifier[JCExpression] operator[>] identifier[typeArgs] , identifier[JCExpression] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[mode] operator[&] identifier[EXPR] operator[SEP] oper... |
public static String slurp(final InputStream is, final int bufferSize) {
final char[] buffer = new char[bufferSize];
final StringBuilder out = new StringBuilder();
try {
final Reader in = new InputStreamReader(is, "UTF-8");
try {
for (;;) {
int rsz = in.read(buffer, 0, buffer.length);
if (rsz ... | class class_name[name] begin[{]
method[slurp, return_type[type[String]], modifier[public static], parameter[is, bufferSize]] begin[{]
local_variable[type[char], buffer]
local_variable[type[StringBuilder], out]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Var... | Keyword[public] Keyword[static] identifier[String] identifier[slurp] operator[SEP] Keyword[final] identifier[InputStream] identifier[is] , Keyword[final] Keyword[int] identifier[bufferSize] operator[SEP] {
Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keywo... |
public Observable<Page<ExpressRouteCrossConnectionInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<ExpressRouteCrossConnectionInner>>, Page<ExpressRouteCrossConnectionInner>>() {
@Override
... | class class_name[name] begin[{]
method[listNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ExpressRouteCrossConnectionInner] operator[>] operator[>] identifier[listNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listNextWithServiceRes... |
private List<E> snapshot() {
List<E> list = Lists.newArrayListWithExpectedSize(size());
for (Multiset.Entry<E> entry : entrySet()) {
E element = entry.getElement();
for (int i = entry.getCount(); i > 0; i--) {
list.add(element);
}
}
return list;
} | class class_name[name] begin[{]
method[snapshot, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | Keyword[private] identifier[List] operator[<] identifier[E] operator[>] identifier[snapshot] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[E] operator[>] identifier[list] operator[=] identifier[Lists] operator[SEP] identifier[newArrayListWithExpectedSize] operator[SEP] identifier[size] op... |
@Override
public String[] decode(long generation, String tableName, List<VoltType> types, List<String> names, String[] to, Object[] fields) throws RuntimeException {
Preconditions.checkArgument(
fields != null && fields.length > m_firstFieldOffset,
"null or inapropriately siz... | class class_name[name] begin[{]
method[decode, return_type[type[String]], modifier[public], parameter[generation, tableName, types, names, to, fields]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[binary_operation[member[.fields], !=, literal[null]], &&, binary_operatio... | annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[decode] operator[SEP] Keyword[long] identifier[generation] , identifier[String] identifier[tableName] , identifier[List] operator[<] identifier[VoltType] operator[>] identifier[types] , identifier[List] opera... |
static <E> boolean addAllImpl(Multiset<E> self, Collection<? extends E> elements) {
if (elements.isEmpty()) {
return false;
}
if (elements instanceof Multiset) {
Multiset<? extends E> that = cast(elements);
for (Entry<? extends E> entry : that.entrySet()) {
self.add(entry.getElemen... | class class_name[name] begin[{]
method[addAllImpl, return_type[type[boolean]], modifier[static], parameter[self, elements]] begin[{]
if[call[elements.isEmpty, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation[... | Keyword[static] operator[<] identifier[E] operator[>] Keyword[boolean] identifier[addAllImpl] operator[SEP] identifier[Multiset] operator[<] identifier[E] operator[>] identifier[self] , identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[E] operator[>] identifier[elements] operator[SEP] {
... |
static AbstractLazyPatchableTarget createPatchableTarget(final String name, final LayerPathConfig layer, final File metadata, final InstalledImage image) throws IOException {
// patchable target
return new AbstractLazyPatchableTarget() {
@Override
public InstalledImage getInstal... | class class_name[name] begin[{]
method[createPatchableTarget, return_type[type[AbstractLazyPatchableTarget]], modifier[static], parameter[name, layer, metadata, image]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[Return... | Keyword[static] identifier[AbstractLazyPatchableTarget] identifier[createPatchableTarget] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[LayerPathConfig] identifier[layer] , Keyword[final] identifier[File] identifier[metadata] , Keyword[final] identifier[InstalledImage] ... |
public final Factor[] getFactors() {
final Factor[] factors = new Factor[_factors.length];
System.arraycopy(_factors, 0, factors, 0, factors.length);
return factors;
} | class class_name[name] begin[{]
method[getFactors, return_type[type[Factor]], modifier[final public], parameter[]] begin[{]
local_variable[type[Factor], factors]
call[System.arraycopy, parameter[member[._factors], literal[0], member[.factors], literal[0], member[factors.length]]]
... | Keyword[public] Keyword[final] identifier[Factor] operator[SEP] operator[SEP] identifier[getFactors] operator[SEP] operator[SEP] {
Keyword[final] identifier[Factor] operator[SEP] operator[SEP] identifier[factors] operator[=] Keyword[new] identifier[Factor] operator[SEP] identifier[_factors] operator[SEP] identif... |
public static List<ValidationGroups> findAnnotations(final Method method) {
final Class<?> declaringClass = method.getDeclaringClass();
final List<ValidationGroups> annotations = filterAnnotations(declaringClass.getAnnotations());
annotations.addAll(filterAnnotations(method.getAnnotations()));
... | class class_name[name] begin[{]
method[findAnnotations, return_type[type[List]], modifier[public static], parameter[method]] begin[{]
local_variable[type[Class], declaringClass]
local_variable[type[List], annotations]
call[annotations.addAll, parameter[call[.filterAnnotations, p... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ValidationGroups] operator[>] identifier[findAnnotations] operator[SEP] Keyword[final] identifier[Method] identifier[method] operator[SEP] {
Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[declaringClass] oper... |
public NativeResponse readNativeResponse(CharSequence chars) throws IOException {
return readNativeResponse(CharSource.wrap(chars).openStream());
} | class class_name[name] begin[{]
method[readNativeResponse, return_type[type[NativeResponse]], modifier[public], parameter[chars]] begin[{]
return[call[.readNativeResponse, parameter[call[CharSource.wrap, parameter[member[.chars]]]]]]
end[}]
END[}] | Keyword[public] identifier[NativeResponse] identifier[readNativeResponse] operator[SEP] identifier[CharSequence] identifier[chars] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[readNativeResponse] operator[SEP] identifier[CharSource] operator[SEP] identifier[wrap] operator[SE... |
public List<FormFieldMapping> getFormFieldMappingForForm(
Long electronicFormIdParam)
{
List<FormFieldMapping> returnVal = new ArrayList();
if(electronicFormIdParam == null)
{
return returnVal;
}
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
try {
Long formDefinitionI... | class class_name[name] begin[{]
method[getFormFieldMappingForForm, return_type[type[List]], modifier[public], parameter[electronicFormIdParam]] begin[{]
local_variable[type[List], returnVal]
if[binary_operation[member[.electronicFormIdParam], ==, literal[null]]] begin[{]
ret... | Keyword[public] identifier[List] operator[<] identifier[FormFieldMapping] operator[>] identifier[getFormFieldMappingForForm] operator[SEP] identifier[Long] identifier[electronicFormIdParam] operator[SEP] {
identifier[List] operator[<] identifier[FormFieldMapping] operator[>] identifier[returnVal] operator[=] Key... |
private void processEnvEntries(List<EnvEntry> envEntries) {
if (envEntries != null) {
for (EnvEntry envEntry : envEntries) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "processing envEntry", envEntry.getName(), envEntry.getValu... | class class_name[name] begin[{]
method[processEnvEntries, return_type[void], modifier[private], parameter[envEntries]] begin[{]
if[binary_operation[member[.envEntries], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Binary... | Keyword[private] Keyword[void] identifier[processEnvEntries] operator[SEP] identifier[List] operator[<] identifier[EnvEntry] operator[>] identifier[envEntries] operator[SEP] {
Keyword[if] operator[SEP] identifier[envEntries] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifie... |
public SICoreConnection getSICoreConnection() throws SIConnectionLostException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getSICoreConnection");
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Building connection prox... | class class_name[name] begin[{]
method[getSICoreConnection, return_type[type[SICoreConnection]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, p... | Keyword[public] identifier[SICoreConnection] identifier[getSICoreConnection] operator[SEP] operator[SEP] Keyword[throws] identifier[SIConnectionLostException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[t... |
public boolean add(Object o) {
if (o instanceof GroupAttrReply == false) {
return true;
}
GroupAttrReply gcr = (GroupAttrReply)o;
if (gcr.has_failed) {
has_failed = true;
}
return super.add(o);
} | class class_name[name] begin[{]
method[add, return_type[type[boolean]], modifier[public], parameter[o]] begin[{]
if[binary_operation[binary_operation[member[.o], instanceof, type[GroupAttrReply]], ==, literal[false]]] begin[{]
return[literal[true]]
else begin[{]
None
... | Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[GroupAttrReply] operator[==] literal[boolean] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
... |
@Override
public String generateJavascriptTemplateContent(final Map<String, Object> variables,
final String methodName)
{
final StringBuilder sb = new StringBuilder();
sb.append("new");
sb.append(" ");
sb.append(methodName);
sb.append("(");
sb.append("'#");
sb.append(getComponentId());
sb.append("',... | class class_name[name] begin[{]
method[generateJavascriptTemplateContent, return_type[type[String]], modifier[public], parameter[variables, methodName]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["new"]]]
call[sb.append, parameter[... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[generateJavascriptTemplateContent] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[variables] , Keyword[final] identifier[String] identifier[methodName] operator[SEP... |
public String getAttribute(final DirContext ctx, final String dn, final String attributeName) throws NamingException {
final Attributes attributes = ctx.getAttributes(dn);
return getAttribute(attributes, attributeName);
} | class class_name[name] begin[{]
method[getAttribute, return_type[type[String]], modifier[public], parameter[ctx, dn, attributeName]] begin[{]
local_variable[type[Attributes], attributes]
return[call[.getAttribute, parameter[member[.attributes], member[.attributeName]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getAttribute] operator[SEP] Keyword[final] identifier[DirContext] identifier[ctx] , Keyword[final] identifier[String] identifier[dn] , Keyword[final] identifier[String] identifier[attributeName] operator[SEP] Keyword[throws] identifier[NamingException] {
Keyword[fi... |
public List<ICalProperty> setProperty(ICalProperty property) {
return properties.replace(property.getClass(), property);
} | class class_name[name] begin[{]
method[setProperty, return_type[type[List]], modifier[public], parameter[property]] begin[{]
return[call[properties.replace, parameter[call[property.getClass, parameter[]], member[.property]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[ICalProperty] operator[>] identifier[setProperty] operator[SEP] identifier[ICalProperty] identifier[property] operator[SEP] {
Keyword[return] identifier[properties] operator[SEP] identifier[replace] operator[SEP] identifier[property] operator[SEP] identifie... |
@Override
public void filter(ClientRequestContext clientRequestContext) throws IOException {
String methodName = "filter(outgoing)";
Tracer tracer = OpentracingTracerManager.getTracer();
if (tracer == null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
... | class class_name[name] begin[{]
method[filter, return_type[void], modifier[public], parameter[clientRequestContext]] begin[{]
local_variable[type[String], methodName]
local_variable[type[Tracer], tracer]
if[binary_operation[member[.tracer], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[filter] operator[SEP] identifier[ClientRequestContext] identifier[clientRequestContext] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] identifie... |
public List<Review> getMoviesReviews(int movieId, String reviewType, String country) throws RottenTomatoesException {
return getMoviesReviews(movieId, reviewType, DEFAULT_PAGE_LIMIT, DEFAULT_PAGE, country);
} | class class_name[name] begin[{]
method[getMoviesReviews, return_type[type[List]], modifier[public], parameter[movieId, reviewType, country]] begin[{]
return[call[.getMoviesReviews, parameter[member[.movieId], member[.reviewType], member[.DEFAULT_PAGE_LIMIT], member[.DEFAULT_PAGE], member[.country]]]]
... | Keyword[public] identifier[List] operator[<] identifier[Review] operator[>] identifier[getMoviesReviews] operator[SEP] Keyword[int] identifier[movieId] , identifier[String] identifier[reviewType] , identifier[String] identifier[country] operator[SEP] Keyword[throws] identifier[RottenTomatoesException] {
Keywor... |
private DataBlockScanner getNextNamespaceSliceScanner(int currentNamespaceId) {
Integer nextNsId = null;
while ((nextNsId == null) && datanode.shouldRun
&& !blockScannerThread.isInterrupted()) {
waitForOneNameSpaceUp();
synchronized (this) {
if (getNamespaceSetSize() > 0) {
... | class class_name[name] begin[{]
method[getNextNamespaceSliceScanner, return_type[type[DataBlockScanner]], modifier[private], parameter[currentNamespaceId]] begin[{]
local_variable[type[Integer], nextNsId]
while[binary_operation[binary_operation[binary_operation[member[.nextNsId], ==, li... | Keyword[private] identifier[DataBlockScanner] identifier[getNextNamespaceSliceScanner] operator[SEP] Keyword[int] identifier[currentNamespaceId] operator[SEP] {
identifier[Integer] identifier[nextNsId] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[nextNsId] operator[... |
public boolean addBusItinerary(BusItinerary busItinerary) {
if (busItinerary == null) {
return false;
}
if (this.itineraries.indexOf(busItinerary) != -1) {
return false;
}
if (!this.itineraries.add(busItinerary)) {
return false;
}
final boolean isValidItinerary = busItinerary.isValidPrimitive();
... | class class_name[name] begin[{]
method[addBusItinerary, return_type[type[boolean]], modifier[public], parameter[busItinerary]] begin[{]
if[binary_operation[member[.busItinerary], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[boolean] identifier[addBusItinerary] operator[SEP] identifier[BusItinerary] identifier[busItinerary] operator[SEP] {
Keyword[if] operator[SEP] identifier[busItinerary] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keywor... |
public float getElevation() {
if (message_type != 1) return -1.0f;
if(Cinrad2IOServiceProvider.isSC)
return 120.0f * elevation_ang / 65536.0f;
else if(Cinrad2IOServiceProvider.isCC)
return elevation_ang * 0.01f;
else if(Cinrad2IOServiceProvider.isCC20)
return elevation_an... | class class_name[name] begin[{]
method[getElevation, return_type[type[float]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.message_type], !=, literal[1]]] begin[{]
return[literal[1.0f]]
else begin[{]
None
end[}]
if[member[Cinrad2IOServiceP... | Keyword[public] Keyword[float] identifier[getElevation] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[message_type] operator[!=] Other[1] operator[SEP] Keyword[return] operator[-] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[Cinrad2IOServiceProvider] operator[SEP] identi... |
public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands,
final ListCommand originalRemoteCommand) {
localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange()
.getToVersion(), randomUUID()));
final int count = lo... | class class_name[name] begin[{]
method[repairLocalCommandsVersion, return_type[void], modifier[public], parameter[localCommands, originalRemoteCommand]] begin[{]
call[localCommands.add, parameter[call[.repairCommand, parameter[call[localCommands.poll, parameter[]], call[originalRemoteCommand.ge... | Keyword[public] Keyword[void] identifier[repairLocalCommandsVersion] operator[SEP] Keyword[final] identifier[Queue] operator[<] identifier[ListCommand] operator[>] identifier[localCommands] , Keyword[final] identifier[ListCommand] identifier[originalRemoteCommand] operator[SEP] {
identifier[localCommands] opera... |
@Override
public CollisionResult computeCollision(Transformable transformable, CollisionCategory category)
{
return computer.computeCollision(transformable, category);
} | class class_name[name] begin[{]
method[computeCollision, return_type[type[CollisionResult]], modifier[public], parameter[transformable, category]] begin[{]
return[call[computer.computeCollision, parameter[member[.transformable], member[.category]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[CollisionResult] identifier[computeCollision] operator[SEP] identifier[Transformable] identifier[transformable] , identifier[CollisionCategory] identifier[category] operator[SEP] {
Keyword[return] identifier[computer] operator[SEP] identifier[compute... |
@Override
public DescriptorValue calculate(IAtomContainer atomContainer) {
int hBondAcceptors = 0;
IAtomContainer ac;
try {
ac = (IAtomContainer) atomContainer.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}
... | class class_name[name] begin[{]
method[calculate, return_type[type[DescriptorValue]], modifier[public], parameter[atomContainer]] begin[{]
local_variable[type[int], hBondAcceptors]
local_variable[type[IAtomContainer], ac]
TryStatement(block=[StatementExpression(expression=Assignment(exp... | annotation[@] identifier[Override] Keyword[public] identifier[DescriptorValue] identifier[calculate] operator[SEP] identifier[IAtomContainer] identifier[atomContainer] operator[SEP] {
Keyword[int] identifier[hBondAcceptors] operator[=] Other[0] operator[SEP] identifier[IAtomContainer] identifier[ac] operator[SEP... |
@Override
public EClass getIfcQuantityTime() {
if (ifcQuantityTimeEClass == null) {
ifcQuantityTimeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(491);
}
return ifcQuantityTimeEClass;
} | class class_name[name] begin[{]
method[getIfcQuantityTime, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcQuantityTimeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcQuantityTimeEClass], Cast(expression=MethodInv... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcQuantityTime] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcQuantityTimeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcQuantityTimeEClass] operator[=] operator[SEP] identifier... |
public java.util.List<String> getDnsIpAddresses() {
if (dnsIpAddresses == null) {
dnsIpAddresses = new com.amazonaws.internal.SdkInternalList<String>();
}
return dnsIpAddresses;
} | class class_name[name] begin[{]
method[getDnsIpAddresses, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.dnsIpAddresses], ==, literal[null]]] begin[{]
assign[member[.dnsIpAddresses], ClassCreator(arguments=[], body=None, cons... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getDnsIpAddresses] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[dnsIpAddresses] operator[==] Other[null] operator[SEP] {
identifier... |
public FieldError build() {
final FieldError error = new FieldError(objectName, field, conversionFailure, codes, variables);
error.setDefaultMessage(defaultMessage);
error.setSheetName(sheetName);
error.setLabel(label);
error.setRejectedValue(rejectedValue);
... | class class_name[name] begin[{]
method[build, return_type[type[FieldError]], modifier[public], parameter[]] begin[{]
local_variable[type[FieldError], error]
call[error.setDefaultMessage, parameter[member[.defaultMessage]]]
call[error.setSheetName, parameter[member[.sheet... | Keyword[public] identifier[FieldError] identifier[build] operator[SEP] operator[SEP] {
Keyword[final] identifier[FieldError] identifier[error] operator[=] Keyword[new] identifier[FieldError] operator[SEP] identifier[objectName] , identifier[field] , identifier[conversionFailure] , identifier[codes] , identif... |
public static void releaseGraphicsForImage(Image image) throws SlickException {
Graphics g = (Graphics) graphics.remove(image.getTexture());
if (g != null) {
g.destroy();
}
} | class class_name[name] begin[{]
method[releaseGraphicsForImage, return_type[void], modifier[public static], parameter[image]] begin[{]
local_variable[type[Graphics], g]
if[binary_operation[member[.g], !=, literal[null]]] begin[{]
call[g.destroy, parameter[]]
... | Keyword[public] Keyword[static] Keyword[void] identifier[releaseGraphicsForImage] operator[SEP] identifier[Image] identifier[image] operator[SEP] Keyword[throws] identifier[SlickException] {
identifier[Graphics] identifier[g] operator[=] operator[SEP] identifier[Graphics] operator[SEP] identifier[graphics] opera... |
public static Predicate<ReactiveSensorEvent> filterSensorChanged() {
return new Predicate<ReactiveSensorEvent>() {
@Override public boolean test(ReactiveSensorEvent event) throws Exception {
return event.isSensorChanged();
}
};
} | class class_name[name] begin[{]
method[filterSensorChanged, return_type[type[Predicate]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arg... | Keyword[public] Keyword[static] identifier[Predicate] operator[<] identifier[ReactiveSensorEvent] operator[>] identifier[filterSensorChanged] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Predicate] operator[<] identifier[ReactiveSensorEvent] operator[>] operator[SEP] operator[SEP] {
... |
private void ensureLengthForWrite(int ilength) {
if (ilength > mLength) {
if (ilength <= mData.length) {
mLength = ilength;
} else {
int newLength = mData.length * 2;
if (newLength < ilength) {
newLength = ilength... | class class_name[name] begin[{]
method[ensureLengthForWrite, return_type[void], modifier[private], parameter[ilength]] begin[{]
if[binary_operation[member[.ilength], >, member[.mLength]]] begin[{]
if[binary_operation[member[.ilength], <=, member[mData.length]]] begin[{]
... | Keyword[private] Keyword[void] identifier[ensureLengthForWrite] operator[SEP] Keyword[int] identifier[ilength] operator[SEP] {
Keyword[if] operator[SEP] identifier[ilength] operator[>] identifier[mLength] operator[SEP] {
Keyword[if] operator[SEP] identifier[ilength] operator[<=] identifier[mData] oper... |
public void showShareSheet(@NonNull Activity activity, @NonNull LinkProperties linkProperties, @NonNull ShareSheetStyle style, @Nullable Branch.BranchLinkShareListener callback) {
showShareSheet(activity, linkProperties, style, callback, null);
} | class class_name[name] begin[{]
method[showShareSheet, return_type[void], modifier[public], parameter[activity, linkProperties, style, callback]] begin[{]
call[.showShareSheet, parameter[member[.activity], member[.linkProperties], member[.style], member[.callback], literal[null]]]
end[}]
EN... | Keyword[public] Keyword[void] identifier[showShareSheet] operator[SEP] annotation[@] identifier[NonNull] identifier[Activity] identifier[activity] , annotation[@] identifier[NonNull] identifier[LinkProperties] identifier[linkProperties] , annotation[@] identifier[NonNull] identifier[ShareSheetStyle] identifier[style]... |
public INDArray params(boolean backwardOnly) {
if (backwardOnly)
return flattenedParams;
List<INDArray> list = new ArrayList<>(layers.length);
for (int i = 0; i < topologicalOrder.length; i++) {
if (!vertices[topologicalOrder[i]].hasLayer())
continue;
... | class class_name[name] begin[{]
method[params, return_type[type[INDArray]], modifier[public], parameter[backwardOnly]] begin[{]
if[member[.backwardOnly]] begin[{]
return[member[.flattenedParams]]
else begin[{]
None
end[}]
local_variable[type[List], list]
ForState... | Keyword[public] identifier[INDArray] identifier[params] operator[SEP] Keyword[boolean] identifier[backwardOnly] operator[SEP] {
Keyword[if] operator[SEP] identifier[backwardOnly] operator[SEP] Keyword[return] identifier[flattenedParams] operator[SEP] identifier[List] operator[<] identifier[INDArray] operator[>] ... |
public static void registerAVIMMessageType(Class<? extends AVIMTypedMessage> messageType) {
AVIMMessageType type = messageType.getAnnotation(AVIMMessageType.class);
if (type == null) {
throw new IncompleteAnnotationException(AVIMMessageType.class, "type");
}
int messageTypeValue = type.type();
... | class class_name[name] begin[{]
method[registerAVIMMessageType, return_type[void], modifier[public static], parameter[messageType]] begin[{]
local_variable[type[AVIMMessageType], type]
if[binary_operation[member[.type], ==, literal[null]]] begin[{]
ThrowStatement(expression=... | Keyword[public] Keyword[static] Keyword[void] identifier[registerAVIMMessageType] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[AVIMTypedMessage] operator[>] identifier[messageType] operator[SEP] {
identifier[AVIMMessageType] identifier[type] operator[=] identifier[messageTy... |
private void obtainShowProgress() {
boolean showProgress = ThemeUtil.getBoolean(this, R.attr.showProgress, true);
showProgress(showProgress);
} | class class_name[name] begin[{]
method[obtainShowProgress, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[boolean], showProgress]
call[.showProgress, parameter[member[.showProgress]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[obtainShowProgress] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[showProgress] operator[=] identifier[ThemeUtil] operator[SEP] identifier[getBoolean] operator[SEP] Keyword[this] , identifier[R] operator[SEP] identifier[attr] operator[SEP] identifier[showPro... |
public double getDouble(String attrName) {
BigDecimal bd = getNumber(attrName);
if (bd == null)
throw new NumberFormatException
("value of " + attrName + " is null");
return bd.doubleValue();
} | class class_name[name] begin[{]
method[getDouble, return_type[type[double]], modifier[public], parameter[attrName]] begin[{]
local_variable[type[BigDecimal], bd]
if[binary_operation[member[.bd], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperati... | Keyword[public] Keyword[double] identifier[getDouble] operator[SEP] identifier[String] identifier[attrName] operator[SEP] {
identifier[BigDecimal] identifier[bd] operator[=] identifier[getNumber] operator[SEP] identifier[attrName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bd] operator[==] ... |
public static LargeBlockTask getStoreTask(BlockId blockId, ByteBuffer block) {
return new LargeBlockTask() {
@Override
public LargeBlockResponse call() throws Exception {
Exception theException = null;
try {
LargeBlockManager.getInstanc... | class class_name[name] begin[{]
method[getStoreTask, return_type[type[LargeBlockTask]], modifier[public static], parameter[blockId, block]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotation... | Keyword[public] Keyword[static] identifier[LargeBlockTask] identifier[getStoreTask] operator[SEP] identifier[BlockId] identifier[blockId] , identifier[ByteBuffer] identifier[block] operator[SEP] {
Keyword[return] Keyword[new] identifier[LargeBlockTask] operator[SEP] operator[SEP] {
annotation[@] iden... |
@Override
protected final void finishSessionInitialization0(
final IoSession session, IoFuture future) {
// In case that ConnectFuture.cancel() is invoked before
// setSession() is invoked, add a listener that closes the
// connection immediately on cancellation.
future.a... | class class_name[name] begin[{]
method[finishSessionInitialization0, return_type[void], modifier[final protected], parameter[session, future]] begin[{]
call[future.addListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], bo... | annotation[@] identifier[Override] Keyword[protected] Keyword[final] Keyword[void] identifier[finishSessionInitialization0] operator[SEP] Keyword[final] identifier[IoSession] identifier[session] , identifier[IoFuture] identifier[future] operator[SEP] {
identifier[future] operator[SEP] identifier[addListener] op... |
public static final ClassInfo get(Class<?> type) {
ClassInfo exist = cache.get(type);
if (null != exist) return exist;
synchronized (cache) {
exist = cache.get(type);
if (null != exist) return exist;
Set<MethodInfo> methods = CollectUtils.newHashSet();
Class<?> nextClass = type;
... | class class_name[name] begin[{]
method[get, return_type[type[ClassInfo]], modifier[final public static], parameter[type]] begin[{]
local_variable[type[ClassInfo], exist]
if[binary_operation[literal[null], !=, member[.exist]]] begin[{]
return[member[.exist]]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[final] identifier[ClassInfo] identifier[get] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] {
identifier[ClassInfo] identifier[exist] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[ty... |
public DataElement addContact(DataElementContactComponent t) { //3
if (t == null)
return this;
if (this.contact == null)
this.contact = new ArrayList<DataElementContactComponent>();
this.contact.add(t);
return this;
} | class class_name[name] begin[{]
method[addContact, return_type[type[DataElement]], modifier[public], parameter[t]] begin[{]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[binary_operation[THIS[member[None.... | Keyword[public] identifier[DataElement] identifier[addContact] operator[SEP] identifier[DataElementContactComponent] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[if] operator[SEP] Keyword[this] ope... |
public void setDefinitions(java.util.Collection<DefinitionInformation> definitions) {
if (definitions == null) {
this.definitions = null;
return;
}
this.definitions = new java.util.ArrayList<DefinitionInformation>(definitions);
} | class class_name[name] begin[{]
method[setDefinitions, return_type[void], modifier[public], parameter[definitions]] begin[{]
if[binary_operation[member[.definitions], ==, literal[null]]] begin[{]
assign[THIS[member[None.definitions]], literal[null]]
return[No... | Keyword[public] Keyword[void] identifier[setDefinitions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DefinitionInformation] operator[>] identifier[definitions] operator[SEP] {
Keyword[if] operator[SEP] identifier[definitions] operator[... |
protected double norm(double x, int i) {
if (Double.isNaN(m_Ranges[i][R_MIN]) || (m_Ranges[i][R_MAX] == m_Ranges[i][R_MIN]))
return 0;
else
return (x - m_Ranges[i][R_MIN]) / (m_Ranges[i][R_WIDTH]);
} | class class_name[name] begin[{]
method[norm, return_type[type[double]], modifier[protected], parameter[x, i]] begin[{]
if[binary_operation[call[Double.isNaN, parameter[member[.m_Ranges]]], ||, binary_operation[member[.m_Ranges], ==, member[.m_Ranges]]]] begin[{]
return[literal[0]]
else ... | Keyword[protected] Keyword[double] identifier[norm] operator[SEP] Keyword[double] identifier[x] , Keyword[int] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[m_Ranges] operator[SEP] identifier[i] operator[SEP] operator[SEP] ide... |
public Object getSQLValue(String fieldname, Serializable fieldvalue) {
if (this.cryptmap == null) return fieldvalue;
CryptHandler handler = this.cryptmap.get(fieldname);
if (handler == null) return fieldvalue;
return handler.encrypt(fieldvalue);
} | class class_name[name] begin[{]
method[getSQLValue, return_type[type[Object]], modifier[public], parameter[fieldname, fieldvalue]] begin[{]
if[binary_operation[THIS[member[None.cryptmap]], ==, literal[null]]] begin[{]
return[member[.fieldvalue]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[Object] identifier[getSQLValue] operator[SEP] identifier[String] identifier[fieldname] , identifier[Serializable] identifier[fieldvalue] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cryptmap] operator[==] Other[null] operator[SEP] Keyword[return] id... |
public VirtualNetworkPeeringInner get(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) {
return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[get, return_type[type[VirtualNetworkPeeringInner]], modifier[public], parameter[resourceGroupName, virtualNetworkName, virtualNetworkPeeringName]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkName],... | Keyword[public] identifier[VirtualNetworkPeeringInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[String] identifier[virtualNetworkPeeringName] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseA... |
public void loadFromFileWithPath(String file, LabelAlphabet alphabet) throws IOException {
File f = new File(file);
FileInputStream in = new FileInputStream(f);
BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
String line;
while((line=reader.readLine())!=null){
String[]... | class class_name[name] begin[{]
method[loadFromFileWithPath, return_type[void], modifier[public], parameter[file, alphabet]] begin[{]
local_variable[type[File], f]
local_variable[type[FileInputStream], in]
local_variable[type[BufferedReader], reader]
local_variable[type[String],... | Keyword[public] Keyword[void] identifier[loadFromFileWithPath] operator[SEP] identifier[String] identifier[file] , identifier[LabelAlphabet] identifier[alphabet] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[f] operator[=] Keyword[new] identifier[File] operator[SEP] identif... |
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case SimpleAntlrPackage.PREDICATED__PREDICATE:
return basicSetPredicate(null, msgs);
case SimpleAntlrPackage.PREDICATED__ELEMENT:
return basic... | class class_name[name] begin[{]
method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PREDICATED__PREDICATE, postfix_operators=[], prefix_operators=[], qualifi... | annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] {
Keyword[switch] operator[SEP] identifi... |
public HandlerRegistration addStorageChangeHandler(final StorageChangeEvent.Handler handler) {
if(handler == null)
throw new IllegalArgumentException("Handler can not be null");
ensureHandlerSet().add(handler);
return new HandlerRegistration() {
@Override
public void removeHandler() {
... | class class_name[name] begin[{]
method[addStorageChangeHandler, return_type[type[HandlerRegistration]], modifier[public], parameter[handler]] begin[{]
if[binary_operation[member[.handler], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[... | Keyword[public] identifier[HandlerRegistration] identifier[addStorageChangeHandler] operator[SEP] Keyword[final] identifier[StorageChangeEvent] operator[SEP] identifier[Handler] identifier[handler] operator[SEP] {
Keyword[if] operator[SEP] identifier[handler] operator[==] Other[null] operator[SEP] Keyword[throw]... |
private void initOptions(Options options) {
this.dumpOnError = options.isSet(DOE);
this.promptOnError = options.isSet(PROMPT);
this.emitWarnings = options.isUnset(XLINT_CUSTOM, "none");
this.suppressNotes = options.isSet("suppressNotes");
this.MaxErrors = getI... | class class_name[name] begin[{]
method[initOptions, return_type[void], modifier[private], parameter[options]] begin[{]
assign[THIS[member[None.dumpOnError]], call[options.isSet, parameter[member[.DOE]]]]
assign[THIS[member[None.promptOnError]], call[options.isSet, parameter[memb... | Keyword[private] Keyword[void] identifier[initOptions] operator[SEP] identifier[Options] identifier[options] operator[SEP] {
Keyword[this] operator[SEP] identifier[dumpOnError] operator[=] identifier[options] operator[SEP] identifier[isSet] operator[SEP] identifier[DOE] operator[SEP] operator[SEP] Keyword[this] ... |
public void zeroMeanStdOne( int radius , T input , double maxPixelValue , double delta , T output ) {
// check preconditions and initialize data structures
initialize(input, output);
// avoid overflow issues by ensuring that the max pixel value is 1
T adjusted = ensureMaxValueOfOne(input, maxPixelValue);
//... | class class_name[name] begin[{]
method[zeroMeanStdOne, return_type[void], modifier[public], parameter[radius, input, maxPixelValue, delta, output]] begin[{]
call[.initialize, parameter[member[.input], member[.output]]]
local_variable[type[T], adjusted]
if[binary_operatio... | Keyword[public] Keyword[void] identifier[zeroMeanStdOne] operator[SEP] Keyword[int] identifier[radius] , identifier[T] identifier[input] , Keyword[double] identifier[maxPixelValue] , Keyword[double] identifier[delta] , identifier[T] identifier[output] operator[SEP] {
identifier[initialize] operator[SEP] iden... |
protected File [] getTargetFiles (final File targetDirectory, final String grammarFile, final GrammarInfo grammarInfo)
{
final File parserFile = new File (targetDirectory, grammarInfo.getParserFile ());
return new File [] { parserFile };
} | class class_name[name] begin[{]
method[getTargetFiles, return_type[type[File]], modifier[protected], parameter[targetDirectory, grammarFile, grammarInfo]] begin[{]
local_variable[type[File], parserFile]
return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberRefe... | Keyword[protected] identifier[File] operator[SEP] operator[SEP] identifier[getTargetFiles] operator[SEP] Keyword[final] identifier[File] identifier[targetDirectory] , Keyword[final] identifier[String] identifier[grammarFile] , Keyword[final] identifier[GrammarInfo] identifier[grammarInfo] operator[SEP] {
Keywo... |
private void set_time()
{
if (date == true)
{
Date d = new Date();
long nb_millisec = d.getTime();
when.tv_sec = (int)(nb_millisec / 1000);
when.tv_usec = (int)((nb_millisec - (when.tv_sec * 1000)) * 1000);
when.tv_nsec = 0;
}
} | class class_name[name] begin[{]
method[set_time, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.date], ==, literal[true]]] begin[{]
local_variable[type[Date], d]
local_variable[type[long], nb_millisec]
assi... | Keyword[private] Keyword[void] identifier[set_time] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[date] operator[==] literal[boolean] operator[SEP] {
identifier[Date] identifier[d] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] Keyword[long] id... |
public void marshall(GetJobRequest getJobRequest, ProtocolMarshaller protocolMarshaller) {
if (getJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getJobRequest.getArn(), ARN_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getJobRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getJobRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetJobRequest] identifier[getJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getJobRequest] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
protected ExternalBinaryValue createBinaryValue( File file ) throws IOException {
URL content = createUrlForFile(file);
return new UrlBinaryValue(sha1(file), getSourceName(), content, file.length(), file.getName(), getMimeTypeDetector());
} | class class_name[name] begin[{]
method[createBinaryValue, return_type[type[ExternalBinaryValue]], modifier[protected], parameter[file]] begin[{]
local_variable[type[URL], content]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefi... | Keyword[protected] identifier[ExternalBinaryValue] identifier[createBinaryValue] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[URL] identifier[content] operator[=] identifier[createUrlForFile] operator[SEP] identifier[file] operator[SEP] operat... |
public BatchGetDeploymentsResult withDeploymentsInfo(DeploymentInfo... deploymentsInfo) {
if (this.deploymentsInfo == null) {
setDeploymentsInfo(new com.amazonaws.internal.SdkInternalList<DeploymentInfo>(deploymentsInfo.length));
}
for (DeploymentInfo ele : deploymentsInfo) {
... | class class_name[name] begin[{]
method[withDeploymentsInfo, return_type[type[BatchGetDeploymentsResult]], modifier[public], parameter[deploymentsInfo]] begin[{]
if[binary_operation[THIS[member[None.deploymentsInfo]], ==, literal[null]]] begin[{]
call[.setDeploymentsInfo,... | Keyword[public] identifier[BatchGetDeploymentsResult] identifier[withDeploymentsInfo] operator[SEP] identifier[DeploymentInfo] operator[...] identifier[deploymentsInfo] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[deploymentsInfo] operator[==] Other[null] operator[SEP] {
... |
public String getColumnName(int column) throws SQLException {
checkColumn(column);
if (useColumnName) {
String name = resultMetaData.columns[--column].getNameString();
return name == null ? ""
: name;
}
return resultMetaData.col... | class class_name[name] begin[{]
method[getColumnName, return_type[type[String]], modifier[public], parameter[column]] begin[{]
call[.checkColumn, parameter[member[.column]]]
if[member[.useColumnName]] begin[{]
local_variable[type[String], name]
return[Ter... | Keyword[public] identifier[String] identifier[getColumnName] operator[SEP] Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkColumn] operator[SEP] identifier[column] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[useColumnName] operator[SEP... |
protected WebContext createTemplateContext(RequestManager requestManager) {
final HttpServletRequest request = requestManager.getRequest();
final HttpServletResponse response = requestManager.getResponseManager().getResponse();
final ServletContext servletContext = request.getServletContext();
... | class class_name[name] begin[{]
method[createTemplateContext, return_type[type[WebContext]], modifier[protected], parameter[requestManager]] begin[{]
local_variable[type[HttpServletRequest], request]
local_variable[type[HttpServletResponse], response]
local_variable[type[ServletContext]... | Keyword[protected] identifier[WebContext] identifier[createTemplateContext] operator[SEP] identifier[RequestManager] identifier[requestManager] operator[SEP] {
Keyword[final] identifier[HttpServletRequest] identifier[request] operator[=] identifier[requestManager] operator[SEP] identifier[getRequest] operator[SE... |
protected void addToHistory(V obj)
{
if(maxHistory < 1)
return;
if(history == null)
if (maxHistory != Integer.MAX_VALUE)//we probably set it to a reasonable value
{
try
{
history = new ArrayDeque<V>(maxHistory);
... | class class_name[name] begin[{]
method[addToHistory, return_type[void], modifier[protected], parameter[obj]] begin[{]
if[binary_operation[member[.maxHistory], <, literal[1]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[member[.history], ==... | Keyword[protected] Keyword[void] identifier[addToHistory] operator[SEP] identifier[V] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[maxHistory] operator[<] Other[1] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[history] operator[==] Other[null] operator[S... |
@Override
public void removePortalUID(final int uPortalUID) {
this.transactionOperations.execute(
new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus arg0) {
final St... | class class_name[name] begin[{]
method[removePortalUID, return_type[void], modifier[public], parameter[uPortalUID]] begin[{]
THIS[member[None.transactionOperations]call[None.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removePortalUID] operator[SEP] Keyword[final] Keyword[int] identifier[uPortalUID] operator[SEP] {
Keyword[this] operator[SEP] identifier[transactionOperations] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[Trans... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.