code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public java.util.Iterator iterator() {
// TODO Bug in remove from a concurrentSet/Map iterator, it does not actually do the remove!
java.util.Set combinedSet = new java.util.HashSet();
if (subSets != null) {
for (int i = 0; i < subSets.length; i++) {
synchronized (sub... | class class_name[name] begin[{]
method[iterator, return_type[type[java]], modifier[public], parameter[]] begin[{]
local_variable[type[java], combinedSet]
if[binary_operation[member[.subSets], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statement... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Iterator] identifier[iterator] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Set] identifier[combinedSet] operator[=] Keyword[new] identifier[java] operator[SEP] ident... |
public static String dehyphenate(String text, String docId) {
return dehyphenate(new LineNumberReader(new StringReader(text)), docId);
} | class class_name[name] begin[{]
method[dehyphenate, return_type[type[String]], modifier[public static], parameter[text, docId]] begin[{]
return[call[.dehyphenate, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] Keyword[static] identifier[String] identifier[dehyphenate] operator[SEP] identifier[String] identifier[text] , identifier[String] identifier[docId] operator[SEP] {
Keyword[return] identifier[dehyphenate] operator[SEP] Keyword[new] identifier[LineNumberReader] operator[SEP] Keyword[new] identifie... |
@Override
public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1) {
try {
collaborator.preInvoke(componentMetaData);
return request.startAsync(arg0, arg1);
} finally {
collaborator.postInvoke();
}
} | class class_name[name] begin[{]
method[startAsync, return_type[type[AsyncContext]], modifier[public], parameter[arg0, arg1]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=componentMetaData, postfix_operators=[], prefix_operators=[], quali... | annotation[@] identifier[Override] Keyword[public] identifier[AsyncContext] identifier[startAsync] operator[SEP] identifier[ServletRequest] identifier[arg0] , identifier[ServletResponse] identifier[arg1] operator[SEP] {
Keyword[try] {
identifier[collaborator] operator[SEP] identifier[preInvoke] opera... |
static String getApptentivePushNotificationData(Bundle pushBundle) {
if (pushBundle != null) {
if (pushBundle.containsKey(PUSH_EXTRA_KEY_PARSE)) { // Parse
ApptentiveLog.v(PUSH, "Got a Parse Push.");
String parseDataString = pushBundle.getString(PUSH_EXTRA_KEY_PARSE);
if (parseDataString == null) {
... | class class_name[name] begin[{]
method[getApptentivePushNotificationData, return_type[type[String]], modifier[static], parameter[pushBundle]] begin[{]
if[binary_operation[member[.pushBundle], !=, literal[null]]] begin[{]
if[call[pushBundle.containsKey, parameter[member[.... | Keyword[static] identifier[String] identifier[getApptentivePushNotificationData] operator[SEP] identifier[Bundle] identifier[pushBundle] operator[SEP] {
Keyword[if] operator[SEP] identifier[pushBundle] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[pushBundle] operator[S... |
public void shuffleSelectedLeftRowsToRightTable()
{
final int[] selectedRows = leftTable.getSelectedRows();
final int lastIndex = selectedRows.length - 1;
for (int i = lastIndex; -1 < i; i--)
{
final int selectedRow = selectedRows[i];
final T row = leftTable.getGenericTableModel().removeAt(selecte... | class class_name[name] begin[{]
method[shuffleSelectedLeftRowsToRightTable, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[int], selectedRows]
local_variable[type[int], lastIndex]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDecla... | Keyword[public] Keyword[void] identifier[shuffleSelectedLeftRowsToRightTable] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[selectedRows] operator[=] identifier[leftTable] operator[SEP] identifier[getSelectedRows] operator[SEP] operator[SEP] operator[SEP] Keywor... |
static String paren(LabelOperatorPrecedence op, Label l) {
if (op.compareTo(l.precedence())<0)
return '('+l.getExpression()+')';
return l.getExpression();
} | class class_name[name] begin[{]
method[paren, return_type[type[String]], modifier[static], parameter[op, l]] begin[{]
if[binary_operation[call[op.compareTo, parameter[call[l.precedence, parameter[]]]], <, literal[0]]] begin[{]
return[binary_operation[binary_operation[literal['('], +, call[l.get... | Keyword[static] identifier[String] identifier[paren] operator[SEP] identifier[LabelOperatorPrecedence] identifier[op] , identifier[Label] identifier[l] operator[SEP] {
Keyword[if] operator[SEP] identifier[op] operator[SEP] identifier[compareTo] operator[SEP] identifier[l] operator[SEP] identifier[precedence] op... |
public boolean check() throws Exception {
try (PDDocument document = PDDocument.load(in)) {
PDDocumentCatalog catalog = document.getDocumentCatalog();
PDFPageable pageable = new PDFPageable(document);
PageFormat firstPage = pageable.getPageFormat(0);
encrypted = ... | class class_name[name] begin[{]
method[check, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDocumentCatalog, postfix_ope... | Keyword[public] Keyword[boolean] identifier[check] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[try] operator[SEP] identifier[PDDocument] identifier[document] operator[=] identifier[PDDocument] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] ... |
void setSize(int size) {
if (this.size != 0) {
final String fmt = "column size is known: %d";
final String msg = format(fmt, this.size);
throw new IllegalStateException(msg);
}
this.size = size;
this.hash = hash();
} | class class_name[name] begin[{]
method[setSize, return_type[void], modifier[default], parameter[size]] begin[{]
if[binary_operation[THIS[member[None.size]], !=, literal[0]]] begin[{]
local_variable[type[String], fmt]
local_variable[type[String], msg]
ThrowSta... | Keyword[void] identifier[setSize] operator[SEP] Keyword[int] identifier[size] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[size] operator[!=] Other[0] operator[SEP] {
Keyword[final] identifier[String] identifier[fmt] operator[=] literal[String] operator[SEP] Keyword... |
public final CoderResult decode(ByteBuffer in, CharBuffer out,
boolean endOfInput)
{
int newState = endOfInput ? ST_END : ST_CODING;
if ((state != ST_RESET) && (state != ST_CODING)
&& !(endOfInput && (state == ST_END)))
throwIllegalStateExc... | class class_name[name] begin[{]
method[decode, return_type[type[CoderResult]], modifier[final public], parameter[in, out, endOfInput]] begin[{]
local_variable[type[int], newState]
if[binary_operation[binary_operation[binary_operation[member[.state], !=, member[.ST_RESET]], &&, binary_op... | Keyword[public] Keyword[final] identifier[CoderResult] identifier[decode] operator[SEP] identifier[ByteBuffer] identifier[in] , identifier[CharBuffer] identifier[out] , Keyword[boolean] identifier[endOfInput] operator[SEP] {
Keyword[int] identifier[newState] operator[=] identifier[endOfInput] operator[?] ident... |
@Override
protected byte[] serialize(Object o) {
ClassLoaderRegisteringObjectInputStream.register(o.getClass());
return super.serialize(o);
} | class class_name[name] begin[{]
method[serialize, return_type[type[byte]], modifier[protected], parameter[o]] begin[{]
call[ClassLoaderRegisteringObjectInputStream.register, parameter[call[o.getClass, parameter[]]]]
return[SuperMethodInvocation(arguments=[MemberReference(member=o, postf... | annotation[@] identifier[Override] Keyword[protected] Keyword[byte] operator[SEP] operator[SEP] identifier[serialize] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
identifier[ClassLoaderRegisteringObjectInputStream] operator[SEP] identifier[register] operator[SEP] identifier[o] operator[SEP] ide... |
public Map<String, Object> getOutboundConnectionInfo() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getOutboundConnectionInfo");
Map<String, Object> outboundConnectionInfo = ThreadManager.getInstance().getOutboundConnectionInfo();
if (TraceComponen... | class class_name[name] begin[{]
method[getOutboundConnectionInfo, return_type[type[Map]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, parameter[m... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getOutboundConnectionInfo] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifi... |
@Override
public void addProperties(Map<Object, Object> properties) {
if (properties == null) return;
lazyProperties().putAll(properties);
notifyChanged();
} | class class_name[name] begin[{]
method[addProperties, return_type[void], modifier[public], parameter[properties]] begin[{]
if[binary_operation[member[.properties], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[.lazyProperties, parameter... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addProperties] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[properties] operator[==] Other[null] operator[SEP] ... |
public static <C extends Compound> void write(Appendable appendable, Sequence<C> sequence) throws IOException {
for(C compound: sequence) {
appendable.append(compound.toString());
}
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[appendable, sequence]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix... | Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Compound] operator[>] Keyword[void] identifier[write] operator[SEP] identifier[Appendable] identifier[appendable] , identifier[Sequence] operator[<] identifier[C] operator[>] identifier[sequence] operator[SEP] Keyword[throws] identif... |
public static ProgressDialogFragment newInstance(Context context, int title, int message, boolean indeterminate) {
return newInstance(context.getString(title), context.getString(message), indeterminate);
} | class class_name[name] begin[{]
method[newInstance, return_type[type[ProgressDialogFragment]], modifier[public static], parameter[context, title, message, indeterminate]] begin[{]
return[call[.newInstance, parameter[call[context.getString, parameter[member[.title]]], call[context.getString, parameter[m... | Keyword[public] Keyword[static] identifier[ProgressDialogFragment] identifier[newInstance] operator[SEP] identifier[Context] identifier[context] , Keyword[int] identifier[title] , Keyword[int] identifier[message] , Keyword[boolean] identifier[indeterminate] operator[SEP] {
Keyword[return] identifier[newInstan... |
@Override
public Object getAttribute(String name, Object value) {
beginUpdate();
try {
return so.getAttribute(name, value);
} catch (Exception ex) {
log.warn("Exception on so.getAttribute", ex);
} finally {
endUpdate();
}
... | class class_name[name] begin[{]
method[getAttribute, return_type[type[Object]], modifier[public], parameter[name, value]] begin[{]
call[.beginUpdate, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getAttribute] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
identifier[beginUpdate] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] iden... |
public List<String> sortedHeader(@NotNull final String header) {
String accept = getHeader(header);
// accept anything when accept is not present
if (accept == null) {
return Collections.emptyList();
}
// parse
String[] items = accept.split(" *, *");
... | class class_name[name] begin[{]
method[sortedHeader, return_type[type[List]], modifier[public], parameter[header]] begin[{]
local_variable[type[String], accept]
if[binary_operation[member[.accept], ==, literal[null]]] begin[{]
return[call[Collections.emptyList, parameter[]]]... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[sortedHeader] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[header] operator[SEP] {
identifier[String] identifier[accept] operator[=] identifier[getHeader] operator[SEP] identifie... |
public CorsRule withAllowedOrigins(String... allowedOrigins) {
if (this.allowedOrigins == null) {
setAllowedOrigins(new java.util.ArrayList<String>(allowedOrigins.length));
}
for (String ele : allowedOrigins) {
this.allowedOrigins.add(ele);
}
return this;
... | class class_name[name] begin[{]
method[withAllowedOrigins, return_type[type[CorsRule]], modifier[public], parameter[allowedOrigins]] begin[{]
if[binary_operation[THIS[member[None.allowedOrigins]], ==, literal[null]]] begin[{]
call[.setAllowedOrigins, parameter[ClassCreat... | Keyword[public] identifier[CorsRule] identifier[withAllowedOrigins] operator[SEP] identifier[String] operator[...] identifier[allowedOrigins] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[allowedOrigins] operator[==] Other[null] operator[SEP] {
identifier[setAllowedO... |
public void addTTL(int ttlValue, String ttlUnit, String ttlColumn, int batchSize,
int maxFrequency, String streamName) {
dropTTL();
timeToLive = new TimeToLiveVoltDB(ttlValue, ttlUnit, getColumn(findColumn(ttlColumn)),
batchSize, maxFrequency, streamName);
} | class class_name[name] begin[{]
method[addTTL, return_type[void], modifier[public], parameter[ttlValue, ttlUnit, ttlColumn, batchSize, maxFrequency, streamName]] begin[{]
call[.dropTTL, parameter[]]
assign[member[.timeToLive], ClassCreator(arguments=[MemberReference(member=ttlVa... | Keyword[public] Keyword[void] identifier[addTTL] operator[SEP] Keyword[int] identifier[ttlValue] , identifier[String] identifier[ttlUnit] , identifier[String] identifier[ttlColumn] , Keyword[int] identifier[batchSize] , Keyword[int] identifier[maxFrequency] , identifier[String] identifier[streamName] operator[SEP]... |
public final EObject entryRuleMember() throws RecognitionException {
EObject current = null;
EObject iv_ruleMember = null;
try {
// InternalSARL.g:4693:47: (iv_ruleMember= ruleMember EOF )
// InternalSARL.g:4694:2: iv_ruleMember= ruleMember EOF
{
... | class class_name[name] begin[{]
method[entryRuleMember, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[EObject], iv_ruleMember]
TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(co... | Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleMember] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleMember] operator[=] Other[null] operato... |
public void parseStartEvents(Element parentElement, ScopeImpl scope) {
List<Element> startEventElements = parentElement.elements("startEvent");
List<ActivityImpl> startEventActivities = new ArrayList<ActivityImpl>();
for (Element startEventElement : startEventElements) {
ActivityImpl startEventActivi... | class class_name[name] begin[{]
method[parseStartEvents, return_type[void], modifier[public], parameter[parentElement, scope]] begin[{]
local_variable[type[List], startEventElements]
local_variable[type[List], startEventActivities]
ForStatement(body=BlockStatement(label=None, statements... | Keyword[public] Keyword[void] identifier[parseStartEvents] operator[SEP] identifier[Element] identifier[parentElement] , identifier[ScopeImpl] identifier[scope] operator[SEP] {
identifier[List] operator[<] identifier[Element] operator[>] identifier[startEventElements] operator[=] identifier[parentElement] opera... |
public static void getFileServerForPartialFiles(OutputStream outstream,
String filename, InputStream infile, DataTransferThrottler throttler,
long startPosition, long lengthToSend) throws IOException {
byte buf[] = new byte[BUFFER_SIZE];
try {
int num = 1;
while (num > 0) {
num =... | class class_name[name] begin[{]
method[getFileServerForPartialFiles, return_type[void], modifier[public static], parameter[outstream, filename, infile, throttler, startPosition, lengthToSend]] begin[{]
local_variable[type[byte], buf]
TryStatement(block=[LocalVariableDeclaration(annotations=[], ... | Keyword[public] Keyword[static] Keyword[void] identifier[getFileServerForPartialFiles] operator[SEP] identifier[OutputStream] identifier[outstream] , identifier[String] identifier[filename] , identifier[InputStream] identifier[infile] , identifier[DataTransferThrottler] identifier[throttler] , Keyword[long] identif... |
protected void handleAnnotationGroup(ProtoNetwork protoNetwork,
Map<String, Annotation> annotationMap, AnnotationGroup ag) {
if (ag != null) {
// handle citation
if (ag.getCitation() != null) {
handleCitationAnnotations(protoNetwork, ag.getCitation(),
... | class class_name[name] begin[{]
method[handleAnnotationGroup, return_type[void], modifier[protected], parameter[protoNetwork, annotationMap, ag]] begin[{]
if[binary_operation[member[.ag], !=, literal[null]]] begin[{]
if[binary_operation[call[ag.getCitation, parameter[]],... | Keyword[protected] Keyword[void] identifier[handleAnnotationGroup] operator[SEP] identifier[ProtoNetwork] identifier[protoNetwork] , identifier[Map] operator[<] identifier[String] , identifier[Annotation] operator[>] identifier[annotationMap] , identifier[AnnotationGroup] identifier[ag] operator[SEP] {
Keywor... |
public int[] getFrameTimeStampsFromDurations(int[] frameDurationsMs) {
int[] frameTimestampsMs = new int[frameDurationsMs.length];
int accumulatedDurationMs = 0;
for (int i = 0; i < frameDurationsMs.length; i++) {
frameTimestampsMs[i] = accumulatedDurationMs;
accumulatedDurationMs += frameDurati... | class class_name[name] begin[{]
method[getFrameTimeStampsFromDurations, return_type[type[int]], modifier[public], parameter[frameDurationsMs]] begin[{]
local_variable[type[int], frameTimestampsMs]
local_variable[type[int], accumulatedDurationMs]
ForStatement(body=BlockStatement(label=No... | Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[getFrameTimeStampsFromDurations] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[frameDurationsMs] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[frameTimestampsMs] operator[=] Keyword[new] Keyword[int] ope... |
public boolean isModelGroupPage() {
CmsResource page = getPageResource();
return (page != null) && CmsContainerpageService.isEditingModelGroups(m_cms, page);
} | class class_name[name] begin[{]
method[isModelGroupPage, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[CmsResource], page]
return[binary_operation[binary_operation[member[.page], !=, literal[null]], &&, call[CmsContainerpageService.isEditingModelGroups,... | Keyword[public] Keyword[boolean] identifier[isModelGroupPage] operator[SEP] operator[SEP] {
identifier[CmsResource] identifier[page] operator[=] identifier[getPageResource] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[page] operator[!=] Other[null] operator[SEP] operator[&&]... |
static int getNullTermByteSubString(StringBuffer str, byte[] array,
int index)
{
byte b = 1;
while (b != 0)
{
b = array[index];
if (b != 0) {
str.append((char)(b & 0x00FF));
}
... | class class_name[name] begin[{]
method[getNullTermByteSubString, return_type[type[int]], modifier[static], parameter[str, array, index]] begin[{]
local_variable[type[byte], b]
while[binary_operation[member[.b], !=, literal[0]]] begin[{]
assign[member[.b], member[... | Keyword[static] Keyword[int] identifier[getNullTermByteSubString] operator[SEP] identifier[StringBuffer] identifier[str] , Keyword[byte] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[index] operator[SEP] {
Keyword[byte] identifier[b] operator[=] Other[1] operator[SEP] Keyword[while] o... |
public void marshall(AddTagsRequest addTagsRequest, ProtocolMarshaller protocolMarshaller) {
if (addTagsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(addTagsRequest.getARN(), ARN_BINDING)... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[addTagsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.addTagsRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_o... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AddTagsRequest] identifier[addTagsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[addTagsRequest] operator[==] Other[null] operator[SEP] {
Keyword[... |
@Override
public void received(String msg) throws IOException {
try {
if (log.isDebugEnabled()) {
log.debug("<---'" + msg + "'");
}
filter.run(msg, cmdBuf);
cmdBuf.takeStep(controller, parser, this);
while (commandFactory.hasNext())... | class class_name[name] begin[{]
method[received, return_type[void], modifier[public], parameter[msg]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), el... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[received] operator[SEP] identifier[String] identifier[msg] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP]... |
public SortedMultiMap<Double,Integer> getMostSimilar(
Matrix m, int row,
int kNearestRows, Similarity.SimType similarityType) {
return getMostSimilar(m, row, kNearestRows,
Similarity.getSimilarityFunction(similarityType));
} | class class_name[name] begin[{]
method[getMostSimilar, return_type[type[SortedMultiMap]], modifier[public], parameter[m, row, kNearestRows, similarityType]] begin[{]
return[call[.getMostSimilar, parameter[member[.m], member[.row], member[.kNearestRows], call[Similarity.getSimilarityFunction, parameter[... | Keyword[public] identifier[SortedMultiMap] operator[<] identifier[Double] , identifier[Integer] operator[>] identifier[getMostSimilar] operator[SEP] identifier[Matrix] identifier[m] , Keyword[int] identifier[row] , Keyword[int] identifier[kNearestRows] , identifier[Similarity] operator[SEP] identifier[SimType] iden... |
public void toJson(Object src, Appendable writer) throws JsonIOException {
if (src != null) {
toJson(src, src.getClass(), writer);
} else {
toJson(JsonNull.INSTANCE, writer);
}
} | class class_name[name] begin[{]
method[toJson, return_type[void], modifier[public], parameter[src, writer]] begin[{]
if[binary_operation[member[.src], !=, literal[null]]] begin[{]
call[.toJson, parameter[member[.src], call[src.getClass, parameter[]], member[.writer]]]
... | Keyword[public] Keyword[void] identifier[toJson] operator[SEP] identifier[Object] identifier[src] , identifier[Appendable] identifier[writer] operator[SEP] Keyword[throws] identifier[JsonIOException] {
Keyword[if] operator[SEP] identifier[src] operator[!=] Other[null] operator[SEP] {
identifier[toJso... |
public static <T> Predicate<T> peek(Consumer<T> consumer) {
return target -> JMLambda
.getTrueAfterRunning(() -> consumer.accept(target));
} | class class_name[name] begin[{]
method[peek, return_type[type[Predicate]], modifier[public static], parameter[consumer]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[peek] operator[SEP] identifier[Consumer] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] {
Keyword[return] identifier[target] operator[->] identifi... |
public MultipartBuilder attachment(InputStream is, String filename) {
return bodyPart(new StreamDataBodyPart(ATTACHMENT_NAME, is, filename));
} | class class_name[name] begin[{]
method[attachment, return_type[type[MultipartBuilder]], modifier[public], parameter[is, filename]] begin[{]
return[call[.bodyPart, parameter[ClassCreator(arguments=[MemberReference(member=ATTACHMENT_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[... | Keyword[public] identifier[MultipartBuilder] identifier[attachment] operator[SEP] identifier[InputStream] identifier[is] , identifier[String] identifier[filename] operator[SEP] {
Keyword[return] identifier[bodyPart] operator[SEP] Keyword[new] identifier[StreamDataBodyPart] operator[SEP] identifier[ATTACHMENT_NA... |
public void setMax(int max)
{
this.max = max;
if (this.max < Alterable.MIN)
{
this.max = Alterable.MIN;
}
set(cur);
} | class class_name[name] begin[{]
method[setMax, return_type[void], modifier[public], parameter[max]] begin[{]
assign[THIS[member[None.max]], member[.max]]
if[binary_operation[THIS[member[None.max]], <, member[Alterable.MIN]]] begin[{]
assign[THIS[member[No... | Keyword[public] Keyword[void] identifier[setMax] operator[SEP] Keyword[int] identifier[max] operator[SEP] {
Keyword[this] operator[SEP] identifier[max] operator[=] identifier[max] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[max] operator[<] identifier[Alterable] operator[SEP] i... |
public Set<NewGTFSError> checkReferencesAndUniqueness(String keyValue, int lineNumber,
Field field, String value, Table table, String keyField, String orderField) {
Set<NewGTFSError> errors = new HashSet<>();
// Store field-scoped transit ID for referential integrity check. (Note, entity scoping... | class class_name[name] begin[{]
method[checkReferencesAndUniqueness, return_type[type[Set]], modifier[public], parameter[keyValue, lineNumber, field, value, table, keyField, orderField]] begin[{]
local_variable[type[Set], errors]
local_variable[type[String], uniqueKeyField]
local_variab... | Keyword[public] identifier[Set] operator[<] identifier[NewGTFSError] operator[>] identifier[checkReferencesAndUniqueness] operator[SEP] identifier[String] identifier[keyValue] , Keyword[int] identifier[lineNumber] , identifier[Field] identifier[field] , identifier[String] identifier[value] , identifier[Table] ident... |
public Noderef getNoderefFromPathref(
String layoutOwner,
String pathref,
String fname,
boolean isStructRef,
org.dom4j.Element layoutElement) {
Validate.notNull(layoutOwner, "Argument 'layoutOwner' cannot be null.");
Validate.notNull(pathref, ... | class class_name[name] begin[{]
method[getNoderefFromPathref, return_type[type[Noderef]], modifier[public], parameter[layoutOwner, pathref, fname, isStructRef, layoutElement]] begin[{]
call[Validate.notNull, parameter[member[.layoutOwner], literal["Argument 'layoutOwner' cannot be null."]]]
... | Keyword[public] identifier[Noderef] identifier[getNoderefFromPathref] operator[SEP] identifier[String] identifier[layoutOwner] , identifier[String] identifier[pathref] , identifier[String] identifier[fname] , Keyword[boolean] identifier[isStructRef] , identifier[org] operator[SEP] identifier[dom4j] operator[SEP] id... |
@Override
public boolean setPrevGroup(String prevGroup) {
if (LOGGER.isTraceEnabled()) LOGGER.trace(String.format("set previous group : %s", prevGroup));
this.prevGroup = prevGroup;
return true;
} | class class_name[name] begin[{]
method[setPrevGroup, return_type[type[boolean]], modifier[public], parameter[prevGroup]] begin[{]
if[call[LOGGER.isTraceEnabled, parameter[]]] begin[{]
call[LOGGER.trace, parameter[call[String.format, parameter[literal["set previous group : %s"], memb... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[setPrevGroup] operator[SEP] identifier[String] identifier[prevGroup] operator[SEP] {
Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] op... |
private void handleNewGap(long startstamp, long endstamp)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"handleNewGap",
new Object[] { Long.valueOf(startstamp), Long.valueOf(endstamp) })... | class class_name[name] begin[{]
method[handleNewGap, return_type[void], modifier[private], parameter[startstamp, endstamp]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, param... | Keyword[private] Keyword[void] identifier[handleNewGap] operator[SEP] Keyword[long] identifier[startstamp] , Keyword[long] identifier[endstamp] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[t... |
public static void generate(ConfigurationImpl configuration) {
DocPath filename = DocPaths.DEPRECATED_LIST;
try {
DeprecatedListWriter depr =
new DeprecatedListWriter(configuration, filename);
depr.generateDeprecatedListFile(
new DeprecatedAP... | class class_name[name] begin[{]
method[generate, return_type[void], modifier[public static], parameter[configuration]] begin[{]
local_variable[type[DocPath], filename]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCr... | Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[ConfigurationImpl] identifier[configuration] operator[SEP] {
identifier[DocPath] identifier[filename] operator[=] identifier[DocPaths] operator[SEP] identifier[DEPRECATED_LIST] operator[SEP] Keyword[try] {
iden... |
public static boolean handleIfMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) {
return handleIfMatch(exchange.getRequestHeaders().getFirst(Headers.IF_MATCH), etags, allowWeak);
} | class class_name[name] begin[{]
method[handleIfMatch, return_type[type[boolean]], modifier[public static], parameter[exchange, etags, allowWeak]] begin[{]
return[call[.handleIfMatch, parameter[call[exchange.getRequestHeaders, parameter[]], member[.etags], member[.allowWeak]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[handleIfMatch] operator[SEP] Keyword[final] identifier[HttpServerExchange] identifier[exchange] , Keyword[final] identifier[List] operator[<] identifier[ETag] operator[>] identifier[etags] , Keyword[boolean] identifier[allowWeak] operator[SEP] {
Keywo... |
public URL buildWithQuery(String base, String queryString, Object... values) {
String urlString = String.format(base + this.template, values) + queryString;
URL url = null;
try {
url = new URL(urlString);
} catch (MalformedURLException e) {
assert false : "An inva... | class class_name[name] begin[{]
method[buildWithQuery, return_type[type[URL]], modifier[public], parameter[base, queryString, values]] begin[{]
local_variable[type[String], urlString]
local_variable[type[URL], url]
TryStatement(block=[StatementExpression(expression=Assignment(expression... | Keyword[public] identifier[URL] identifier[buildWithQuery] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[queryString] , identifier[Object] operator[...] identifier[values] operator[SEP] {
identifier[String] identifier[urlString] operator[=] identifier[String] operator[SEP] i... |
@Override
protected String createResumeFaxJobProcessCommand(FaxJob faxJob)
{
//get arguments
String commandArguments=this.createProcessCommandArgumentsForExistingFaxJob(Fax4jExeConstants.RESUME_ACTION_FAX4J_EXE_COMMAND_LINE_ARGUMENT_VALUE.toString(),faxJob);
//create command
... | class class_name[name] begin[{]
method[createResumeFaxJobProcessCommand, return_type[type[String]], modifier[protected], parameter[faxJob]] begin[{]
local_variable[type[String], commandArguments]
local_variable[type[String], command]
return[member[.command]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[createResumeFaxJobProcessCommand] operator[SEP] identifier[FaxJob] identifier[faxJob] operator[SEP] {
identifier[String] identifier[commandArguments] operator[=] Keyword[this] operator[SEP] identifier[createProcessCommandArgument... |
private byte[] createBytes(InputStream stream, long length)
throws SQLException {
ByteArrayOutputStream buff = null;
try {
buff = new ByteArrayOutputStream();
if (length > 0) IOUtils.copyLarge(stream, buff, 0, length);
else IOUtils.copy(stream, buff);
... | class class_name[name] begin[{]
method[createBytes, return_type[type[byte]], modifier[private], parameter[stream, length]] begin[{]
local_variable[type[ByteArrayOutputStream], buff]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buff, postfix_op... | Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[createBytes] operator[SEP] identifier[InputStream] identifier[stream] , Keyword[long] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[ByteArrayOutputStream] identifier[buff] operator[=] Other[null] opera... |
protected void eventPostRollbackRemove(
SIMPMessage msg,
TransactionCommon transaction) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
... | class class_name[name] begin[{]
method[eventPostRollbackRemove, return_type[void], modifier[protected], parameter[msg, transaction]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.ent... | Keyword[protected] Keyword[void] identifier[eventPostRollbackRemove] operator[SEP] identifier[SIMPMessage] identifier[msg] , identifier[TransactionCommon] identifier[transaction] operator[SEP] Keyword[throws] identifier[SIResourceException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] id... |
public HashMap<String, Object> export() {
HashMap<String, Object> data = new HashMap<>();
for (int i = 0; i < queue.size(); i++) {
data.put(QUEUE_DESCRIPTOR+i, queue.get(i).export());
}
for (int i = 0; i < playbackModes.size(); i++) {
data.put(PLAYBACK_MODE_DESCRI... | class class_name[name] begin[{]
method[export, return_type[type[HashMap]], modifier[public], parameter[]] begin[{]
local_variable[type[HashMap], data]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Mem... | Keyword[public] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[export] operator[SEP] operator[SEP] {
identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[data] operator[=] Keyword[new] identifier[HashMap] operator[<] oper... |
public void addChild(Concept concept) {
if (taxonomy != concept.taxonomy) {
throw new IllegalArgumentException("Concepts are not from the same taxonomy.");
}
if (children == null) {
children = new ArrayList<>();
}
children.add(concept);
c... | class class_name[name] begin[{]
method[addChild, return_type[void], modifier[public], parameter[concept]] begin[{]
if[binary_operation[member[.taxonomy], !=, member[concept.taxonomy]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[void] identifier[addChild] operator[SEP] identifier[Concept] identifier[concept] operator[SEP] {
Keyword[if] operator[SEP] identifier[taxonomy] operator[!=] identifier[concept] operator[SEP] identifier[taxonomy] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgu... |
private static boolean isJarFile(File file) {
if (false == FileUtil.isFile(file)) {
return false;
}
return file.getPath().toLowerCase().endsWith(".jar");
} | class class_name[name] begin[{]
method[isJarFile, return_type[type[boolean]], modifier[private static], parameter[file]] begin[{]
if[binary_operation[literal[false], ==, call[FileUtil.isFile, parameter[member[.file]]]]] begin[{]
return[literal[false]]
else begin[{]
None
... | Keyword[private] Keyword[static] Keyword[boolean] identifier[isJarFile] operator[SEP] identifier[File] identifier[file] operator[SEP] {
Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[FileUtil] operator[SEP] identifier[isFile] operator[SEP] identifier[file] operator[SEP] operator[SEP] {
... |
public static QName getPortQName(ClassInfo classInfo, String seiClassName, String targetNamespace) {
AnnotationInfo annotationInfo = getAnnotationInfoFromClass(classInfo, "Port QName");
if (annotationInfo == null) {
return null;
}
boolean webServiceProviderAnnotation = isPro... | class class_name[name] begin[{]
method[getPortQName, return_type[type[QName]], modifier[public static], parameter[classInfo, seiClassName, targetNamespace]] begin[{]
local_variable[type[AnnotationInfo], annotationInfo]
if[binary_operation[member[.annotationInfo], ==, literal[null]]] beg... | Keyword[public] Keyword[static] identifier[QName] identifier[getPortQName] operator[SEP] identifier[ClassInfo] identifier[classInfo] , identifier[String] identifier[seiClassName] , identifier[String] identifier[targetNamespace] operator[SEP] {
identifier[AnnotationInfo] identifier[annotationInfo] operator[=] i... |
public static <P extends ParaObject> P setAnnotatedFields(P pojo, Map<String, Object> data,
Class<? extends Annotation> filter) {
if (data == null || data.isEmpty()) {
return null;
}
try {
if (pojo == null) {
// try to find a declared class in the core package
pojo = (P) toClass((String) data.get... | class class_name[name] begin[{]
method[setAnnotatedFields, return_type[type[P]], modifier[public static], parameter[pojo, data, filter]] begin[{]
if[binary_operation[binary_operation[member[.data], ==, literal[null]], ||, call[data.isEmpty, parameter[]]]] begin[{]
return[literal[nul... | Keyword[public] Keyword[static] operator[<] identifier[P] Keyword[extends] identifier[ParaObject] operator[>] identifier[P] identifier[setAnnotatedFields] operator[SEP] identifier[P] identifier[pojo] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[data] , identifier[Class... |
public void disambiguateHistoricDates(JCas jcas){
// build up a list with all found TIMEX expressions
List<Timex3> linearDates = new ArrayList<Timex3>();
FSIterator iterTimex = jcas.getAnnotationIndex(Timex3.type).iterator();
// Create List of all Timexes of types "date" and "time"
while (iterTimex.hasNex... | class class_name[name] begin[{]
method[disambiguateHistoricDates, return_type[void], modifier[public], parameter[jcas]] begin[{]
local_variable[type[List], linearDates]
local_variable[type[FSIterator], iterTimex]
while[call[iterTimex.hasNext, parameter[]]] begin[{]
l... | Keyword[public] Keyword[void] identifier[disambiguateHistoricDates] operator[SEP] identifier[JCas] identifier[jcas] operator[SEP] {
identifier[List] operator[<] identifier[Timex3] operator[>] identifier[linearDates] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Timex3] operator[>] operato... |
public void putContentStream(MIMETypedStream stream) throws StreamIOException {
// TODO: refactor to use proper temp file management - FCREPO-718
// for now, write to new temp file, clean up existing location
String oldDSLocation = DSLocation;
try {
// note: don't use temp u... | class class_name[name] begin[{]
method[putContentStream, return_type[void], modifier[public], parameter[stream]] begin[{]
local_variable[type[String], oldDSLocation]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInv... | Keyword[public] Keyword[void] identifier[putContentStream] operator[SEP] identifier[MIMETypedStream] identifier[stream] operator[SEP] Keyword[throws] identifier[StreamIOException] {
identifier[String] identifier[oldDSLocation] operator[=] identifier[DSLocation] operator[SEP] Keyword[try] {
identifier[... |
public Integer getMaxPoolSize()
{
if (childNode.getTextValueForPatternName("max-pool-size") != null && !childNode.getTextValueForPatternName("max-pool-size").equals("null")) {
return Integer.valueOf(childNode.getTextValueForPatternName("max-pool-size"));
}
return null;
} | class class_name[name] begin[{]
method[getMaxPoolSize, return_type[type[Integer]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[call[childNode.getTextValueForPatternName, parameter[literal["max-pool-size"]]], !=, literal[null]], &&, call[childNode.getTextValueFor... | Keyword[public] identifier[Integer] identifier[getMaxPoolSize] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[childNode] operator[SEP] identifier[getTextValueForPatternName] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[childNode] ope... |
public String convertIfcTendonAnchorTypeEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcTendonAnchorTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operat... | Keyword[public] identifier[String] identifier[convertIfcTendonAnchorTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] i... |
public int compareTo(Object o) {
if (o.getClass() == MmsParameter.class) {
return name.compareTo(((MmsParameter)o).getName());
}
return name.compareTo((String)o);
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[o]] begin[{]
if[binary_operation[call[o.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimens... | Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[MmsParameter] operator[SEP] Keyword[class] operator[SEP] {
Ke... |
@BetaApi
public final ListFirewallsPagedResponse listFirewalls(ProjectName project) {
ListFirewallsHttpRequest request =
ListFirewallsHttpRequest.newBuilder()
.setProject(project == null ? null : project.toString())
.build();
return listFirewalls(request);
} | class class_name[name] begin[{]
method[listFirewalls, return_type[type[ListFirewallsPagedResponse]], modifier[final public], parameter[project]] begin[{]
local_variable[type[ListFirewallsHttpRequest], request]
return[call[.listFirewalls, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[ListFirewallsPagedResponse] identifier[listFirewalls] operator[SEP] identifier[ProjectName] identifier[project] operator[SEP] {
identifier[ListFirewallsHttpRequest] identifier[request] operator[=] identifier[ListFirewallsHttpRequest] ope... |
@Override
public SIDestinationAddress[] getDefaultForwardRoutingPath()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getDefaultForwardRoutingPath");
SibTr.exit(tc, "getDefaultForwardRoutingPath", _defaultFrp);
}
ret... | class class_name[name] begin[{]
method[getDefaultForwardRoutingPath, return_type[type[SIDestinationAddress]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[SIDestinationAddress] operator[SEP] operator[SEP] identifier[getDefaultForwardRoutingPath] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] ope... |
public static ZMatrixRMaj checkZerosLT(ZMatrixRMaj A , int numRows , int numCols) {
if( A == null ) {
return new ZMatrixRMaj(numRows,numCols);
} else if( numRows != A.numRows || numCols != A.numCols )
throw new IllegalArgumentException("Input is not "+numRows+" x "+numCols+" matr... | class class_name[name] begin[{]
method[checkZerosLT, return_type[type[ZMatrixRMaj]], modifier[public static], parameter[A, numRows, numCols]] begin[{]
if[binary_operation[member[.A], ==, literal[null]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=numRows, postfix_... | Keyword[public] Keyword[static] identifier[ZMatrixRMaj] identifier[checkZerosLT] operator[SEP] identifier[ZMatrixRMaj] identifier[A] , Keyword[int] identifier[numRows] , Keyword[int] identifier[numCols] operator[SEP] {
Keyword[if] operator[SEP] identifier[A] operator[==] Other[null] operator[SEP] {
... |
public AppEventsLogger getAppEventsLogger() {
Session session = Session.getActiveSession();
if (session == null) {
return null;
}
if (appEventsLogger == null || !appEventsLogger.isValidForSession(session)) {
if (appEventsLogger != null) {
// Prete... | class class_name[name] begin[{]
method[getAppEventsLogger, return_type[type[AppEventsLogger]], modifier[public], parameter[]] begin[{]
local_variable[type[Session], session]
if[binary_operation[member[.session], ==, literal[null]]] begin[{]
return[literal[null]]
else... | Keyword[public] identifier[AppEventsLogger] identifier[getAppEventsLogger] operator[SEP] operator[SEP] {
identifier[Session] identifier[session] operator[=] identifier[Session] operator[SEP] identifier[getActiveSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[session] opera... |
public void bind(String url, Functions.Func callback) {
cropper.croppie("bind", url).then((result, object) -> {
callback.call();
return true;
});
} | class class_name[name] begin[{]
method[bind, return_type[void], modifier[public], parameter[url, callback]] begin[{]
call[cropper.croppie, parameter[literal["bind"], member[.url]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[bind] operator[SEP] identifier[String] identifier[url] , identifier[Functions] operator[SEP] identifier[Func] identifier[callback] operator[SEP] {
identifier[cropper] operator[SEP] identifier[croppie] operator[SEP] literal[String] , identifier[url] operator[SEP] operato... |
@Override
public ValueRange range(ChronoField field) {
switch (field) {
case DAY_OF_MONTH:
return DOM_RANGE;
case ALIGNED_WEEK_OF_MONTH:
return ALIGNED_WOM_RANGE;
case MONTH_OF_YEAR:
return MOY_RANGE;
case PROLEP... | class class_name[name] begin[{]
method[range, return_type[type[ValueRange]], modifier[public], parameter[field]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['DAY_OF_MONTH'], statements=[ReturnStatement(expression=MemberReference(member=DOM_RANGE, postfix_operators=[], prefix_operators=[],... | annotation[@] identifier[Override] Keyword[public] identifier[ValueRange] identifier[range] operator[SEP] identifier[ChronoField] identifier[field] operator[SEP] {
Keyword[switch] operator[SEP] identifier[field] operator[SEP] {
Keyword[case] identifier[DAY_OF_MONTH] operator[:] Keyword[return] identi... |
private static ServiceProvider loadDefaultServiceProvider() {
try {
//noinspection LoopStatementThatDoesntLoop
for (ServiceProvider sp : ServiceLoader.load(ServiceProvider.class)) {
return sp;
}
} catch (Exception e) {
Logger.getLogger(Boot... | class class_name[name] begin[{]
method[loadDefaultServiceProvider, return_type[type[ServiceProvider]], modifier[private static], parameter[]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=sp, postfix_operators=[],... | Keyword[private] Keyword[static] identifier[ServiceProvider] identifier[loadDefaultServiceProvider] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[for] operator[SEP] identifier[ServiceProvider] identifier[sp] operator[:] identifier[ServiceLoader] operator[SEP] identifier[load] operator[SEP] ide... |
public final I getInvocation(Object protocolKey)
{
I invocation = null;
// XXX: see if can remove this
LruCache<Object,I> invocationCache = _invocationCache;
if (invocationCache != null) {
invocation = invocationCache.get(protocolKey);
}
if (invocation == null) {
return null;
... | class class_name[name] begin[{]
method[getInvocation, return_type[type[I]], modifier[final public], parameter[protocolKey]] begin[{]
local_variable[type[I], invocation]
local_variable[type[LruCache], invocationCache]
if[binary_operation[member[.invocationCache], !=, literal[null... | Keyword[public] Keyword[final] identifier[I] identifier[getInvocation] operator[SEP] identifier[Object] identifier[protocolKey] operator[SEP] {
identifier[I] identifier[invocation] operator[=] Other[null] operator[SEP] identifier[LruCache] operator[<] identifier[Object] , identifier[I] operator[>] identifier[in... |
@Override
protected ESuccess execute () throws Exception
{
final String [] args = generateArguments ();
if (this.outputDirectory != null && !this.outputDirectory.exists ())
{
if (!this.outputDirectory.mkdirs ())
{
getLog ().error ("Failed to create output directory " + this.outputDi... | class class_name[name] begin[{]
method[execute, return_type[type[ESuccess]], modifier[protected], parameter[]] begin[{]
local_variable[type[String], args]
if[binary_operation[binary_operation[THIS[member[None.outputDirectory]], !=, literal[null]], &&, THIS[member[None.outputDirectory]ca... | annotation[@] identifier[Override] Keyword[protected] identifier[ESuccess] identifier[execute] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] identifier[generateArguments] operator[SEP] operator[SEP] o... |
public Collection<String> getOutDatedCache(Map<String, Long> states) {
return updatedCacheManager.getOutDatedCache(states);
} | class class_name[name] begin[{]
method[getOutDatedCache, return_type[type[Collection]], modifier[public], parameter[states]] begin[{]
return[call[updatedCacheManager.getOutDatedCache, parameter[member[.states]]]]
end[}]
END[}] | Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getOutDatedCache] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] identifier[states] operator[SEP] {
Keyword[return] identifier[updatedCacheManager] operator[SEP] identifier[g... |
@Deprecated
public PointL toProjectedPixels(final long latituteE6, final long longitudeE6, final PointL reuse) {
return toProjectedPixels(latituteE6 * 1E-6, longitudeE6 * 1E-6, reuse);
} | class class_name[name] begin[{]
method[toProjectedPixels, return_type[type[PointL]], modifier[public], parameter[latituteE6, longitudeE6, reuse]] begin[{]
return[call[.toProjectedPixels, parameter[binary_operation[member[.latituteE6], *, literal[1E-6]], binary_operation[member[.longitudeE6], *, literal... | annotation[@] identifier[Deprecated] Keyword[public] identifier[PointL] identifier[toProjectedPixels] operator[SEP] Keyword[final] Keyword[long] identifier[latituteE6] , Keyword[final] Keyword[long] identifier[longitudeE6] , Keyword[final] identifier[PointL] identifier[reuse] operator[SEP] {
Keyword[return] id... |
public int next() throws IOException {
do {
if (nextChildrenHit == nextNameTestHit) {
nextNameTestHit = hits2.next();
nextChildrenHit = hits1.next();
} else if (nextNameTestHit < nextChildrenHit) {
nextNameTestHit = hits2.skipTo(nextChildre... | class class_name[name] begin[{]
method[next, return_type[type[int]], modifier[public], parameter[]] begin[{]
do[binary_operation[binary_operation[binary_operation[member[.nextChildrenHit], >, literal[1]], &&, binary_operation[member[.nextNameTestHit], >, literal[1]]], &&, binary_operation[membe... | Keyword[public] Keyword[int] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[do] {
Keyword[if] operator[SEP] identifier[nextChildrenHit] operator[==] identifier[nextNameTestHit] operator[SEP] {
identifier[nextNameTestHit] operator[=] identi... |
public AppConfigurationEntry createAppConfigurationEntry(JAASLoginModuleConfig loginModule, String loginContextEntryName) {
String loginModuleClassName = loginModule.getClassName();
LoginModuleControlFlag controlFlag = loginModule.getControlFlag();
Map<String, Object> options = new HashMap<Strin... | class class_name[name] begin[{]
method[createAppConfigurationEntry, return_type[type[AppConfigurationEntry]], modifier[public], parameter[loginModule, loginContextEntryName]] begin[{]
local_variable[type[String], loginModuleClassName]
local_variable[type[LoginModuleControlFlag], controlFlag]
... | Keyword[public] identifier[AppConfigurationEntry] identifier[createAppConfigurationEntry] operator[SEP] identifier[JAASLoginModuleConfig] identifier[loginModule] , identifier[String] identifier[loginContextEntryName] operator[SEP] {
identifier[String] identifier[loginModuleClassName] operator[=] identifier[logi... |
@Override
public ResourceSet<Engagement> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
} | class class_name[name] begin[{]
method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=... | annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Engagement] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] {
Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] oper... |
public static double margrabeExchangeOptionValue(
double spot1,
double spot2,
double volatility1,
double volatility2,
double correlation,
double optionMaturity)
{
double volatility = Math.sqrt(volatility1*volatility1 + volatility2*volatility2 - 2.0 * volatility1*volatility2*correlation);
return b... | class class_name[name] begin[{]
method[margrabeExchangeOptionValue, return_type[type[double]], modifier[public static], parameter[spot1, spot2, volatility1, volatility2, correlation, optionMaturity]] begin[{]
local_variable[type[double], volatility]
return[call[.blackScholesGeneralizedOptionVal... | Keyword[public] Keyword[static] Keyword[double] identifier[margrabeExchangeOptionValue] operator[SEP] Keyword[double] identifier[spot1] , Keyword[double] identifier[spot2] , Keyword[double] identifier[volatility1] , Keyword[double] identifier[volatility2] , Keyword[double] identifier[correlation] , Keyword[double]... |
public static String getString(final String key, final String defValue) {
return getPreferences().getString(key, defValue);
} | class class_name[name] begin[{]
method[getString, return_type[type[String]], modifier[public static], parameter[key, defValue]] begin[{]
return[call[.getPreferences, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getString] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[defValue] operator[SEP] {
Keyword[return] identifier[getPreferences] operator[SEP] operator[SEP] operator[SEP] identifier[getStr... |
@Nullable
public static String toArraySignature(String typeName) {
String sig = classToSignature(typeName);
if ((sig == null) || (sig.length() == 0)) {
return sig;
}
return Values.SIG_ARRAY_PREFIX + sig;
} | class class_name[name] begin[{]
method[toArraySignature, return_type[type[String]], modifier[public static], parameter[typeName]] begin[{]
local_variable[type[String], sig]
if[binary_operation[binary_operation[member[.sig], ==, literal[null]], ||, binary_operation[call[sig.length, param... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[toArraySignature] operator[SEP] identifier[String] identifier[typeName] operator[SEP] {
identifier[String] identifier[sig] operator[=] identifier[classToSignature] operator[SEP] identifier[typeName] operator[SEP] ope... |
@Override
public void constructCache(DefaultSolverScope solverScope) {
long childSize = childEntitySelector.getSize();
if (childSize > (long) Integer.MAX_VALUE) {
throw new IllegalStateException("The selector (" + this
+ ") has a childEntitySelector (" + childEntitySe... | class class_name[name] begin[{]
method[constructCache, return_type[void], modifier[public], parameter[solverScope]] begin[{]
local_variable[type[long], childSize]
if[binary_operation[member[.childSize], >, Cast(expression=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[constructCache] operator[SEP] identifier[DefaultSolverScope] identifier[solverScope] operator[SEP] {
Keyword[long] identifier[childSize] operator[=] identifier[childEntitySelector] operator[SEP] identifier[getSize] operator[SEP] operator... |
public void addRewardProducer(IRewardProducer producer) {
if (this.producers == null) {
this.producers = new ArrayList<IRewardProducer>();
}
this.producers.add(producer);
} | class class_name[name] begin[{]
method[addRewardProducer, return_type[void], modifier[public], parameter[producer]] begin[{]
if[binary_operation[THIS[member[None.producers]], ==, literal[null]]] begin[{]
assign[THIS[member[None.producers]], ClassCreator(arguments=[], bod... | Keyword[public] Keyword[void] identifier[addRewardProducer] operator[SEP] identifier[IRewardProducer] identifier[producer] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[producers] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[produce... |
public void putEDBObjectEntry(String key, Object value) {
putEDBObjectEntry(key, value, value.getClass());
} | class class_name[name] begin[{]
method[putEDBObjectEntry, return_type[void], modifier[public], parameter[key, value]] begin[{]
call[.putEDBObjectEntry, parameter[member[.key], member[.value], call[value.getClass, parameter[]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[putEDBObjectEntry] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
identifier[putEDBObjectEntry] operator[SEP] identifier[key] , identifier[value] , identifier[value] operator[SEP] identifier[getClass] operator[SE... |
public static void signToInfo(String info, String signfile) {
// 从文件当中读取私匙
PrivateKey myprikey = (PrivateKey) getObjFromFile("mykeys.bat", 1);
// 从文件中读取公匙
PublicKey mypubkey = (PublicKey) getObjFromFile("mykeys.bat", 2);
try {
// Signature 对象可用来生成和验证数字签名
Signature signet = Signature.getInstance("DSA");
... | class class_name[name] begin[{]
method[signToInfo, return_type[void], modifier[public static], parameter[info, signfile]] begin[{]
local_variable[type[PrivateKey], myprikey]
local_variable[type[PublicKey], mypubkey]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarator... | Keyword[public] Keyword[static] Keyword[void] identifier[signToInfo] operator[SEP] identifier[String] identifier[info] , identifier[String] identifier[signfile] operator[SEP] {
identifier[PrivateKey] identifier[myprikey] operator[=] operator[SEP] identifier[PrivateKey] operator[SEP] identifier[getObjFromFile] o... |
public void splitShards(int targetNumShards) {
int origionalShardCount = getShardCount();
int splitFactor = targetNumShards / origionalShardCount;
if (splitFactor <= 1) {
return;
}
List<List<String>> oldAllFiles = allFiles;
shardCount = splitFactor * origionalShardCount;
allFiles = ini... | class class_name[name] begin[{]
method[splitShards, return_type[void], modifier[public], parameter[targetNumShards]] begin[{]
local_variable[type[int], origionalShardCount]
local_variable[type[int], splitFactor]
if[binary_operation[member[.splitFactor], <=, literal[1]]] begin[{]... | Keyword[public] Keyword[void] identifier[splitShards] operator[SEP] Keyword[int] identifier[targetNumShards] operator[SEP] {
Keyword[int] identifier[origionalShardCount] operator[=] identifier[getShardCount] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[splitFactor] operator[=] identifier[tar... |
public boolean removeHeaderView(View v) {
if (mHeaderViewInfos.size() > 0) {
boolean result = false;
ListAdapter adapter = getAdapter();
if (adapter != null && ((HeaderViewGridAdapter) adapter).removeHeader(v)) {
result = true;
}
remove... | class class_name[name] begin[{]
method[removeHeaderView, return_type[type[boolean]], modifier[public], parameter[v]] begin[{]
if[binary_operation[call[mHeaderViewInfos.size, parameter[]], >, literal[0]]] begin[{]
local_variable[type[boolean], result]
local_variable[type[... | Keyword[public] Keyword[boolean] identifier[removeHeaderView] operator[SEP] identifier[View] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[mHeaderViewInfos] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
Keyword[boolean] identifier[... |
private int slopSize(Versioned<Slop> slopVersioned) {
int nBytes = 0;
Slop slop = slopVersioned.getValue();
nBytes += slop.getKey().length();
nBytes += ((VectorClock) slopVersioned.getVersion()).sizeInBytes();
switch(slop.getOperation()) {
case PUT: {
... | class class_name[name] begin[{]
method[slopSize, return_type[type[int]], modifier[private], parameter[slopVersioned]] begin[{]
local_variable[type[int], nBytes]
local_variable[type[Slop], slop]
assign[member[.nBytes], call[slop.getKey, parameter[]]]
assign[member... | Keyword[private] Keyword[int] identifier[slopSize] operator[SEP] identifier[Versioned] operator[<] identifier[Slop] operator[>] identifier[slopVersioned] operator[SEP] {
Keyword[int] identifier[nBytes] operator[=] Other[0] operator[SEP] identifier[Slop] identifier[slop] operator[=] identifier[slopVersioned] oper... |
public Task withContainers(Container... containers) {
if (this.containers == null) {
setContainers(new com.amazonaws.internal.SdkInternalList<Container>(containers.length));
}
for (Container ele : containers) {
this.containers.add(ele);
}
return this;
... | class class_name[name] begin[{]
method[withContainers, return_type[type[Task]], modifier[public], parameter[containers]] begin[{]
if[binary_operation[THIS[member[None.containers]], ==, literal[null]]] begin[{]
call[.setContainers, parameter[ClassCreator(arguments=[Member... | Keyword[public] identifier[Task] identifier[withContainers] operator[SEP] identifier[Container] operator[...] identifier[containers] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[containers] operator[==] Other[null] operator[SEP] {
identifier[setContainers] operator[... |
private void removeNode(ItemState item, int indexItem)
{
items.remove(indexItem);
index.remove(item.getData().getIdentifier());
index.remove(item.getData().getQPath());
index.remove(new ParentIDQPathBasedKey(item));
index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item.... | class class_name[name] begin[{]
method[removeNode, return_type[void], modifier[private], parameter[item, indexItem]] begin[{]
call[items.remove, parameter[member[.indexItem]]]
call[index.remove, parameter[call[item.getData, parameter[]]]]
call[index.remove, param... | Keyword[private] Keyword[void] identifier[removeNode] operator[SEP] identifier[ItemState] identifier[item] , Keyword[int] identifier[indexItem] operator[SEP] {
identifier[items] operator[SEP] identifier[remove] operator[SEP] identifier[indexItem] operator[SEP] operator[SEP] identifier[index] operator[SEP] ident... |
public void addBadTypeError(final String type) throws ValidationException
{
addError(StringFormatter.format(MessageConstants.MESSAGES.invalidType(), type));
} | class class_name[name] begin[{]
method[addBadTypeError, return_type[void], modifier[public], parameter[type]] begin[{]
call[.addError, parameter[call[StringFormatter.format, parameter[call[MessageConstants.MESSAGES.invalidType, parameter[]], member[.type]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addBadTypeError] operator[SEP] Keyword[final] identifier[String] identifier[type] operator[SEP] Keyword[throws] identifier[ValidationException] {
identifier[addError] operator[SEP] identifier[StringFormatter] operator[SEP] identifier[format] operator[SEP] identifier[Messa... |
public boolean isClosed() {
if (isEmpty()) {
return false;
}
if (getNumPoints() == 1) {
return false;
}
Coordinate[] coordinates = getCoordinates();
return coordinates[0].equals(coordinates[coordinates.length - 1]);
} | class class_name[name] begin[{]
method[isClosed, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[.isEmpty, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation[call[.getNumPoints, para... | Keyword[public] Keyword[boolean] identifier[isClosed] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] identifier[getNumPoints] operator[SEP] ... |
public void execute() throws MojoExecutionException {
if (this.resources.size() == 0) {
throw new MojoExecutionException("No resources configured");
}
// Prefered to count error instead of failing on the first one.
int errCount = 0;
// Iterate on all configured resources.
for (final XPathResource r : ... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.resources]call[None.size, parameter[]]], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operat... | Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
... |
public int deleteByIdCascade(String id) throws SQLException {
int count = 0;
if (id != null) {
TableIndex tableIndex = queryForId(id);
if (tableIndex != null) {
count = deleteCascade(tableIndex);
}
}
return count;
} | class class_name[name] begin[{]
method[deleteByIdCascade, return_type[type[int]], modifier[public], parameter[id]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.id], !=, literal[null]]] begin[{]
local_variable[type[TableIndex], tableIndex]
... | Keyword[public] Keyword[int] identifier[deleteByIdCascade] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[!=] Other[null] operator[SEP] {
... |
@Override
public String[] getContext(final int index, final String[] tokens,
final String[] preds, final Object[] additionalContext) {
final List<String> features = new ArrayList<String>();
for (final AdaptiveFeatureGenerator featureGenerator : this.featureGenerators) {
featureGenerator.createFea... | class class_name[name] begin[{]
method[getContext, return_type[type[String]], modifier[public], parameter[index, tokens, preds, additionalContext]] begin[{]
local_variable[type[List], features]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocat... | annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getContext] operator[SEP] Keyword[final] Keyword[int] identifier[index] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[tokens] , Keyword[final] identifier[String] operator[SEP] oper... |
public Database database(String name, boolean create) {
return new Database(this, couchDbClient.database(name, create));
} | class class_name[name] begin[{]
method[database, return_type[type[Database]], modifier[public], parameter[name, create]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[MemberReference(member=name, postfi... | Keyword[public] identifier[Database] identifier[database] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[create] operator[SEP] {
Keyword[return] Keyword[new] identifier[Database] operator[SEP] Keyword[this] , identifier[couchDbClient] operator[SEP] identifier[database] operator... |
public EntryList getSubset(final SliceQuery otherQuery, final EntryList otherResult) {
assert otherQuery.subsumes(this);
int pos = Collections.binarySearch(otherResult, sliceStart);
if (pos < 0) pos = -pos - 1;
List<Entry> result = new ArrayList<Entry>();
for (; pos < otherResul... | class class_name[name] begin[{]
method[getSubset, return_type[type[EntryList]], modifier[public], parameter[otherQuery, otherResult]] begin[{]
AssertStatement(condition=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=subsumes, postfix_o... | Keyword[public] identifier[EntryList] identifier[getSubset] operator[SEP] Keyword[final] identifier[SliceQuery] identifier[otherQuery] , Keyword[final] identifier[EntryList] identifier[otherResult] operator[SEP] {
Keyword[assert] identifier[otherQuery] operator[SEP] identifier[subsumes] operator[SEP] Keyword[th... |
public ComputeResource withInstanceTypes(String... instanceTypes) {
if (this.instanceTypes == null) {
setInstanceTypes(new java.util.ArrayList<String>(instanceTypes.length));
}
for (String ele : instanceTypes) {
this.instanceTypes.add(ele);
}
return this;
... | class class_name[name] begin[{]
method[withInstanceTypes, return_type[type[ComputeResource]], modifier[public], parameter[instanceTypes]] begin[{]
if[binary_operation[THIS[member[None.instanceTypes]], ==, literal[null]]] begin[{]
call[.setInstanceTypes, parameter[ClassCr... | Keyword[public] identifier[ComputeResource] identifier[withInstanceTypes] operator[SEP] identifier[String] operator[...] identifier[instanceTypes] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[instanceTypes] operator[==] Other[null] operator[SEP] {
identifier[setInst... |
private void checkExactlyTheWeeksCheckBoxes(Collection<WeekOfMonth> weeksToCheck) {
for (CmsCheckBox cb : m_checkboxes) {
cb.setChecked(weeksToCheck.contains(WeekOfMonth.valueOf(cb.getInternalValue())));
}
} | class class_name[name] begin[{]
method[checkExactlyTheWeeksCheckBoxes, return_type[void], modifier[private], parameter[weeksToCheck]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation... | Keyword[private] Keyword[void] identifier[checkExactlyTheWeeksCheckBoxes] operator[SEP] identifier[Collection] operator[<] identifier[WeekOfMonth] operator[>] identifier[weeksToCheck] operator[SEP] {
Keyword[for] operator[SEP] identifier[CmsCheckBox] identifier[cb] operator[:] identifier[m_checkboxes] operator[... |
public void exportMap2Excel(String templatePath, Map<String, List<?>> data,
Map<String, String> extendMap, Class clazz, OutputStream os)
throws Excel4JException {
try (SheetTemplate sheetTemplate = exportExcelByMapHandler(templatePath, 0, data, extendMap, clazz, true... | class class_name[name] begin[{]
method[exportMap2Excel, return_type[void], modifier[public], parameter[templatePath, data, extendMap, clazz, os]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=os, postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[void] identifier[exportMap2Excel] operator[SEP] identifier[String] identifier[templatePath] , identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] operator[?] operator[>] operator[>] identifier[data] , identifier[Map] operator[<] identifier[String] , identifier[Strin... |
protected void addToRelationStack(Map<Object, Object> relationStack, Object entity, EntityMetadata m)
{
Object obj = entity;
if (entity instanceof EnhanceEntity)
{
obj = ((EnhanceEntity) entity).getEntity();
}
relationStack.put(obj.getClass().getCanonicalName() + ... | class class_name[name] begin[{]
method[addToRelationStack, return_type[void], modifier[protected], parameter[relationStack, entity, m]] begin[{]
local_variable[type[Object], obj]
if[binary_operation[member[.entity], instanceof, type[EnhanceEntity]]] begin[{]
assi... | Keyword[protected] Keyword[void] identifier[addToRelationStack] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[relationStack] , identifier[Object] identifier[entity] , identifier[EntityMetadata] identifier[m] operator[SEP] {
identifier[Object] identifi... |
private static String getFirstIp(String ip) {
if (ip != null) {
final int indexOfFirstComma = ip.indexOf(',');
if (indexOfFirstComma != -1) {
ip = ip.substring(0, indexOfFirstComma);
}
}
return ip;
} | class class_name[name] begin[{]
method[getFirstIp, return_type[type[String]], modifier[private static], parameter[ip]] begin[{]
if[binary_operation[member[.ip], !=, literal[null]]] begin[{]
local_variable[type[int], indexOfFirstComma]
if[binary_operation[memb... | Keyword[private] Keyword[static] identifier[String] identifier[getFirstIp] operator[SEP] identifier[String] identifier[ip] operator[SEP] {
Keyword[if] operator[SEP] identifier[ip] operator[!=] Other[null] operator[SEP] {
Keyword[final] Keyword[int] identifier[indexOfFirstComma] operator[=] identifier[... |
public static cmpparameter get(nitro_service service) throws Exception{
cmpparameter obj = new cmpparameter();
cmpparameter[] response = (cmpparameter[])obj.get_resources(service);
return response[0];
} | class class_name[name] begin[{]
method[get, return_type[type[cmpparameter]], modifier[public static], parameter[service]] begin[{]
local_variable[type[cmpparameter], obj]
local_variable[type[cmpparameter], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[cmpparameter] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[cmpparameter] identifier[obj] operator[=] Keyword[new] identifier[cmpparameter] operator[SEP] operator[SEP] operato... |
public int getPrecision(int column) throws SQLException {
checkColumn(column);
// type in columnTypes overrides column type
Type type = resultMetaData.columnTypes[--column];
long precision = type.precision;
if (type.isDateTimeType() || type.isIntervalType()) {
... | class class_name[name] begin[{]
method[getPrecision, return_type[type[int]], modifier[public], parameter[column]] begin[{]
call[.checkColumn, parameter[member[.column]]]
local_variable[type[Type], type]
local_variable[type[long], precision]
if[binary_operation[ca... | Keyword[public] Keyword[int] identifier[getPrecision] operator[SEP] Keyword[int] identifier[column] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkColumn] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[Type] identifier[type] operator[=] identifier[resultMetaData... |
public String resolveDocument()
throws MalformedURLException, IOException {
// If there's a DOCUMENT entry, return it
catalogManager.debug.message(3, "resolveDocument");
Enumeration enumt = catalogEntries.elements();
while (enumt.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enumt.nex... | class class_name[name] begin[{]
method[resolveDocument, return_type[type[String]], modifier[public], parameter[]] begin[{]
call[catalogManager.debug.message, parameter[literal[3], literal["resolveDocument"]]]
local_variable[type[Enumeration], enumt]
while[call[enumt.hasM... | Keyword[public] identifier[String] identifier[resolveDocument] operator[SEP] operator[SEP] Keyword[throws] identifier[MalformedURLException] , identifier[IOException] {
identifier[catalogManager] operator[SEP] identifier[debug] operator[SEP] identifier[message] operator[SEP] Other[3] , literal[String] operator... |
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
if (!validateConfiguration()) {
LOG.error("Rpc configuration has some problems, so interrupt initialization process, please figure out.");
return;
... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[config]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operator... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[ServletConfig] identifier[config] operator[SEP] Keyword[throws] identifier[ServletException] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[config] operator[SEP] operator[SEP] Keyw... |
private String getDefaultTagReplaceID() {
if (m_tags2replacementTags.size() == 0) {
return ""; // to know that no replacements were set before and the ID will still have
// to be computed later
} else {
StringBuffer result = new StringBuffer();
Map.Entry ... | class class_name[name] begin[{]
method[getDefaultTagReplaceID, return_type[type[String]], modifier[private], parameter[]] begin[{]
if[binary_operation[call[m_tags2replacementTags.size, parameter[]], ==, literal[0]]] begin[{]
return[literal[""]]
else begin[{]
loca... | Keyword[private] identifier[String] identifier[getDefaultTagReplaceID] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_tags2replacementTags] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[return] literal[String] operator[SE... |
public void setPrintReport(boolean bPrintReport)
{
if (bPrintReport)
if (this.getScreenRecord() != null) // This tells the RecordHtmlScreen to display the data
this.getScreenRecord().getField(Constants.MAIN_FIELD).setModified(true); // Flag screen record, so toolbar knows
... | class class_name[name] begin[{]
method[setPrintReport, return_type[void], modifier[public], parameter[bPrintReport]] begin[{]
if[member[.bPrintReport]] begin[{]
if[binary_operation[THIS[call[None.getScreenRecord, parameter[]]], !=, literal[null]]] begin[{]
THIS[call[... | Keyword[public] Keyword[void] identifier[setPrintReport] operator[SEP] Keyword[boolean] identifier[bPrintReport] operator[SEP] {
Keyword[if] operator[SEP] identifier[bPrintReport] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenRecord] operator[SEP] operator[SEP] operator[... |
protected CmsADEConfigDataInternal getSiteConfigData(String path) {
if (path == null) {
return null;
}
List<String> prefixes = getSiteConfigPaths(path);
if (prefixes.size() == 0) {
return null;
}
// for any two prefixes of a string, one is a prefi... | class class_name[name] begin[{]
method[getSiteConfigData, return_type[type[CmsADEConfigDataInternal]], modifier[protected], parameter[path]] begin[{]
if[binary_operation[member[.path], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[protected] identifier[CmsADEConfigDataInternal] identifier[getSiteConfigData] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifi... |
@Override
public CommerceDiscountRel findByCommerceDiscountId_First(
long commerceDiscountId,
OrderByComparator<CommerceDiscountRel> orderByComparator)
throws NoSuchDiscountRelException {
CommerceDiscountRel commerceDiscountRel = fetchByCommerceDiscountId_First(commerceDiscountId,
orderByComparator);
if... | class class_name[name] begin[{]
method[findByCommerceDiscountId_First, return_type[type[CommerceDiscountRel]], modifier[public], parameter[commerceDiscountId, orderByComparator]] begin[{]
local_variable[type[CommerceDiscountRel], commerceDiscountRel]
if[binary_operation[member[.commerce... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceDiscountRel] identifier[findByCommerceDiscountId_First] operator[SEP] Keyword[long] identifier[commerceDiscountId] , identifier[OrderByComparator] operator[<] identifier[CommerceDiscountRel] operator[>] identifier[orderByComparator] operator[SEP] Ke... |
public void commit() throws PersistenceException {
try {
if( connection == null ) {
if( dirty ) {
throw new PersistenceException("Attempt to commit a committed or aborted transaction.");
}
return;
}
st... | class class_name[name] begin[{]
method[commit, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_... | Keyword[public] Keyword[void] identifier[commit] operator[SEP] operator[SEP] Keyword[throws] identifier[PersistenceException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[connection] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[dirty] operator[S... |
private <T extends Assignable> InputStream findExtensionImpl(final Class<T> extensionClass) {
try {
// Add all extension impls found in all CLs
for (final ClassLoader cl : this.getClassLoaders()) {
final InputStream stream = cl.getResourceAsStream("META-INF/services/" + e... | class class_name[name] begin[{]
method[findExtensionImpl, return_type[type[InputStream]], modifier[private], parameter[extensionClass]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensio... | Keyword[private] operator[<] identifier[T] Keyword[extends] identifier[Assignable] operator[>] identifier[InputStream] identifier[findExtensionImpl] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[extensionClass] operator[SEP] {
Keyword[try] {
Keyword[fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.