code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
boolean writeOneFrame() throws IOException {
WebSocketWriter writer;
ByteString pong;
Object messageOrClose = null;
int receivedCloseCode = -1;
String receivedCloseReason = null;
Streams streamsToClose = null;
synchronized (RealWebSocket.this) {
if (failed) {
return false; // ... | class class_name[name] begin[{]
method[writeOneFrame, return_type[type[boolean]], modifier[default], parameter[]] begin[{]
local_variable[type[WebSocketWriter], writer]
local_variable[type[ByteString], pong]
local_variable[type[Object], messageOrClose]
local_variable[type[int], ... | Keyword[boolean] identifier[writeOneFrame] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[WebSocketWriter] identifier[writer] operator[SEP] identifier[ByteString] identifier[pong] operator[SEP] identifier[Object] identifier[messageOrClose] operator[=] Other[null] operator[SEP] K... |
@SuppressWarnings("unchecked")
@Override
public EList<IfcCartesianPoint> getPolygon() {
return (EList<IfcCartesianPoint>) eGet(Ifc4Package.Literals.IFC_POLY_LOOP__POLYGON, true);
} | class class_name[name] begin[{]
method[getPolygon, return_type[type[EList]], modifier[public], parameter[]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_POLY_LOOP__POLYGON, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[])... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcCartesianPoint] operator[>] identifier[getPolygon] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[EList] op... |
public static List<ColumnFamilyDescriptor> buildColumnFamilyDescriptors(
ColumnFamilyOptions cfOptions, String... cfNames) {
List<ColumnFamilyDescriptor> result = new ArrayList<>();
if (cfNames != null) {
for (String cfName : cfNames) {
result.add(buildColumnFamil... | class class_name[name] begin[{]
method[buildColumnFamilyDescriptors, return_type[type[List]], modifier[public static], parameter[cfOptions, cfNames]] begin[{]
local_variable[type[List], result]
if[binary_operation[member[.cfNames], !=, literal[null]]] begin[{]
ForStatement(b... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ColumnFamilyDescriptor] operator[>] identifier[buildColumnFamilyDescriptors] operator[SEP] identifier[ColumnFamilyOptions] identifier[cfOptions] , identifier[String] operator[...] identifier[cfNames] operator[SEP] {
identifier[List] operato... |
@Override
public TransformGroup getModel(Object object, TransformGroup model) {
ShanksAgent agent = (ShanksAgent) object;
model = new TransformGroup();
Color3f colour;
Sphere s = new Sphere(diameter);
// Cone s = new Cone(diameter, diameter);
// ColorCube s = new Colo... | class class_name[name] begin[{]
method[getModel, return_type[type[TransformGroup]], modifier[public], parameter[object, model]] begin[{]
local_variable[type[ShanksAgent], agent]
assign[member[.model], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operato... | annotation[@] identifier[Override] Keyword[public] identifier[TransformGroup] identifier[getModel] operator[SEP] identifier[Object] identifier[object] , identifier[TransformGroup] identifier[model] operator[SEP] {
identifier[ShanksAgent] identifier[agent] operator[=] operator[SEP] identifier[ShanksAgent] operat... |
public <POJO> AbstractPojoDescriptorImpl<POJO> createDescriptor(Class<POJO> pojoType) {
throw new NlsUnsupportedOperationException("createDescriptor(" + pojoType.getName() + ")");
} | class class_name[name] begin[{]
method[createDescriptor, return_type[type[AbstractPojoDescriptorImpl]], modifier[public], parameter[pojoType]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], ... | Keyword[public] operator[<] identifier[POJO] operator[>] identifier[AbstractPojoDescriptorImpl] operator[<] identifier[POJO] operator[>] identifier[createDescriptor] operator[SEP] identifier[Class] operator[<] identifier[POJO] operator[>] identifier[pojoType] operator[SEP] {
Keyword[throw] Keyword[new] identifie... |
JCExpression superSuffix(List<JCExpression> typeArgs, JCExpression t) {
nextToken();
if (token.kind == LPAREN || typeArgs != null) {
t = arguments(typeArgs, t);
} else if (token.kind == COLCOL) {
if (typeArgs != null) return illegal();
t = memberReferenceSuffi... | class class_name[name] begin[{]
method[superSuffix, return_type[type[JCExpression]], modifier[default], parameter[typeArgs, t]] begin[{]
call[.nextToken, parameter[]]
if[binary_operation[binary_operation[member[token.kind], ==, member[.LPAREN]], ||, binary_operation[member[.type... | identifier[JCExpression] identifier[superSuffix] operator[SEP] identifier[List] operator[<] identifier[JCExpression] operator[>] identifier[typeArgs] , identifier[JCExpression] identifier[t] operator[SEP] {
identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[toke... |
public void displayField() // init this field override for other value
{
if (m_vScreenField == null)
return;
for (int i = 0; i < m_vScreenField.size(); i++)
{
Object component = m_vScreenField.elementAt(i);
Convert converter = null;
... | class class_name[name] begin[{]
method[displayField, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_vScreenField], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(label=None, s... | Keyword[public] Keyword[void] identifier[displayField] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_vScreenField] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] ope... |
public Set<Map.Entry<Integer, V>> entrySet() {
if (entrySet==null) {
entrySet = new AbstractSet<Map.Entry<Integer, V>>() {
public Iterator iterator() {
return (Iterator) new IntHashIterator(ENTRIES);
}
public boolea... | class class_name[name] begin[{]
method[entrySet, return_type[type[Set]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.entrySet], ==, literal[null]]] begin[{]
assign[member[.entrySet], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[... | Keyword[public] identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Integer] , identifier[V] operator[>] operator[>] identifier[entrySet] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[entrySet] operator[==] Other[null] operator[SEP] {
... |
public DroolsParserException createDroolsException( RecognitionException e ) {
List<String> codeAndMessage = createErrorMessage( e );
return new DroolsParserException( codeAndMessage.get( 1 ),
codeAndMessage
.get... | class class_name[name] begin[{]
method[createDroolsException, return_type[type[DroolsParserException]], modifier[public], parameter[e]] begin[{]
local_variable[type[List], codeAndMessage]
return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[... | Keyword[public] identifier[DroolsParserException] identifier[createDroolsException] operator[SEP] identifier[RecognitionException] identifier[e] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[codeAndMessage] operator[=] identifier[createErrorMessage] operator[SEP] identifi... |
public ServiceFuture<Void> beginDeleteAsync(String locationName, String longTermRetentionServerName, String longTermRetentionDatabaseName, String backupName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(locationName, longTermRetentionServer... | class class_name[name] begin[{]
method[beginDeleteAsync, return_type[type[ServiceFuture]], modifier[public], parameter[locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginDeleteWith... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[beginDeleteAsync] operator[SEP] identifier[String] identifier[locationName] , identifier[String] identifier[longTermRetentionServerName] , identifier[String] identifier[longTermRetentionDatabaseName] , identifier[String] id... |
public Object execute(final Map<Object, Object> iArgs) {
if (schemaClass == null)
throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
final long recs = schemaClass.count();
try {
schemaClass.truncate();
} catch (IOException e) {
... | class class_name[name] begin[{]
method[execute, return_type[type[Object]], modifier[public], parameter[iArgs]] begin[{]
if[binary_operation[member[.schemaClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] identifier[Object] identifier[execute] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[iArgs] operator[SEP] {
Keyword[if] operator[SEP] identifier[schemaClass] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[ne... |
public synchronized boolean addDependingJob(Job dependingJob) {
if (this.state == Job.WAITING) { //only allowed to add jobs when waiting
if (this.dependingJobs == null) {
this.dependingJobs = new ArrayList<Job>();
}
return this.dependingJobs.add(dependingJob);
} else {
return fal... | class class_name[name] begin[{]
method[addDependingJob, return_type[type[boolean]], modifier[synchronized public], parameter[dependingJob]] begin[{]
if[binary_operation[THIS[member[None.state]], ==, member[Job.WAITING]]] begin[{]
if[binary_operation[THIS[member[None.depe... | Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[addDependingJob] operator[SEP] identifier[Job] identifier[dependingJob] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[==] identifier[Job] operator[SEP] identifier[WAITING] operator[SEP] {
... |
public void readOurCorpus(String path, String suffix, String charset) throws IOException {
List<File> files = MyFiles.getAllFiles(path, suffix);//".txt"
Iterator<File> it = files.iterator();
while(it.hasNext()){
BufferedReader bfr =null;
File file = it.next();
try {
FileInputStream in = ne... | class class_name[name] begin[{]
method[readOurCorpus, return_type[void], modifier[public], parameter[path, suffix, charset]] begin[{]
local_variable[type[List], files]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
local_variable[typ... | Keyword[public] Keyword[void] identifier[readOurCorpus] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[suffix] , identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[List] operator[<] identifier[File] operator[>] identifier... |
private void encodeScript(final FacesContext context, final Github github) throws IOException {
final WidgetBuilder wb = getWidgetBuilder(context);
final String clientId = github.getClientId(context);
wb.init("ExtGitHub", github.resolveWidgetVar(), clientId);
wb.attr("iconForks", github.... | class class_name[name] begin[{]
method[encodeScript, return_type[void], modifier[private], parameter[context, github]] begin[{]
local_variable[type[WidgetBuilder], wb]
local_variable[type[String], clientId]
call[wb.init, parameter[literal["ExtGitHub"], call[github.resolveWidgetV... | Keyword[private] Keyword[void] identifier[encodeScript] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[Github] identifier[github] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[WidgetBuilder] identifier[wb] operator[=] ide... |
protected void initializePieces() {
pieces.add(new Piece("x", " x /xxx/ x ", false, oneRotation));
pieces.add(new Piece("v", "x /x /xxx", false, fourRotations));
pieces.add(new Piece("t", "xxx/ x / x ", false, fourRotations));
pieces.add(new Piece("w", " x/ xx/xx ", false, fourRotations));
pieces... | class class_name[name] begin[{]
method[initializePieces, return_type[void], modifier[protected], parameter[]] begin[{]
call[pieces.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="x"), Literal(postfix_operators=[], pr... | Keyword[protected] Keyword[void] identifier[initializePieces] operator[SEP] operator[SEP] {
identifier[pieces] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Piece] operator[SEP] literal[String] , literal[String] , literal[boolean] , identifier[oneRotation] operator[SEP] operator[SEP] ope... |
void skipLine() {
int ch;
do {
try {
ch = reader.read();
} catch( IOException ex ) {
throw new LessException( ex );
}
incLineColumn( ch );
} while( ch != '\n' && ch != -1 );
} | class class_name[name] begin[{]
method[skipLine, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[int], ch]
do[binary_operation[binary_operation[member[.ch], !=, literal['\n']], &&, binary_operation[member[.ch], !=, literal[1]]]] begin[{]
TrySt... | Keyword[void] identifier[skipLine] operator[SEP] operator[SEP] {
Keyword[int] identifier[ch] operator[SEP] Keyword[do] {
Keyword[try] {
identifier[ch] operator[=] identifier[reader] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[... |
public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(POLICIES)) {
certPolicies = null;
} else {
throw new IOException("Attribute name [" + name +
"] not recognized by " +
"CertAttrSet:Certific... | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[name]] begin[{]
if[call[name.equalsIgnoreCase, parameter[member[.POLICIES]]]] begin[{]
assign[member[.certPolicies], literal[null]]
else begin[{]
ThrowStatem... | Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[POLICIES] operator[SEP] operator[SEP] {
... |
public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException {
return getExistingFile(mountPoint, target).openStream();
} | class class_name[name] begin[{]
method[openInputStream, return_type[type[InputStream]], modifier[public], parameter[mountPoint, target]] begin[{]
return[call[.getExistingFile, parameter[member[.mountPoint], member[.target]]]]
end[}]
END[}] | Keyword[public] identifier[InputStream] identifier[openInputStream] operator[SEP] identifier[VirtualFile] identifier[mountPoint] , identifier[VirtualFile] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[getExistingFile] operator[SEP] identifier[mountPoint] ,... |
private boolean absoluteAdvanced(int row)
{
boolean retval = false;
try
{
if (getRsAndStmt().m_rs != null)
{
if (row == 0)
{
getRsAndStmt().m_rs.beforeFirst();
}
e... | class class_name[name] begin[{]
method[absoluteAdvanced, return_type[type[boolean]], modifier[private], parameter[row]] begin[{]
local_variable[type[boolean], retval]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRsAndStmt, postfix_o... | Keyword[private] Keyword[boolean] identifier[absoluteAdvanced] operator[SEP] Keyword[int] identifier[row] operator[SEP] {
Keyword[boolean] identifier[retval] operator[=] literal[boolean] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[getRsAndStmt] operator[SEP] operator[SEP] operato... |
public static Schema merge(Schema left, Schema right) {
Schema merged = mergeOnly(left, right);
IncompatibleSchemaException.check(merged != null,
"Cannot merge %s and %s", left, right);
return merged;
} | class class_name[name] begin[{]
method[merge, return_type[type[Schema]], modifier[public static], parameter[left, right]] begin[{]
local_variable[type[Schema], merged]
call[IncompatibleSchemaException.check, parameter[binary_operation[member[.merged], !=, literal[null]], literal["Cannot... | Keyword[public] Keyword[static] identifier[Schema] identifier[merge] operator[SEP] identifier[Schema] identifier[left] , identifier[Schema] identifier[right] operator[SEP] {
identifier[Schema] identifier[merged] operator[=] identifier[mergeOnly] operator[SEP] identifier[left] , identifier[right] operator[SEP] ... |
public SelKey register(ChannelSelector sel, Op ops, Object att)
{
if (selector != null)
{
throw new IllegalStateException("already registered with "+selector);
}
if (validOp != ops)
{
throw new IllegalArgumentException("expected "+validOp+" got... | class class_name[name] begin[{]
method[register, return_type[type[SelKey]], modifier[public], parameter[sel, ops, att]] begin[{]
if[binary_operation[member[.selector], !=, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(pos... | Keyword[public] identifier[SelKey] identifier[register] operator[SEP] identifier[ChannelSelector] identifier[sel] , identifier[Op] identifier[ops] , identifier[Object] identifier[att] operator[SEP] {
Keyword[if] operator[SEP] identifier[selector] operator[!=] Other[null] operator[SEP] {
Keyword[thro... |
public String writeValueAsString(Object obj, boolean indent) {
try {
if (indent) {
return this.mapper.writer().withDefaultPrettyPrinter()
.writeValueAsString(obj);
}
return this.mapper.writeValueAsString(obj);
}
catch (Exception e) {
LogFactory.getLog(JsonHandler.class).info("serialize objec... | class class_name[name] begin[{]
method[writeValueAsString, return_type[type[String]], modifier[public], parameter[obj, indent]] begin[{]
TryStatement(block=[IfStatement(condition=MemberReference(member=indent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, la... | Keyword[public] identifier[String] identifier[writeValueAsString] operator[SEP] identifier[Object] identifier[obj] , Keyword[boolean] identifier[indent] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[indent] operator[SEP] {
Keyword[return] Keyword[this] operator[SE... |
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
public Token getAuthorizationToken(final ContainerRequest request) {
String authorizationString = request.getHeaderString("Authorization");
if (authorizationString != null && !"".equals(authorizationString)) {
authorizationString = auth... | class class_name[name] begin[{]
method[getAuthorizationToken, return_type[type[Token]], modifier[public], parameter[request]] begin[{]
local_variable[type[String], authorizationString]
if[binary_operation[binary_operation[member[.authorizationString], !=, literal[null]], &&, literal[""]... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Token] identifier[getAuthorizationToken] operator[SEP] Keyword[final] identifier[ContainerRequest] identifier[request] operator[SEP] {
identifier[String] identifier[authorizationString] operator[=] i... |
public static StorageUri appendPathToUri(final StorageUri uriList, final String relativeOrAbsoluteUri)
throws URISyntaxException {
return appendPathToUri(uriList, relativeOrAbsoluteUri, "/");
} | class class_name[name] begin[{]
method[appendPathToUri, return_type[type[StorageUri]], modifier[public static], parameter[uriList, relativeOrAbsoluteUri]] begin[{]
return[call[.appendPathToUri, parameter[member[.uriList], member[.relativeOrAbsoluteUri], literal["/"]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[StorageUri] identifier[appendPathToUri] operator[SEP] Keyword[final] identifier[StorageUri] identifier[uriList] , Keyword[final] identifier[String] identifier[relativeOrAbsoluteUri] operator[SEP] Keyword[throws] identifier[URISyntaxException] {
Keyword[return] identifi... |
@Override
public Object getBinderValue(Service service) {
String binderValue = getStringValue(service.getBinder());
return parseStringValue(binderValue);
} | class class_name[name] begin[{]
method[getBinderValue, return_type[type[Object]], modifier[public], parameter[service]] begin[{]
local_variable[type[String], binderValue]
return[call[.parseStringValue, parameter[member[.binderValue]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getBinderValue] operator[SEP] identifier[Service] identifier[service] operator[SEP] {
identifier[String] identifier[binderValue] operator[=] identifier[getStringValue] operator[SEP] identifier[service] operator[SEP] identifier[getBi... |
public ClusterInfo getClusterInfoOrNull() {
String clusterName = getProperty(InternalConfigurationOptions.INTERNAL_ES_CLUSTER_NAME);
if (clusterName == null) {
return null;
}
String clusterUUID = getProperty(InternalConfigurationOptions.INTERNAL_ES_CLUSTER_UUID);
EsMa... | class class_name[name] begin[{]
method[getClusterInfoOrNull, return_type[type[ClusterInfo]], modifier[public], parameter[]] begin[{]
local_variable[type[String], clusterName]
if[binary_operation[member[.clusterName], ==, literal[null]]] begin[{]
return[literal[null]]
... | Keyword[public] identifier[ClusterInfo] identifier[getClusterInfoOrNull] operator[SEP] operator[SEP] {
identifier[String] identifier[clusterName] operator[=] identifier[getProperty] operator[SEP] identifier[InternalConfigurationOptions] operator[SEP] identifier[INTERNAL_ES_CLUSTER_NAME] operator[SEP] operator[SE... |
public static String printCodePointAsString(int codePoint)
{
StringBuilder builder = new StringBuilder(12);
builder.append('"');
try
{
printStringCodePoint(builder, codePoint);
}
catch (IOException e)
{
// Shouldn't happen
t... | class class_name[name] begin[{]
method[printCodePointAsString, return_type[type[String]], modifier[public static], parameter[codePoint]] begin[{]
local_variable[type[StringBuilder], builder]
call[builder.append, parameter[literal['"']]]
TryStatement(block=[StatementExpression(ex... | Keyword[public] Keyword[static] identifier[String] identifier[printCodePointAsString] operator[SEP] Keyword[int] identifier[codePoint] operator[SEP] {
identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[12] operator[SEP] operator[SEP] identifier[bu... |
public Observable<Page<LoadBalancingRuleInner>> listAsync(final String resourceGroupName, final String loadBalancerName) {
return listWithServiceResponseAsync(resourceGroupName, loadBalancerName)
.map(new Func1<ServiceResponse<Page<LoadBalancingRuleInner>>, Page<LoadBalancingRuleInner>>() {
... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, loadBalancerName]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.loadBalancerName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[LoadBalancingRuleInner] operator[>] operator[>] identifier[listAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[loadBalancerName] operator[SEP] ... |
public static String formatRFC822Date(Date date) {
try {
return rfc822DateFormat.print(date.getTime());
} catch(RuntimeException ex) {
throw handleException(ex);
}
} | class class_name[name] begin[{]
method[formatRFC822Date, return_type[type[String]], modifier[public static], parameter[date]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[static] identifier[String] identifier[formatRFC822Date] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[rfc822DateFormat] operator[SEP] identifier[print] operator[SEP] identifier[date] operator[SEP] identifier[getTime] o... |
public final void notifyContentItemChanged(int position) {
if (position < 0 || position >= contentItemCount) {
throw new IndexOutOfBoundsException("The given position " + position
+ " is not within the position bounds for content items [0 - " + (contentItemCount - 1) + "].");
... | class class_name[name] begin[{]
method[notifyContentItemChanged, return_type[void], modifier[final public], parameter[position]] begin[{]
if[binary_operation[binary_operation[member[.position], <, literal[0]], ||, binary_operation[member[.position], >=, member[.contentItemCount]]]] begin[{]
... | Keyword[public] Keyword[final] Keyword[void] identifier[notifyContentItemChanged] operator[SEP] Keyword[int] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[position] operator[<] Other[0] operator[||] identifier[position] operator[>=] identifier[contentItemCount] operator[SEP] {
... |
public static void whenReady(final String scriptname, final EventListener function) {
List<EventListener> eventList = JsResources.eventLisenerQueue.get(scriptname);
if (eventList == null) {
eventList = new ArrayList<>();
JsResources.eventLisenerQueue.put(scriptname, eventList);
}
eventList.a... | class class_name[name] begin[{]
method[whenReady, return_type[void], modifier[public static], parameter[scriptname, function]] begin[{]
local_variable[type[List], eventList]
if[binary_operation[member[.eventList], ==, literal[null]]] begin[{]
assign[member[.event... | Keyword[public] Keyword[static] Keyword[void] identifier[whenReady] operator[SEP] Keyword[final] identifier[String] identifier[scriptname] , Keyword[final] identifier[EventListener] identifier[function] operator[SEP] {
identifier[List] operator[<] identifier[EventListener] operator[>] identifier[eventList] oper... |
public static double distanceSq( Polygon2D_F64 poly , Point2D_F64 p , LineSegment2D_F64 storage ) {
if( storage == null )
storage = LineSegment2D_F64.wrap(null,null);
double minimum = Double.MAX_VALUE;
for (int i = 0; i < poly.size(); i++) {
int j = (i+1)%poly.size();
storage.a = poly.vertexes.data[i];... | class class_name[name] begin[{]
method[distanceSq, return_type[type[double]], modifier[public static], parameter[poly, p, storage]] begin[{]
if[binary_operation[member[.storage], ==, literal[null]]] begin[{]
assign[member[.storage], call[LineSegment2D_F64.wrap, parameter[literal[nul... | Keyword[public] Keyword[static] Keyword[double] identifier[distanceSq] operator[SEP] identifier[Polygon2D_F64] identifier[poly] , identifier[Point2D_F64] identifier[p] , identifier[LineSegment2D_F64] identifier[storage] operator[SEP] {
Keyword[if] operator[SEP] identifier[storage] operator[==] Other[null] oper... |
public void debug(Throwable throwable, String msg, Object arg0) {
logIfEnabled(Level.DEBUG, throwable, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null);
} | class class_name[name] begin[{]
method[debug, return_type[void], modifier[public], parameter[throwable, msg, arg0]] begin[{]
call[.logIfEnabled, parameter[member[Level.DEBUG], member[.throwable], member[.msg], member[.arg0], member[.UNKNOWN_ARG], member[.UNKNOWN_ARG], literal[null]]]
end[}]... | Keyword[public] Keyword[void] identifier[debug] operator[SEP] identifier[Throwable] identifier[throwable] , identifier[String] identifier[msg] , identifier[Object] identifier[arg0] operator[SEP] {
identifier[logIfEnabled] operator[SEP] identifier[Level] operator[SEP] identifier[DEBUG] , identifier[throwable] ... |
public static <T> void callInitializers(T instance, CreationalContext<T> creationalContext, BeanManagerImpl manager,
Iterable<? extends MethodInjectionPoint<?, ?>> initializerMethods) {
for (MethodInjectionPoint<?, ?> initializer : initializerMethods) {
initializer.invoke(instance, null,... | class class_name[name] begin[{]
method[callInitializers, return_type[void], modifier[public static], parameter[instance, creationalContext, manager, initializerMethods]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberRe... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[callInitializers] operator[SEP] identifier[T] identifier[instance] , identifier[CreationalContext] operator[<] identifier[T] operator[>] identifier[creationalContext] , identifier[BeanManagerImpl] identifier[manager] , ide... |
public Leadership getPositions(String stateId) throws VoteSmartException, VoteSmartErrorException {
return api.query("Leadership.getPositions", new ArgMap("stateId", stateId), Leadership.class );
} | class class_name[name] begin[{]
method[getPositions, return_type[type[Leadership]], modifier[public], parameter[stateId]] begin[{]
return[call[api.query, parameter[literal["Leadership.getPositions"], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]... | Keyword[public] identifier[Leadership] identifier[getPositions] operator[SEP] identifier[String] identifier[stateId] operator[SEP] Keyword[throws] identifier[VoteSmartException] , identifier[VoteSmartErrorException] {
Keyword[return] identifier[api] operator[SEP] identifier[query] operator[SEP] literal[String] ... |
void setFilter(Filter filter)
{
this.filter = Optional.ofNullable(filter).orElse(FilterNone.INSTANCE);
transform = getTransform();
} | class class_name[name] begin[{]
method[setFilter, return_type[void], modifier[default], parameter[filter]] begin[{]
assign[THIS[member[None.filter]], call[Optional.ofNullable, parameter[member[.filter]]]]
assign[member[.transform], call[.getTransform, parameter[]]]
end[}]
EN... | Keyword[void] identifier[setFilter] operator[SEP] identifier[Filter] identifier[filter] operator[SEP] {
Keyword[this] operator[SEP] identifier[filter] operator[=] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[orElse] operator[SEP... |
public final short setForkJoinTaskTag(short newValue) {
for (int s;;) {
if (U.compareAndSwapInt(this, STATUS, s = status, (s & ~SMASK) | (newValue & SMASK)))
return (short) s;
}
} | class class_name[name] begin[{]
method[setForkJoinTaskTag, return_type[type[short]], modifier[final public], parameter[newValue]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[final] Keyword[short] identifier[setForkJoinTaskTag] operator[SEP] Keyword[short] identifier[newValue] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[s] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[U] operator[SEP] identif... |
public static OutputStream quoteOutputStream(final OutputStream out
) throws IOException {
return new OutputStream() {
private byte[] data = new byte[1];
@Override
public void write(byte[] data, int off, int len) throws IOException {
quoteHtml... | class class_name[name] begin[{]
method[quoteOutputStream, return_type[type[OutputStream]], modifier[public static], parameter[out]] begin[{]
return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Liter... | Keyword[public] Keyword[static] identifier[OutputStream] identifier[quoteOutputStream] operator[SEP] Keyword[final] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] identifier[OutputStream] operator[SEP] operator[SEP] {
Keywo... |
public static void onLastOperator(Function<? super Publisher<Object>, ? extends Publisher<Object>> onLastOperator) {
onLastOperator(onLastOperator.toString(), onLastOperator);
} | class class_name[name] begin[{]
method[onLastOperator, return_type[void], modifier[public static], parameter[onLastOperator]] begin[{]
call[.onLastOperator, parameter[call[onLastOperator.toString, parameter[]], member[.onLastOperator]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[onLastOperator] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Publisher] operator[<] identifier[Object] operator[>] , operator[?] Keyword[extends] identifier[Publisher] operator[<] identifier[Object] operator[>] operator[>]... |
private int getMediumInt(byte b1, byte b2, byte b3) {
int ret = b1 << 16 & 0xff0000 | b2 << 8 & 0xff00 | b3 & 0xff;
// Check to see if the medium int is negative (high bit in b1 set)
if ((b1 & 0x80) == 0x80) {
// Make the the whole int negative
ret |= 0xff000000;
}
return ret;
} | class class_name[name] begin[{]
method[getMediumInt, return_type[type[int]], modifier[private], parameter[b1, b2, b3]] begin[{]
local_variable[type[int], ret]
if[binary_operation[binary_operation[member[.b1], &, literal[0x80]], ==, literal[0x80]]] begin[{]
assign... | Keyword[private] Keyword[int] identifier[getMediumInt] operator[SEP] Keyword[byte] identifier[b1] , Keyword[byte] identifier[b2] , Keyword[byte] identifier[b3] operator[SEP] {
Keyword[int] identifier[ret] operator[=] identifier[b1] operator[<<] Other[16] operator[&] literal[Integer] operator[|] identifier[b2] ... |
int getMonthOfYear(long millis, int year) {
int doyZeroBased = (int) ((millis - getYearMillis(year)) / DateTimeConstants.MILLIS_PER_DAY);
if (doyZeroBased == 354) {
return 12;
}
return ((doyZeroBased * 2) / MONTH_PAIR_LENGTH) + 1;
// return (int) (doyZeroBased / 29.9f)... | class class_name[name] begin[{]
method[getMonthOfYear, return_type[type[int]], modifier[default], parameter[millis, year]] begin[{]
local_variable[type[int], doyZeroBased]
if[binary_operation[member[.doyZeroBased], ==, literal[354]]] begin[{]
return[literal[12]]
else... | Keyword[int] identifier[getMonthOfYear] operator[SEP] Keyword[long] identifier[millis] , Keyword[int] identifier[year] operator[SEP] {
Keyword[int] identifier[doyZeroBased] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[millis] operator[-] identifier[getYearMillis] o... |
public Stream<ModuleDescriptor> descriptors() {
return automaticToNormalModule.entrySet().stream()
.map(Map.Entry::getValue)
.map(Module::descriptor);
} | class class_name[name] begin[{]
method[descriptors, return_type[type[Stream]], modifier[public], parameter[]] begin[{]
return[call[automaticToNormalModule.entrySet, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Stream] operator[<] identifier[ModuleDescriptor] operator[>] identifier[descriptors] operator[SEP] operator[SEP] {
Keyword[return] identifier[automaticToNormalModule] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[... |
private static String multiPointCoordinatesFromWkt(String wkt) {
wkt = removeBrackets(wkt,1);
boolean isSecondVersionMultiPoint = wkt.contains("(");
String coordinates = "";
if(isSecondVersionMultiPoint){
//(10 40), (40 30), (20 20)-> 10 40, 40 30, 20 20
wkt = wkt... | class class_name[name] begin[{]
method[multiPointCoordinatesFromWkt, return_type[type[String]], modifier[private static], parameter[wkt]] begin[{]
assign[member[.wkt], call[.removeBrackets, parameter[member[.wkt], literal[1]]]]
local_variable[type[boolean], isSecondVersionMultiPoint]
... | Keyword[private] Keyword[static] identifier[String] identifier[multiPointCoordinatesFromWkt] operator[SEP] identifier[String] identifier[wkt] operator[SEP] {
identifier[wkt] operator[=] identifier[removeBrackets] operator[SEP] identifier[wkt] , Other[1] operator[SEP] operator[SEP] Keyword[boolean] identifier[is... |
public <T> List<Key<T>> getKeysByManualRefs(final Class<T> clazz, final List<Object> refs) {
final String collection = getCollectionName(clazz);
final List<Key<T>> keys = new ArrayList<Key<T>>(refs.size());
for (final Object ref : refs) {
keys.add(this.<T>manualRefToKey(collection, r... | class class_name[name] begin[{]
method[getKeysByManualRefs, return_type[type[List]], modifier[public], parameter[clazz, refs]] begin[{]
local_variable[type[String], collection]
local_variable[type[List], keys]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(... | Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Key] operator[<] identifier[T] operator[>] operator[>] identifier[getKeysByManualRefs] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , Keyword[final] identifier[List] o... |
@Nullable
Directory getRoot(Name name) {
DirectoryEntry entry = tree.getRoot(name);
return entry == null ? null : (Directory) entry.file();
} | class class_name[name] begin[{]
method[getRoot, return_type[type[Directory]], modifier[default], parameter[name]] begin[{]
local_variable[type[DirectoryEntry], entry]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators... | annotation[@] identifier[Nullable] identifier[Directory] identifier[getRoot] operator[SEP] identifier[Name] identifier[name] operator[SEP] {
identifier[DirectoryEntry] identifier[entry] operator[=] identifier[tree] operator[SEP] identifier[getRoot] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keywo... |
private static Set<String> extractFieldsFromMethodParameters(SQLiteModelMethod method, Class<? extends Annotation> annotationClazz) {
String annotatedWhere = AnnotationUtility.extractAsString(method.getElement(), annotationClazz, AnnotationAttributeType.WHERE);
Set<String> annotatedFieldValues = new LinkedHashSet<>... | class class_name[name] begin[{]
method[extractFieldsFromMethodParameters, return_type[type[Set]], modifier[private static], parameter[method, annotationClazz]] begin[{]
local_variable[type[String], annotatedWhere]
local_variable[type[Set], annotatedFieldValues]
local_variable[type[Set],... | Keyword[private] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[extractFieldsFromMethodParameters] operator[SEP] identifier[SQLiteModelMethod] identifier[method] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotationC... |
public void checkRoles(String... roleIdentifiers) throws AuthorizationException {
if (!hasRoles(roleIdentifiers)) {
throw new AuthorizationException("'{}' does not have the roles {}", toString(), Arrays.toString(roleIdentifiers));
}
} | class class_name[name] begin[{]
method[checkRoles, return_type[void], modifier[public], parameter[roleIdentifiers]] begin[{]
if[call[.hasRoles, parameter[member[.roleIdentifiers]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_opera... | Keyword[public] Keyword[void] identifier[checkRoles] operator[SEP] identifier[String] operator[...] identifier[roleIdentifiers] operator[SEP] Keyword[throws] identifier[AuthorizationException] {
Keyword[if] operator[SEP] operator[!] identifier[hasRoles] operator[SEP] identifier[roleIdentifiers] operator[SEP] ope... |
public Reader getReader() throws IOException {
if (this.charset != null) {
return new InputStreamReader(this.resource.getInputStream(), this.charset);
} else if (this.encoding != null) {
return new InputStreamReader(this.resource.getInputStream(), this.encoding);
} else {... | class class_name[name] begin[{]
method[getReader, return_type[type[Reader]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.charset]], !=, literal[null]]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] identifier[Reader] identifier[getReader] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[charset] operator[!=] Other[null] operator[SEP] {
Keyword[return] Keyword[new] identifier[InputStreamReader] o... |
public static boolean isDurableProc(String procName) {
SystemProcedureCatalog.Config sysProc = SystemProcedureCatalog.listing.get(procName);
return sysProc == null || sysProc.isDurable();
} | class class_name[name] begin[{]
method[isDurableProc, return_type[type[boolean]], modifier[public static], parameter[procName]] begin[{]
local_variable[type[SystemProcedureCatalog], sysProc]
return[binary_operation[binary_operation[member[.sysProc], ==, literal[null]], ||, call[sysProc.isDurabl... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isDurableProc] operator[SEP] identifier[String] identifier[procName] operator[SEP] {
identifier[SystemProcedureCatalog] operator[SEP] identifier[Config] identifier[sysProc] operator[=] identifier[SystemProcedureCatalog] operator[SEP] identifier[listing]... |
public MailBuilder bcc(String name, String email) {
return param("bcc", email(name, email));
} | class class_name[name] begin[{]
method[bcc, return_type[type[MailBuilder]], modifier[public], parameter[name, email]] begin[{]
return[call[.param, parameter[literal["bcc"], call[.email, parameter[member[.name], member[.email]]]]]]
end[}]
END[}] | Keyword[public] identifier[MailBuilder] identifier[bcc] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[email] operator[SEP] {
Keyword[return] identifier[param] operator[SEP] literal[String] , identifier[email] operator[SEP] identifier[name] , identifier[email] operator[SEP] ... |
public ExpressionBuilder lessThan(final SubordinateTrigger trigger, final Object compare) {
BooleanExpression exp = new CompareExpression(CompareType.LESS_THAN, trigger, compare);
appendExpression(exp);
return this;
} | class class_name[name] begin[{]
method[lessThan, return_type[type[ExpressionBuilder]], modifier[public], parameter[trigger, compare]] begin[{]
local_variable[type[BooleanExpression], exp]
call[.appendExpression, parameter[member[.exp]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[ExpressionBuilder] identifier[lessThan] operator[SEP] Keyword[final] identifier[SubordinateTrigger] identifier[trigger] , Keyword[final] identifier[Object] identifier[compare] operator[SEP] {
identifier[BooleanExpression] identifier[exp] operator[=] Keyword[new] identifier[CompareExpr... |
public static <T extends Model> LazyList<T> findAll() {
return ModelDelegate.findAll(Model.<T>modelClass());
} | class class_name[name] begin[{]
method[findAll, return_type[type[LazyList]], modifier[public static], parameter[]] begin[{]
return[call[ModelDelegate.findAll, parameter[call[.Model, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Model] operator[>] identifier[LazyList] operator[<] identifier[T] operator[>] identifier[findAll] operator[SEP] operator[SEP] {
Keyword[return] identifier[ModelDelegate] operator[SEP] identifier[findAll] operator[SEP] identifie... |
static final long getMillisOf(Date date) {
if (date.cdate == null || date.cdate.isNormalized()) {
return date.fastTime;
}
BaseCalendar.Date d = (BaseCalendar.Date) date.cdate.clone();
return gcal.getTime(d);
} | class class_name[name] begin[{]
method[getMillisOf, return_type[type[long]], modifier[final static], parameter[date]] begin[{]
if[binary_operation[binary_operation[member[date.cdate], ==, literal[null]], ||, call[date.cdate.isNormalized, parameter[]]]] begin[{]
return[member[date.fa... | Keyword[static] Keyword[final] Keyword[long] identifier[getMillisOf] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[if] operator[SEP] identifier[date] operator[SEP] identifier[cdate] operator[==] Other[null] operator[||] identifier[date] operator[SEP] identifier[cdate] operator[SEP] iden... |
public void addOrder(Order... orders) {
if(null != this.orders){
ArrayUtil.append(this.orders, orders);
}
this.orders = orders;
} | class class_name[name] begin[{]
method[addOrder, return_type[void], modifier[public], parameter[orders]] begin[{]
if[binary_operation[literal[null], !=, THIS[member[None.orders]]]] begin[{]
call[ArrayUtil.append, parameter[THIS[member[None.orders]], member[.orders]]]
... | Keyword[public] Keyword[void] identifier[addOrder] operator[SEP] identifier[Order] operator[...] identifier[orders] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[!=] Keyword[this] operator[SEP] identifier[orders] operator[SEP] {
identifier[ArrayUtil] operator[SEP] identifier[append] o... |
public static EdgeScores insideOutsideO2AllGraSingleRoot(DependencyScorer scorer, Algebra s) {
return insideOutside02AllGra(scorer, s, true);
} | class class_name[name] begin[{]
method[insideOutsideO2AllGraSingleRoot, return_type[type[EdgeScores]], modifier[public static], parameter[scorer, s]] begin[{]
return[call[.insideOutside02AllGra, parameter[member[.scorer], member[.s], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[EdgeScores] identifier[insideOutsideO2AllGraSingleRoot] operator[SEP] identifier[DependencyScorer] identifier[scorer] , identifier[Algebra] identifier[s] operator[SEP] {
Keyword[return] identifier[insideOutside02AllGra] operator[SEP] identifier[scorer] , identifier[s]... |
public void stopTimer() {
if(this.WRITE_CACHE_ENABLED) {
if(timerWriteCache != null) {
timerWriteCache.cancel();
}
if(writeTimer != null){
writeTimer.cancel();
}
if(timerDeleteCache != null) {
timerDeleteCache.cancel();
}
if(deleteTimer != null){
deleteTimer.cancel();
}
}
} | class class_name[name] begin[{]
method[stopTimer, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.WRITE_CACHE_ENABLED]]] begin[{]
if[binary_operation[member[.timerWriteCache], !=, literal[null]]] begin[{]
cal... | Keyword[public] Keyword[void] identifier[stopTimer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[WRITE_CACHE_ENABLED] operator[SEP] {
Keyword[if] operator[SEP] identifier[timerWriteCache] operator[!=] Other[null] operator[SEP] {
identifi... |
private IAuthorizationPrincipal getAuthorizationPrincipal(Authentication authentication) {
final Object authPrincipal = authentication.getPrincipal();
logger.trace("getAuthorizationPrincipal -- authPrincipal=[{}]", authPrincipal);
String username;
if (authPrincipal instanceof UserDetai... | class class_name[name] begin[{]
method[getAuthorizationPrincipal, return_type[type[IAuthorizationPrincipal]], modifier[private], parameter[authentication]] begin[{]
local_variable[type[Object], authPrincipal]
call[logger.trace, parameter[literal["getAuthorizationPrincipal -- authPrincip... | Keyword[private] identifier[IAuthorizationPrincipal] identifier[getAuthorizationPrincipal] operator[SEP] identifier[Authentication] identifier[authentication] operator[SEP] {
Keyword[final] identifier[Object] identifier[authPrincipal] operator[=] identifier[authentication] operator[SEP] identifier[getPrincipal] ... |
public static RejectedExecutionException failWithRejected(Throwable cause) {
if (cause instanceof ReactorRejectedExecutionException) {
return (RejectedExecutionException) cause;
}
return new ReactorRejectedExecutionException("Scheduler unavailable", cause);
} | class class_name[name] begin[{]
method[failWithRejected, return_type[type[RejectedExecutionException]], modifier[public static], parameter[cause]] begin[{]
if[binary_operation[member[.cause], instanceof, type[ReactorRejectedExecutionException]]] begin[{]
return[Cast(expression=Membe... | Keyword[public] Keyword[static] identifier[RejectedExecutionException] identifier[failWithRejected] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] {
Keyword[if] operator[SEP] identifier[cause] Keyword[instanceof] identifier[ReactorRejectedExecutionException] operator[SEP] {
Keywor... |
public void updateBinaryStream(int columnIndex, java.io.InputStream x,
int length) throws SQLException {
startUpdate(columnIndex);
preparedStatement.setBinaryStream(columnIndex, x, length);
} | class class_name[name] begin[{]
method[updateBinaryStream, return_type[void], modifier[public], parameter[columnIndex, x, length]] begin[{]
call[.startUpdate, parameter[member[.columnIndex]]]
call[preparedStatement.setBinaryStream, parameter[member[.columnIndex], member[.x], mem... | Keyword[public] Keyword[void] identifier[updateBinaryStream] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[InputStream] identifier[x] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] {
identifi... |
public static String createEventDateFromParts(String verbatimEventDate, String startDayOfYear, String endDayOfYear, String year, String month, String day) {
String result = null;
if (verbatimEventDate!=null && verbatimEventDate.trim().length()>0) {
Map<String,String> verbatim = extractDateToDayFromVerbatim(ver... | class class_name[name] begin[{]
method[createEventDateFromParts, return_type[type[String]], modifier[public static], parameter[verbatimEventDate, startDayOfYear, endDayOfYear, year, month, day]] begin[{]
local_variable[type[String], result]
if[binary_operation[binary_operation[member[.v... | Keyword[public] Keyword[static] identifier[String] identifier[createEventDateFromParts] operator[SEP] identifier[String] identifier[verbatimEventDate] , identifier[String] identifier[startDayOfYear] , identifier[String] identifier[endDayOfYear] , identifier[String] identifier[year] , identifier[String] identifier[m... |
public final Timestamp addDay(int amount)
{
long delta = (long) amount * 24 * 60 * 60 * 1000;
return addMillisForPrecision(delta, Precision.DAY, false);
} | class class_name[name] begin[{]
method[addDay, return_type[type[Timestamp]], modifier[final public], parameter[amount]] begin[{]
local_variable[type[long], delta]
return[call[.addMillisForPrecision, parameter[member[.delta], member[Precision.DAY], literal[false]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Timestamp] identifier[addDay] operator[SEP] Keyword[int] identifier[amount] operator[SEP] {
Keyword[long] identifier[delta] operator[=] operator[SEP] Keyword[long] operator[SEP] identifier[amount] operator[*] Other[24] operator[*] Other[60] operator[*] Other[60] operator... |
public void sendBroadcast(CmsObject cms, String message, String sessionId) {
sendBroadcast(cms, message, sessionId, false);
} | class class_name[name] begin[{]
method[sendBroadcast, return_type[void], modifier[public], parameter[cms, message, sessionId]] begin[{]
call[.sendBroadcast, parameter[member[.cms], member[.message], member[.sessionId], literal[false]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[sendBroadcast] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[message] , identifier[String] identifier[sessionId] operator[SEP] {
identifier[sendBroadcast] operator[SEP] identifier[cms] , identifier[message] , identifier[sessionId]... |
public final boolean initialize() {
notifyObservers();
try {
this.cfg = (Properties) new MainParser(this).parseFile(getCfgFilename());
} catch (Exception ex) {
ex.printStackTrace(); //Deep trouble
error = true;
return false;
}
logge... | class class_name[name] begin[{]
method[initialize, return_type[type[boolean]], modifier[final public], parameter[]] begin[{]
call[.notifyObservers, parameter[]]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qual... | Keyword[public] Keyword[final] Keyword[boolean] identifier[initialize] operator[SEP] operator[SEP] {
identifier[notifyObservers] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[this] operator[SEP] identifier[cfg] operator[=] operator[SEP] identifier[Properties] operator[SEP] Keyword[n... |
public TagsUtils validateTags() {
final List<String> instanceTags = getInstanceTags().stream()
.map(Tag::getKey)
.collect(Collectors.toList());
final List<String> missingTags = getAwsTagNames().map(List::stream).orElse(Stream.empty())
.filter(configuredTag -> !instanceTags.contains(conf... | class class_name[name] begin[{]
method[validateTags, return_type[type[TagsUtils]], modifier[public], parameter[]] begin[{]
local_variable[type[List], instanceTags]
local_variable[type[List], missingTags]
if[call[missingTags.isEmpty, parameter[]]] begin[{]
ThrowStatem... | Keyword[public] identifier[TagsUtils] identifier[validateTags] operator[SEP] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[instanceTags] operator[=] identifier[getInstanceTags] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] opera... |
public Future<Collection<SummonerSpell>> getSummonerSpells(SpellData data, String version, String locale, boolean dataById) {
return new DummyFuture<>(handler.getSummonerSpells(data, version, locale, dataById));
} | class class_name[name] begin[{]
method[getSummonerSpells, return_type[type[Future]], modifier[public], parameter[data, version, locale, dataById]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] identifier[Future] operator[<] identifier[Collection] operator[<] identifier[SummonerSpell] operator[>] operator[>] identifier[getSummonerSpells] operator[SEP] identifier[SpellData] identifier[data] , identifier[String] identifier[version] , identifier[String] identifier[locale] , Keyword[boolean] id... |
protected final Iterable<ManagedIndex> getIndexes( String workspaceName ) {
final Map<String, AtomicIndex> byIndexName = providedIndexesByIndexNameByWorkspaceName.get(workspaceName);
if (byIndexName == null) return Collections.emptySet();
return DelegateIterable.around(byIndexName.values(), new ... | class class_name[name] begin[{]
method[getIndexes, return_type[type[Iterable]], modifier[final protected], parameter[workspaceName]] begin[{]
local_variable[type[Map], byIndexName]
if[binary_operation[member[.byIndexName], ==, literal[null]]] begin[{]
return[call[Collections.emptySet, p... | Keyword[protected] Keyword[final] identifier[Iterable] operator[<] identifier[ManagedIndex] operator[>] identifier[getIndexes] operator[SEP] identifier[String] identifier[workspaceName] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[AtomicIndex] operator[>] identifier... |
public void streamRemoved(int streamId) {
Http2PriorityNode node = nodesByID.get(streamId);
if(node == null) {
return;
}
if(!node.hasDependents()) {
//add to eviction queue
int toEvict = evictionQueue[evictionQueuePosition];
evictionQueue[e... | class class_name[name] begin[{]
method[streamRemoved, return_type[void], modifier[public], parameter[streamId]] begin[{]
local_variable[type[Http2PriorityNode], node]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[public] Keyword[void] identifier[streamRemoved] operator[SEP] Keyword[int] identifier[streamId] operator[SEP] {
identifier[Http2PriorityNode] identifier[node] operator[=] identifier[nodesByID] operator[SEP] identifier[get] operator[SEP] identifier[streamId] operator[SEP] operator[SEP] Keyword[if] operato... |
public void closePolygonRing(List<LatLng> points) {
if (!PolyUtil.isClosedPolygon(points)) {
LatLng first = points.get(0);
points.add(new LatLng(first.latitude, first.longitude));
}
} | class class_name[name] begin[{]
method[closePolygonRing, return_type[void], modifier[public], parameter[points]] begin[{]
if[call[PolyUtil.isClosedPolygon, parameter[member[.points]]]] begin[{]
local_variable[type[LatLng], first]
call[points.add, parameter[Cl... | Keyword[public] Keyword[void] identifier[closePolygonRing] operator[SEP] identifier[List] operator[<] identifier[LatLng] operator[>] identifier[points] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[PolyUtil] operator[SEP] identifier[isClosedPolygon] operator[SEP] identifier[points] operator[SE... |
@Override
protected void scanForHandlesTypesClasses(com.ibm.ws.container.DeployedModule deployedModule,
HashMap<ServletContainerInitializer, Class[]> handleTypesHashMap,
HashMap<ServletContainerInitializer, HashSet<Class<?>>> onSt... | class class_name[name] begin[{]
method[scanForHandlesTypesClasses, return_type[void], modifier[protected], parameter[deployedModule, handleTypesHashMap, onStartupHashMap]] begin[{]
local_variable[type[String], methodName]
local_variable[type[boolean], enableTrace]
local_variable[type[We... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[scanForHandlesTypesClasses] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[container] operator[SEP] identifier[DeployedModule] identifier[deployedModule] , identifier[HashMa... |
public String encrypt(String string, String password) {
// Basic null check.
// An empty string can be encrypted:
if (string == null) {
return null;
}
Cipher cipher = getCipher();
// Generate the encryption key:
String salt = Generate.sal... | class class_name[name] begin[{]
method[encrypt, return_type[type[String]], modifier[public], parameter[string, password]] begin[{]
if[binary_operation[member[.string], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable... | Keyword[public] identifier[String] identifier[encrypt] operator[SEP] identifier[String] identifier[string] , identifier[String] identifier[password] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}... |
public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder
getKAnonymityResultOrBuilder() {
if (resultCase_ == 5) {
return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_;
}
return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetai... | class class_name[name] begin[{]
method[getKAnonymityResultOrBuilder, return_type[type[com]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.resultCase_], ==, literal[5]]] begin[{]
return[Cast(expression=MemberReference(member=result_, postfix_operators=[], prefi... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[AnalyzeDataSourceRiskDetails] operator[SEP] identifier[KAnonymityResultOrBuilder] identifier[getKAnonymityResultOrBuilder] operator[SEP] ... |
public void getPetInfo(int[] ids, Callback<List<Pet>> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ids));
gw2API.getPetInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback);
} | class class_name[name] begin[{]
method[getPetInfo, return_type[void], modifier[public], parameter[ids, callback]] begin[{]
call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, construc... | Keyword[public] Keyword[void] identifier[getPetInfo] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[ids] , identifier[Callback] operator[<] identifier[List] operator[<] identifier[Pet] operator[>] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] , ident... |
protected void positionControl(Node control) {
if(this.position.get() == RipplerPos.BACK){
getChildren().add(control);
}else{
getChildren().add(0, control);
}
} | class class_name[name] begin[{]
method[positionControl, return_type[void], modifier[protected], parameter[control]] begin[{]
if[binary_operation[THIS[member[None.position]call[None.get, parameter[]]], ==, member[RipplerPos.BACK]]] begin[{]
call[.getChildren, parameter[]]... | Keyword[protected] Keyword[void] identifier[positionControl] operator[SEP] identifier[Node] identifier[control] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[position] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] identifier[RipplerPos] operator[SEP] id... |
protected static Object toArray(JSONArray jsonArray, Class<?> arrayClass) {
return new ArrayConverter(arrayClass).convert(jsonArray, null);
} | class class_name[name] begin[{]
method[toArray, return_type[type[Object]], modifier[static protected], parameter[jsonArray, arrayClass]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=arrayClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, construct... | Keyword[protected] Keyword[static] identifier[Object] identifier[toArray] operator[SEP] identifier[JSONArray] identifier[jsonArray] , identifier[Class] operator[<] operator[?] operator[>] identifier[arrayClass] operator[SEP] {
Keyword[return] Keyword[new] identifier[ArrayConverter] operator[SEP] identifier[arra... |
private ByteArrayInputStream generateThumbImageByDefault(InputStream inputStream) throws IOException {
LOGGER.debug("根据默认配置生成缩略图");
// 在内存当中生成缩略图
ByteArrayOutputStream out = new ByteArrayOutputStream();
//@formatter:off
Thumbnails
.of(inputStream)
... | class class_name[name] begin[{]
method[generateThumbImageByDefault, return_type[type[ByteArrayInputStream]], modifier[private], parameter[inputStream]] begin[{]
call[LOGGER.debug, parameter[literal["根据默认配置生成缩略图"]]]
local_variable[type[ByteArrayOutputStream], out]
call[Th... | Keyword[private] identifier[ByteArrayInputStream] identifier[generateThumbImageByDefault] operator[SEP] identifier[InputStream] identifier[inputStream] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[S... |
@Nullable
public final Node getAncestor(int level) {
checkArgument(level >= 0);
Node node = this;
while (node != null && level-- > 0) {
node = node.getParent();
}
return node;
} | class class_name[name] begin[{]
method[getAncestor, return_type[type[Node]], modifier[final public], parameter[level]] begin[{]
call[.checkArgument, parameter[binary_operation[member[.level], >=, literal[0]]]]
local_variable[type[Node], node]
while[binary_operation[binar... | annotation[@] identifier[Nullable] Keyword[public] Keyword[final] identifier[Node] identifier[getAncestor] operator[SEP] Keyword[int] identifier[level] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[level] operator[>=] Other[0] operator[SEP] operator[SEP] identifier[Node] identifier[node] ope... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpsimPackage.SCENARIO_PARAMETERS__START:
setStart((Parameter)null);
return;
case BpsimPackage.SCENARIO_PARAMETERS__DURATION:
setDuration((Parameter)null);
return;
case BpsimPackage.SCENARIO_PARAMETERS__PROPERTY_PARAMETER... | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SCENARIO_PARAMETERS__START, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], state... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[SCENARIO_PARAMETERS__... |
public static <S extends Message> LzoProtobufSource<S> at(Path path, Class<S> protoClass) {
return new LzoProtobufSource<S>(path, EBTypes.protos(protoClass));
} | class class_name[name] begin[{]
method[at, return_type[type[LzoProtobufSource]], modifier[public static], parameter[path, protoClass]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[M... | Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Message] operator[>] identifier[LzoProtobufSource] operator[<] identifier[S] operator[>] identifier[at] operator[SEP] identifier[Path] identifier[path] , identifier[Class] operator[<] identifier[S] operator[>] identifier[protoClass] ... |
private List<Pair<Integer, Integer>> doGenerateEdgesWithOmitList() {
final int numberOfNodes = getConfiguration().getNumberOfNodes();
final int numberOfEdges = getConfiguration().getNumberOfEdges();
final long maxEdges = numberOfNodes * (numberOfNodes - 1) / 2;
final List<Pair<Integer, ... | class class_name[name] begin[{]
method[doGenerateEdgesWithOmitList, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[int], numberOfNodes]
local_variable[type[int], numberOfEdges]
local_variable[type[long], maxEdges]
local_variable[type[List],... | Keyword[private] identifier[List] operator[<] identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[>] identifier[doGenerateEdgesWithOmitList] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[numberOfNodes] operator[=] identifier[getConfiguration] operat... |
public String readString() throws IOException
{
int length = readInt();
byte[] buf = new byte[length];
readFully(buf);
return new String(buf, Constants.DEFAULT_ENCODING);
} | class class_name[name] begin[{]
method[readString, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[int], length]
local_variable[type[byte], buf]
call[.readFully, parameter[member[.buf]]]
return[ClassCreator(arguments=[MemberReferenc... | Keyword[public] identifier[String] identifier[readString] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[length] operator[=] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] Keyword[n... |
protected void writeHeader(Meta meta) throws IOException {
addTabs(2);
writeStart(HtmlTags.META);
switch(meta.type()) {
case Element.HEADER:
write(HtmlTags.NAME, ((Header) meta).getName());
break;
case Element.SUBJECT:
write... | class class_name[name] begin[{]
method[writeHeader, return_type[void], modifier[protected], parameter[meta]] begin[{]
call[.addTabs, parameter[literal[2]]]
call[.writeStart, parameter[member[HtmlTags.META]]]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReferenc... | Keyword[protected] Keyword[void] identifier[writeHeader] operator[SEP] identifier[Meta] identifier[meta] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[addTabs] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[writeStart] operator[SEP] identifier[HtmlTags] operator[SEP] identifie... |
public static String extractQuotedValueFromHeader(final String header, final String key) {
int keypos = 0;
int pos = -1;
boolean whiteSpace = true;
boolean inQuotes = false;
for (int i = 0; i < header.length() - 1; ++i) { //-1 because we need room for the = at the end
... | class class_name[name] begin[{]
method[extractQuotedValueFromHeader, return_type[type[String]], modifier[public static], parameter[header, key]] begin[{]
local_variable[type[int], keypos]
local_variable[type[int], pos]
local_variable[type[boolean], whiteSpace]
local_variable[typ... | Keyword[public] Keyword[static] identifier[String] identifier[extractQuotedValueFromHeader] operator[SEP] Keyword[final] identifier[String] identifier[header] , Keyword[final] identifier[String] identifier[key] operator[SEP] {
Keyword[int] identifier[keypos] operator[=] Other[0] operator[SEP] Keyword[int] ident... |
protected void performSingleResourceOperation(String resourceName, int dialogAction) throws CmsException {
// store original name to use for lock action
String originalResourceName = resourceName;
CmsResource res = getCms().readResource(resourceName, CmsResourceFilter.ALL);
if (res.isFo... | class class_name[name] begin[{]
method[performSingleResourceOperation, return_type[void], modifier[protected], parameter[resourceName, dialogAction]] begin[{]
local_variable[type[String], originalResourceName]
local_variable[type[CmsResource], res]
if[binary_operation[call[res.i... | Keyword[protected] Keyword[void] identifier[performSingleResourceOperation] operator[SEP] identifier[String] identifier[resourceName] , Keyword[int] identifier[dialogAction] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[String] identifier[originalResourceName] operator[=] identifier[resour... |
public static <T> ExpectedCondition<T> refreshed(final ExpectedCondition<T> condition) {
return new ExpectedCondition<T>() {
@Override
public T apply(WebDriver driver) {
try {
return condition.apply(driver);
} catch (StaleElementReferenceException e) {
return null;
... | class class_name[name] begin[{]
method[refreshed, return_type[type[ExpectedCondition]], modifier[public static], parameter[condition]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[ReturnStatement(expr... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ExpectedCondition] operator[<] identifier[T] operator[>] identifier[refreshed] operator[SEP] Keyword[final] identifier[ExpectedCondition] operator[<] identifier[T] operator[>] identifier[condition] operator[SEP] {
Keyword[return] Ke... |
public static String escapePattern(String source) {
if (source == null) {
return null;
}
StringBuffer result = new StringBuffer(source.length() * 2);
for (int i = 0; i < source.length(); ++i) {
char ch = source.charAt(i);
switch (ch) {
... | class class_name[name] begin[{]
method[escapePattern, return_type[type[String]], modifier[public static], parameter[source]] begin[{]
if[binary_operation[member[.source], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_varia... | Keyword[public] Keyword[static] identifier[String] identifier[escapePattern] operator[SEP] identifier[String] identifier[source] operator[SEP] {
Keyword[if] operator[SEP] identifier[source] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[St... |
public static final Number parseUnits(Number value)
{
return (value == null ? null : NumberHelper.getDouble(value.doubleValue() * 100));
} | class class_name[name] begin[{]
method[parseUnits, return_type[type[Number]], modifier[final public static], parameter[value]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operand... | Keyword[public] Keyword[static] Keyword[final] identifier[Number] identifier[parseUnits] operator[SEP] identifier[Number] identifier[value] operator[SEP] {
Keyword[return] operator[SEP] identifier[value] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[NumberHelper] operator[SEP] identifi... |
@Override
public RetrieveDomainAuthCodeResult retrieveDomainAuthCode(RetrieveDomainAuthCodeRequest request) {
request = beforeClientExecution(request);
return executeRetrieveDomainAuthCode(request);
} | class class_name[name] begin[{]
method[retrieveDomainAuthCode, return_type[type[RetrieveDomainAuthCodeResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeRetrieveDomainAuthCode, ... | annotation[@] identifier[Override] Keyword[public] identifier[RetrieveDomainAuthCodeResult] identifier[retrieveDomainAuthCode] operator[SEP] identifier[RetrieveDomainAuthCodeRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[req... |
public byte[] ensureBufferHasCapacityLeft(int size) throws FileParsingException {
if (bytesHolder == null) {
bytesHolder = new ByteArrayHolder(size);
} else {
bytesHolder.ensureHasSpace(size);
}
return bytesHolder.getUnderlyingBytes();
} | class class_name[name] begin[{]
method[ensureBufferHasCapacityLeft, return_type[type[byte]], modifier[public], parameter[size]] begin[{]
if[binary_operation[member[.bytesHolder], ==, literal[null]]] begin[{]
assign[member[.bytesHolder], ClassCreator(arguments=[MemberRefe... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[ensureBufferHasCapacityLeft] operator[SEP] Keyword[int] identifier[size] operator[SEP] Keyword[throws] identifier[FileParsingException] {
Keyword[if] operator[SEP] identifier[bytesHolder] operator[==] Other[null] operator[SEP] {
iden... |
protected RepoBranch getComponentRepoBranch(Component component) {
CollectorItem item = component.getFirstCollectorItemForType(CollectorType.SCM);
if (item == null) {
logger.warn("Error encountered building pipeline: could not find scm collector item for dashboard.");
return new Re... | class class_name[name] begin[{]
method[getComponentRepoBranch, return_type[type[RepoBranch]], modifier[protected], parameter[component]] begin[{]
local_variable[type[CollectorItem], item]
if[binary_operation[member[.item], ==, literal[null]]] begin[{]
call[logger... | Keyword[protected] identifier[RepoBranch] identifier[getComponentRepoBranch] operator[SEP] identifier[Component] identifier[component] operator[SEP] {
identifier[CollectorItem] identifier[item] operator[=] identifier[component] operator[SEP] identifier[getFirstCollectorItemForType] operator[SEP] identifier[Colle... |
@Override
protected void preparePaintComponent(final Request request) {
if (!isInitialised()) {
table.setDataModel(createTableModel());
setInitialised(true);
}
} | class class_name[name] begin[{]
method[preparePaintComponent, return_type[void], modifier[protected], parameter[request]] begin[{]
if[call[.isInitialised, parameter[]]] begin[{]
call[table.setDataModel, parameter[call[.createTableModel, parameter[]]]]
... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[preparePaintComponent] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isInitialised] operator[SEP] operator[SEP] operator[SEP] {
identif... |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public void setMoeb(Moebliert.Moeb value) {
this.moeb = value;
} | class class_name[name] begin[{]
method[setMoeb, return_type[void], modifier[public], parameter[value]] begin[{]
assign[THIS[member[None.moeb]], member[.value]]
end[}]
END[}] | annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setMoeb] operator[SEP] identifier[Moebliert] operator[SEP] identifier... |
protected void i_recordAnnotation(ScanPolicy policy,
AnnotationCategory category,
String i_targetName,
String i_annotationClassName) {
UtilImpl_BidirectionalMap annoMap = doGetAnnotationsMap(policy... | class class_name[name] begin[{]
method[i_recordAnnotation, return_type[void], modifier[protected], parameter[policy, category, i_targetName, i_annotationClassName]] begin[{]
local_variable[type[UtilImpl_BidirectionalMap], annoMap]
call[annoMap.record, parameter[member[.i_targetName], me... | Keyword[protected] Keyword[void] identifier[i_recordAnnotation] operator[SEP] identifier[ScanPolicy] identifier[policy] , identifier[AnnotationCategory] identifier[category] , identifier[String] identifier[i_targetName] , identifier[String] identifier[i_annotationClassName] operator[SEP] {
identifier[UtilImpl... |
protected Object handleException(Exception ex, Method method, Object[] params) throws Exception {
throw ex;
} | class class_name[name] begin[{]
method[handleException, return_type[type[Object]], modifier[protected], parameter[ex, method, params]] begin[{]
ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
end[}]
END[}] | Keyword[protected] identifier[Object] identifier[handleException] operator[SEP] identifier[Exception] identifier[ex] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[throw] identifier[ex] op... |
@Override
public AttachThingPrincipalResult attachThingPrincipal(AttachThingPrincipalRequest request) {
request = beforeClientExecution(request);
return executeAttachThingPrincipal(request);
} | class class_name[name] begin[{]
method[attachThingPrincipal, return_type[type[AttachThingPrincipalResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeAttachThingPrincipal, parame... | annotation[@] identifier[Override] Keyword[public] identifier[AttachThingPrincipalResult] identifier[attachThingPrincipal] operator[SEP] identifier[AttachThingPrincipalRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ... |
public static Date getInstance(final java.util.Date date, final Value type) {
if (Value.DATE.equals(type)) {
return new Date(date);
}
return new DateTime(date);
} | class class_name[name] begin[{]
method[getInstance, return_type[type[Date]], modifier[public static], parameter[date, type]] begin[{]
if[call[Value.DATE.equals, parameter[member[.type]]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=date, postfix_operators=[], pref... | Keyword[public] Keyword[static] identifier[Date] identifier[getInstance] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[date] , Keyword[final] identifier[Value] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[Value] op... |
protected void writePdf(final MBasicTable table, final OutputStream out) throws IOException {
try {
// step 1: creation of a document-object
final Rectangle pageSize = landscape ? PageSize.A4.rotate() : PageSize.A4;
final Document document = new Document(pageSize, 50, 50, 50, 50);
// step 2: we creat... | class class_name[name] begin[{]
method[writePdf, return_type[void], modifier[protected], parameter[table, out]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=landscape, ... | Keyword[protected] Keyword[void] identifier[writePdf] operator[SEP] Keyword[final] identifier[MBasicTable] identifier[table] , Keyword[final] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[final] identifier[Rectangle] identifier... |
@Trivial
public static void printTrace(String key, Object value, int tabLevel) {
if (tc.isDebugEnabled()) {
StringBuilder msg = new StringBuilder();
for (int count = 0; count < tabLevel; count++) {
msg.append("\t");
}
if (value != null) {
... | class class_name[name] begin[{]
method[printTrace, return_type[void], modifier[public static], parameter[key, value, tabLevel]] begin[{]
if[call[tc.isDebugEnabled, parameter[]]] begin[{]
local_variable[type[StringBuilder], msg]
ForStatement(body=BlockStatement(label=None... | annotation[@] identifier[Trivial] Keyword[public] Keyword[static] Keyword[void] identifier[printTrace] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] , Keyword[int] identifier[tabLevel] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[is... |
public <U> CompletableFuture<U> transaction(Function<ReactiveCompletableFutureGenericQueryExecutor, CompletableFuture<U>> transaction){
return beginTransaction()
.thenCompose(queryExecutor -> transaction.apply(queryExecutor) //perform user tasks
.thenCompose(res -> queryE... | class class_name[name] begin[{]
method[transaction, return_type[type[CompletableFuture]], modifier[public], parameter[transaction]] begin[{]
return[call[.beginTransaction, parameter[]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[U] operator[>] identifier[CompletableFuture] operator[<] identifier[U] operator[>] identifier[transaction] operator[SEP] identifier[Function] operator[<] identifier[ReactiveCompletableFutureGenericQueryExecutor] , identifier[CompletableFuture] operator[<] identifier[U] operator[>... |
public PagedResult<Folder> listFolders(long parentFolderId, PaginationParameters parameters) throws SmartsheetException {
String path = "folders/" + parentFolderId + "/folders";
if (parameters != null) {
path += parameters.toQueryString();
}
return this.listResourcesWithWra... | class class_name[name] begin[{]
method[listFolders, return_type[type[PagedResult]], modifier[public], parameter[parentFolderId, parameters]] begin[{]
local_variable[type[String], path]
if[binary_operation[member[.parameters], !=, literal[null]]] begin[{]
assign[m... | Keyword[public] identifier[PagedResult] operator[<] identifier[Folder] operator[>] identifier[listFolders] operator[SEP] Keyword[long] identifier[parentFolderId] , identifier[PaginationParameters] identifier[parameters] operator[SEP] Keyword[throws] identifier[SmartsheetException] {
identifier[String] identifie... |
public static CommerceRegion fetchByCommerceCountryId_Last(
long commerceCountryId,
OrderByComparator<CommerceRegion> orderByComparator) {
return getPersistence()
.fetchByCommerceCountryId_Last(commerceCountryId,
orderByComparator);
} | class class_name[name] begin[{]
method[fetchByCommerceCountryId_Last, return_type[type[CommerceRegion]], modifier[public static], parameter[commerceCountryId, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CommerceRegion] identifier[fetchByCommerceCountryId_Last] operator[SEP] Keyword[long] identifier[commerceCountryId] , identifier[OrderByComparator] operator[<] identifier[CommerceRegion] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[return] identifi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.