code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void performOptimizedRead(byte[] handle, long length, int blocksize,
java.io.OutputStream out, int outstandingRequests,
FileTransferProgress progress) throws SftpStatusException,
SshException, TransferCancelledException {
performOptimizedRead(handle, length, blocksize, out,
outstandingRequests, p... | class class_name[name] begin[{]
method[performOptimizedRead, return_type[void], modifier[public], parameter[handle, length, blocksize, out, outstandingRequests, progress]] begin[{]
call[.performOptimizedRead, parameter[member[.handle], member[.length], member[.blocksize], member[.out], member[.... | Keyword[public] Keyword[void] identifier[performOptimizedRead] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[handle] , Keyword[long] identifier[length] , Keyword[int] identifier[blocksize] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[OutputStream] identifier[out] , K... |
AtomSymbol generatePseudoSymbol(String label, HydrogenPosition position) {
final Font italicFont = font.deriveFont(Font.BOLD)
.deriveFont(Font.ITALIC);
List<TextOutline> outlines = new ArrayList<>(3);
int beg = 0;
int pos = 0;
int len = label... | class class_name[name] begin[{]
method[generatePseudoSymbol, return_type[type[AtomSymbol]], modifier[default], parameter[label, position]] begin[{]
local_variable[type[Font], italicFont]
local_variable[type[List], outlines]
local_variable[type[int], beg]
local_variable[type[int]... | identifier[AtomSymbol] identifier[generatePseudoSymbol] operator[SEP] identifier[String] identifier[label] , identifier[HydrogenPosition] identifier[position] operator[SEP] {
Keyword[final] identifier[Font] identifier[italicFont] operator[=] identifier[font] operator[SEP] identifier[deriveFont] operator[SEP] id... |
@Sensitive
public static String getHeader(HttpServletRequest req, String key) {
HttpServletRequest sr = getWrappedServletRequestObject(req);
return sr.getHeader(key);
} | class class_name[name] begin[{]
method[getHeader, return_type[type[String]], modifier[public static], parameter[req, key]] begin[{]
local_variable[type[HttpServletRequest], sr]
return[call[sr.getHeader, parameter[member[.key]]]]
end[}]
END[}] | annotation[@] identifier[Sensitive] Keyword[public] Keyword[static] identifier[String] identifier[getHeader] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[String] identifier[key] operator[SEP] {
identifier[HttpServletRequest] identifier[sr] operator[=] identifier[getWrappedServletReq... |
@Override
public UploadLayerPartResult uploadLayerPart(UploadLayerPartRequest request) {
request = beforeClientExecution(request);
return executeUploadLayerPart(request);
} | class class_name[name] begin[{]
method[uploadLayerPart, return_type[type[UploadLayerPartResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUploadLayerPart, parameter[member[.req... | annotation[@] identifier[Override] Keyword[public] identifier[UploadLayerPartResult] identifier[uploadLayerPart] operator[SEP] identifier[UploadLayerPartRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o... |
public static double computeTauGammaAndDivide(final int start, final int stop,
final double[] x, final double max,
Complex_F64 tau) {
int index = start*2;
double nx = 0;
for (int i = start; i < s... | class class_name[name] begin[{]
method[computeTauGammaAndDivide, return_type[type[double]], modifier[public static], parameter[start, stop, x, max, tau]] begin[{]
local_variable[type[int], index]
local_variable[type[double], nx]
ForStatement(body=BlockStatement(label=None, statements=[L... | Keyword[public] Keyword[static] Keyword[double] identifier[computeTauGammaAndDivide] operator[SEP] Keyword[final] Keyword[int] identifier[start] , Keyword[final] Keyword[int] identifier[stop] , Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[x] , Keyword[final] Keyword[double] identifier[max] ,... |
public void cleanup(boolean reuse, boolean wasInsert)
{
if(currentImage != null)
{
performImageCleanup(currentImage, reuse);
}
if(beforeImage != null)
{
// we always free all resources of the old image
performImageCleanup(beforeIma... | class class_name[name] begin[{]
method[cleanup, return_type[void], modifier[public], parameter[reuse, wasInsert]] begin[{]
if[binary_operation[member[.currentImage], !=, literal[null]]] begin[{]
call[.performImageCleanup, parameter[member[.currentImage], member[.reuse]]]... | Keyword[public] Keyword[void] identifier[cleanup] operator[SEP] Keyword[boolean] identifier[reuse] , Keyword[boolean] identifier[wasInsert] operator[SEP] {
Keyword[if] operator[SEP] identifier[currentImage] operator[!=] Other[null] operator[SEP] {
identifier[performImageCleanup] operator[SEP] identif... |
public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode)
throws JSONException {
return compareJSON(expected, actual, getComparatorForMode(mode));
} | class class_name[name] begin[{]
method[compareJSON, return_type[type[JSONCompareResult]], modifier[public static], parameter[expected, actual, mode]] begin[{]
return[call[.compareJSON, parameter[member[.expected], member[.actual], call[.getComparatorForMode, parameter[member[.mode]]]]]]
end[}]
END[... | Keyword[public] Keyword[static] identifier[JSONCompareResult] identifier[compareJSON] operator[SEP] identifier[JSONObject] identifier[expected] , identifier[JSONObject] identifier[actual] , identifier[JSONCompareMode] identifier[mode] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[return] id... |
private void versionBasedSaveNamespace(boolean force, boolean uncompressed)
throws AccessControlException, IOException {
if (namenodeVersion >= ClientProtocol.SAVENAMESPACE_FORCE) {
namenode.saveNamespace(force, uncompressed);
} else {
namenode.saveNamespace();
}
} | class class_name[name] begin[{]
method[versionBasedSaveNamespace, return_type[void], modifier[private], parameter[force, uncompressed]] begin[{]
if[binary_operation[member[.namenodeVersion], >=, member[ClientProtocol.SAVENAMESPACE_FORCE]]] begin[{]
call[namenode.saveName... | Keyword[private] Keyword[void] identifier[versionBasedSaveNamespace] operator[SEP] Keyword[boolean] identifier[force] , Keyword[boolean] identifier[uncompressed] operator[SEP] Keyword[throws] identifier[AccessControlException] , identifier[IOException] {
Keyword[if] operator[SEP] identifier[namenodeVersion] op... |
public String getDescription() {
if (description != null) {
return description;
}
if (UNKNOWN_ERROR.equals(getCode())) {
return String.format("Received error with code %s", getCode());
}
return "Failed with unknown error";
} | class class_name[name] begin[{]
method[getDescription, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.description], !=, literal[null]]] begin[{]
return[member[.description]]
else begin[{]
None
end[}]
if[... | Keyword[public] identifier[String] identifier[getDescription] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[description] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[description] operator[SEP]
}
Keyword[if] operator[SEP] identifier[UNKNOWN_ERRO... |
protected void moveNode( String workspaceName,
NodeKey key,
Name primaryType,
Set<Name> mixinTypes,
NodeKey oldParent,
NodeKey newParent,
Path new... | class class_name[name] begin[{]
method[moveNode, return_type[void], modifier[protected], parameter[workspaceName, key, primaryType, mixinTypes, oldParent, newParent, newPath, oldPath]] begin[{]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[moveNode] operator[SEP] identifier[String] identifier[workspaceName] , identifier[NodeKey] identifier[key] , identifier[Name] identifier[primaryType] , identifier[Set] operator[<] identifier[Name] operator[>] identifier[mixinTypes] , identifier[NodeKey] identifier[oldPare... |
public OperationFuture<List<DataCenter>> claim(DataCenter... dataCenters) {
return claim(Arrays.asList(dataCenters));
} | class class_name[name] begin[{]
method[claim, return_type[type[OperationFuture]], modifier[public], parameter[dataCenters]] begin[{]
return[call[.claim, parameter[call[Arrays.asList, parameter[member[.dataCenters]]]]]]
end[}]
END[}] | Keyword[public] identifier[OperationFuture] operator[<] identifier[List] operator[<] identifier[DataCenter] operator[>] operator[>] identifier[claim] operator[SEP] identifier[DataCenter] operator[...] identifier[dataCenters] operator[SEP] {
Keyword[return] identifier[claim] operator[SEP] identifier[Arrays] opera... |
private boolean needsNewSession() {
if (sessionCredentials == null) return true;
long timeRemaining = sessionCredentialsExpiration.getTime() - System.currentTimeMillis();
return timeRemaining < (this.refreshThreshold * 1000);
} | class class_name[name] begin[{]
method[needsNewSession, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.sessionCredentials], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
local_variable[type[... | Keyword[private] Keyword[boolean] identifier[needsNewSession] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[sessionCredentials] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[long] identifier[timeRemaining] operator[=] identifier[sessionCredenti... |
public boolean hasNext() {
synchronized (lock) {
try {
return parser.peek() != JsonToken.END_DOCUMENT;
} catch (MalformedJsonException e) {
throw new JsonSyntaxException(e);
} catch (IOException e) {
throw new JsonIOException(e);
}
}
} | class class_name[name] begin[{]
method[hasNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=peek, postfix_operat... | Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[parser] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[!=] identifier[Js... |
public static String findCurrentWordFromCursor(String text, int cursor) {
if (text.length() <= cursor + 1) {
// return last word
if (text.contains(SPACE)) {
if (doWordContainEscapedSpace(text)) {
if (doWordContainOnlyEscapedSpace(text))
... | class class_name[name] begin[{]
method[findCurrentWordFromCursor, return_type[type[String]], modifier[public static], parameter[text, cursor]] begin[{]
if[binary_operation[call[text.length, parameter[]], <=, binary_operation[member[.cursor], +, literal[1]]]] begin[{]
if[... | Keyword[public] Keyword[static] identifier[String] identifier[findCurrentWordFromCursor] operator[SEP] identifier[String] identifier[text] , Keyword[int] identifier[cursor] operator[SEP] {
Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] identi... |
@SuppressWarnings("unchecked")
protected void processInitialCollectorManagerServices() throws InvalidSyntaxException {
ServiceReference<CollectorManager>[] servRefs = (ServiceReference<CollectorManager>[])
bundleContext.getServiceReferences(CollectorManager.class.getName(), null);
... | class class_name[name] begin[{]
method[processInitialCollectorManagerServices, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[ServiceReference], servRefs]
if[binary_operation[member[.servRefs], !=, literal[null]]] begin[{]
ForStatement(body... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[processInitialCollectorManagerServices] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidSyntaxException] {
identifier[ServiceReference] operator[<] identifier[Collector... |
public void setBackgroundIconColorAnimated(final Color color, final int cycleCount) {
if (backgroundIcon == null) {
LOGGER.warn("Background modification skipped because background icon not set!");
return;
}
stopBackgroundIconColorFadeAnimation();
backgroundFadeIco... | class class_name[name] begin[{]
method[setBackgroundIconColorAnimated, return_type[void], modifier[public], parameter[color, cycleCount]] begin[{]
if[binary_operation[member[.backgroundIcon], ==, literal[null]]] begin[{]
call[LOGGER.warn, parameter[literal["Background mo... | Keyword[public] Keyword[void] identifier[setBackgroundIconColorAnimated] operator[SEP] Keyword[final] identifier[Color] identifier[color] , Keyword[final] Keyword[int] identifier[cycleCount] operator[SEP] {
Keyword[if] operator[SEP] identifier[backgroundIcon] operator[==] Other[null] operator[SEP] {
... |
public void setMFAOptions(java.util.Collection<MFAOptionType> mFAOptions) {
if (mFAOptions == null) {
this.mFAOptions = null;
return;
}
this.mFAOptions = new java.util.ArrayList<MFAOptionType>(mFAOptions);
} | class class_name[name] begin[{]
method[setMFAOptions, return_type[void], modifier[public], parameter[mFAOptions]] begin[{]
if[binary_operation[member[.mFAOptions], ==, literal[null]]] begin[{]
assign[THIS[member[None.mFAOptions]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setMFAOptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[MFAOptionType] operator[>] identifier[mFAOptions] operator[SEP] {
Keyword[if] operator[SEP] identifier[mFAOptions] operator[==] Other[n... |
@Override
public void restore(Object context, Bundle bundle) {
Set<Field> fieldsToRestore = FieldUtils.getAllFields(context, Stateful.class);
for (Field field : fieldsToRestore) {
try {
if(!field.isAccessible()) field.setAccessible(true);
Serializable state = bundle.getSerializable(f... | class class_name[name] begin[{]
method[restore, return_type[void], modifier[public], parameter[context, bundle]] begin[{]
local_variable[type[Set], fieldsToRestore]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], ... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[restore] operator[SEP] identifier[Object] identifier[context] , identifier[Bundle] identifier[bundle] operator[SEP] {
identifier[Set] operator[<] identifier[Field] operator[>] identifier[fieldsToRestore] operator[=] identifier[FieldUtil... |
static List<String> sanitizeInput(List<String> words) {
words = words.stream()
.map(s -> s.replaceAll("^\\n+|\\n+$", "")) // CR at beginning/end of line introduced by backslash continuation
.map(s -> s.replaceAll("\\n+", " ")) // CR in middle of word introduced by return inside a quoted string
.collect(Colle... | class class_name[name] begin[{]
method[sanitizeInput, return_type[type[List]], modifier[static], parameter[words]] begin[{]
assign[member[.words], call[words.stream, parameter[]]]
return[member[.words]]
end[}]
END[}] | Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[sanitizeInput] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[words] operator[SEP] {
identifier[words] operator[=] identifier[words] operator[SEP] identifier[stream] operator[SEP] operator... |
public static boolean isGooglebot(HttpServletRequest request) {
@SuppressWarnings("unchecked")
Enumeration<String> headers = request.getHeaders("User-Agent");
while(headers.hasMoreElements()) {
String userAgent = headers.nextElement();
if(userAgent.contains("Googlebot")) {
// Verify through reverse then... | class class_name[name] begin[{]
method[isGooglebot, return_type[type[boolean]], modifier[public static], parameter[request]] begin[{]
local_variable[type[Enumeration], headers]
while[call[headers.hasMoreElements, parameter[]]] begin[{]
local_variable[type[String], userAgent]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isGooglebot] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Enumeration] operator[<] identifier[String] operator[>] ident... |
public static Point2Transform2_F64 transformRectToPixel(CameraPinholeBrown param,
DMatrixRMaj rectify)
{
return ImplRectifyImageOps_F64.transformRectToPixel(param, rectify);
} | class class_name[name] begin[{]
method[transformRectToPixel, return_type[type[Point2Transform2_F64]], modifier[public static], parameter[param, rectify]] begin[{]
return[call[ImplRectifyImageOps_F64.transformRectToPixel, parameter[member[.param], member[.rectify]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Point2Transform2_F64] identifier[transformRectToPixel] operator[SEP] identifier[CameraPinholeBrown] identifier[param] , identifier[DMatrixRMaj] identifier[rectify] operator[SEP] {
Keyword[return] identifier[ImplRectifyImageOps_F64] operator[SEP] identifier[transformRec... |
public void setServerOwner(final String iClusterName, final String iServerName) {
if (iClusterName == null)
throw new IllegalArgumentException("cluster name cannot be null");
synchronized (configuration) {
final ODocument clusters = configuration.field(CLUSTERS);
ODocument cluster = clusters.... | class class_name[name] begin[{]
method[setServerOwner, return_type[void], modifier[public], parameter[iClusterName, iServerName]] begin[{]
if[binary_operation[member[.iClusterName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pref... | Keyword[public] Keyword[void] identifier[setServerOwner] operator[SEP] Keyword[final] identifier[String] identifier[iClusterName] , Keyword[final] identifier[String] identifier[iServerName] operator[SEP] {
Keyword[if] operator[SEP] identifier[iClusterName] operator[==] Other[null] operator[SEP] Keyword[throw] K... |
public UITextField setColors(int bgColor, int cursorColor, int selectColor)
{
setColor(bgColor);
this.cursorColor = cursorColor;
this.selectColor = selectColor;
return this;
} | class class_name[name] begin[{]
method[setColors, return_type[type[UITextField]], modifier[public], parameter[bgColor, cursorColor, selectColor]] begin[{]
call[.setColor, parameter[member[.bgColor]]]
assign[THIS[member[None.cursorColor]], member[.cursorColor]]
as... | Keyword[public] identifier[UITextField] identifier[setColors] operator[SEP] Keyword[int] identifier[bgColor] , Keyword[int] identifier[cursorColor] , Keyword[int] identifier[selectColor] operator[SEP] {
identifier[setColor] operator[SEP] identifier[bgColor] operator[SEP] operator[SEP] Keyword[this] operator[SE... |
@Override
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
super.subjectRepository.createSubject(this.subject, new SubjectRepository.SubjectUseCase() {
@Override
public void onMiss... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000)], member=sleep, postfix_oper... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] Other[1000] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[InterruptedExce... |
private void setupButtons() {
cancelButton = (TextView) findViewById(R.id.cancelButton);
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setResult(CANCELLED);
finish();
}
});
... | class class_name[name] begin[{]
method[setupButtons, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.cancelButton], Cast(expression=MethodInvocation(arguments=[MemberReference(member=cancelButton, postfix_operators=[], prefix_operators=[], qualifier=R.id, selectors=[]... | Keyword[private] Keyword[void] identifier[setupButtons] operator[SEP] operator[SEP] {
identifier[cancelButton] operator[=] operator[SEP] identifier[TextView] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[cancelButton] operator[SEP] operat... |
<T> Class<T> loadClass(String name) throws ClassNotFoundException {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (null == cl) {
cl = ToHelper.class.getClassLoader();
}
return (Class<T>) cl.loadClass(name);
} | class class_name[name] begin[{]
method[loadClass, return_type[type[Class]], modifier[default], parameter[name]] begin[{]
local_variable[type[ClassLoader], cl]
if[binary_operation[literal[null], ==, member[.cl]]] begin[{]
assign[member[.cl], ClassReference(postfix... | operator[<] identifier[T] operator[>] identifier[Class] operator[<] identifier[T] operator[>] identifier[loadClass] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
identifier[ClassLoader] identifier[cl] operator[=] identifier[Thread] operator[S... |
public static int streamableBytes(StreamByteDistributor.StreamState state) {
return max(0, (int) min(state.pendingBytes(), state.windowSize()));
} | class class_name[name] begin[{]
method[streamableBytes, return_type[type[int]], modifier[public static], parameter[state]] begin[{]
return[call[.max, parameter[literal[0], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=pendingBytes, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[static] Keyword[int] identifier[streamableBytes] operator[SEP] identifier[StreamByteDistributor] operator[SEP] identifier[StreamState] identifier[state] operator[SEP] {
Keyword[return] identifier[max] operator[SEP] Other[0] , operator[SEP] Keyword[int] operator[SEP] identifier[min] opera... |
public void marshall(TransformJobSummary transformJobSummary, ProtocolMarshaller protocolMarshaller) {
if (transformJobSummary == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(transformJobSummary.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[transformJobSummary, protocolMarshaller]] begin[{]
if[binary_operation[member[.transformJobSummary], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[TransformJobSummary] identifier[transformJobSummary] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[transformJobSummary] operator[==] Other[null] operator[SEP] {
... |
public T authentication(String username, String password, boolean allowAnyHost) {
if (StringUtils.isNotBlank(username)) {
if (defaultHost == null || StringUtils.isBlank(defaultHost.getHostName())) {
throw new IllegalStateException("Cannot configure authentication when host is not set... | class class_name[name] begin[{]
method[authentication, return_type[type[T]], modifier[public], parameter[username, password, allowAnyHost]] begin[{]
if[call[StringUtils.isNotBlank, parameter[member[.username]]]] begin[{]
if[binary_operation[binary_operation[member[.defau... | Keyword[public] identifier[T] identifier[authentication] operator[SEP] identifier[String] identifier[username] , identifier[String] identifier[password] , Keyword[boolean] identifier[allowAnyHost] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SE... |
@Override
public Prediction _predictRecord(Record r) {
Set<Object> classesSet = knowledgeBase.getModelParameters().getClasses();
AssociativeArray predictionScores = new AssociativeArray();
for(Object theClass : classesSet) {
predictionScores.put(theClass, calculateClassS... | class class_name[name] begin[{]
method[_predictRecord, return_type[type[Prediction]], modifier[public], parameter[r]] begin[{]
local_variable[type[Set], classesSet]
local_variable[type[AssociativeArray], predictionScores]
ForStatement(body=BlockStatement(label=None, statements=[Statemen... | annotation[@] identifier[Override] Keyword[public] identifier[Prediction] identifier[_predictRecord] operator[SEP] identifier[Record] identifier[r] operator[SEP] {
identifier[Set] operator[<] identifier[Object] operator[>] identifier[classesSet] operator[=] identifier[knowledgeBase] operator[SEP] identifier[getM... |
public void writeTo(final PacketOutputStream pos) throws IOException {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(
fractionalSeconds ? "yyyy-MM-dd HH:mm:ss.SSSSSS" : "yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
pos.write(QUOTE);
pos.write(formatter.format(tz).getBytes());
pos.write(QUO... | class class_name[name] begin[{]
method[writeTo, return_type[void], modifier[public], parameter[pos]] begin[{]
local_variable[type[DateTimeFormatter], formatter]
call[pos.write, parameter[member[.QUOTE]]]
call[pos.write, parameter[call[formatter.format, parameter[member[.... | Keyword[public] Keyword[void] identifier[writeTo] operator[SEP] Keyword[final] identifier[PacketOutputStream] identifier[pos] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[DateTimeFormatter] identifier[formatter] operator[=] identifier[DateTimeFormatter] operator[SEP] identifier[ofPattern] o... |
@Override
public void setState(TransferState state) {
super.setState(state);
switch (state) {
case Completed :
fireProgressEvent(ProgressEventType.TRANSFER_COMPLETED_EVENT);
break;
case Canceled:
fireProgressEvent(ProgressEvent... | class class_name[name] begin[{]
method[setState, return_type[void], modifier[public], parameter[state]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setState] operator[SEP] identifier[TransferState] identifier[state] operator[SEP] {
Keyword[super] operator[SEP] identifier[setState] operator[SEP] identifier[state] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[st... |
public void setCustomFields(Map<String, String> fields) {
clearCustomFields();
for (String key : fields.keySet()) {
CustomField f = new CustomField();
f.setName(key);
f.setValue(fields.get(key));
customFields.add(f);
}
} | class class_name[name] begin[{]
method[setCustomFields, return_type[void], modifier[public], parameter[fields]] begin[{]
call[.clearCustomFields, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarato... | Keyword[public] Keyword[void] identifier[setCustomFields] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[fields] operator[SEP] {
identifier[clearCustomFields] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identif... |
@Nonnull
public static SimpleURL getStreamURL (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
@Nonnull @Nonempty final String sURL)
{
ValueEnforcer.notNull (aRequestScope, "RequestScope");
ValueEnforcer.notEmpty (sURL, "URL");
// If the URL is abso... | class class_name[name] begin[{]
method[getStreamURL, return_type[type[SimpleURL]], modifier[public static], parameter[aRequestScope, sURL]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aRequestScope], literal["RequestScope"]]]
call[ValueEnforcer.notEmpty, parameter[mem... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[SimpleURL] identifier[getStreamURL] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IRequestWebScopeWithoutResponse] identifier[aRequestScope] , annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Ke... |
public com.google.api.ads.adwords.axis.v201809.cm.ProductBiddingCategory getParentDimensionValue() {
return parentDimensionValue;
} | class class_name[name] begin[{]
method[getParentDimensionValue, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.parentDimensionValue]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[ProductBiddingCategory] identifier[getPare... |
public void setJobsNotFound(java.util.Collection<String> jobsNotFound) {
if (jobsNotFound == null) {
this.jobsNotFound = null;
return;
}
this.jobsNotFound = new java.util.ArrayList<String>(jobsNotFound);
} | class class_name[name] begin[{]
method[setJobsNotFound, return_type[void], modifier[public], parameter[jobsNotFound]] begin[{]
if[binary_operation[member[.jobsNotFound], ==, literal[null]]] begin[{]
assign[THIS[member[None.jobsNotFound]], literal[null]]
retur... | Keyword[public] Keyword[void] identifier[setJobsNotFound] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[jobsNotFound] operator[SEP] {
Keyword[if] operator[SEP] identifier[jobsNotFound] operator[==] Other[nu... |
public boolean matches(Object obj) {
if (!(obj instanceof Exception))
return false;
Exception exception = (Exception) obj;
return exception.getCause() == null;
} | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[public], parameter[obj]] begin[{]
if[binary_operation[member[.obj], instanceof, type[Exception]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Exception]... | Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Exception] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier... |
private final int appendNode(int w0, int w1, int w2, int w3)
{
// A decent compiler may inline this.
int slotnumber = nodes.appendSlot(w0, w1, w2, w3);
if (DEBUG) System.out.println(slotnumber+": "+w0+" "+w1+" "+w2+" "+w3);
if (previousSiblingWas... | class class_name[name] begin[{]
method[appendNode, return_type[type[int]], modifier[final private], parameter[w0, w1, w2, w3]] begin[{]
local_variable[type[int], slotnumber]
if[member[.DEBUG]] begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[bina... | Keyword[private] Keyword[final] Keyword[int] identifier[appendNode] operator[SEP] Keyword[int] identifier[w0] , Keyword[int] identifier[w1] , Keyword[int] identifier[w2] , Keyword[int] identifier[w3] operator[SEP] {
Keyword[int] identifier[slotnumber] operator[=] identifier[nodes] operator[SEP] identifier[app... |
public boolean matchesPosTagRegex(String posTagRegex) {
Pattern pattern = Pattern.compile(posTagRegex);
boolean found = false;
for (AnalyzedToken reading : anTokReadings) {
if (reading.getPOSTag() != null) {
found = pattern.matcher(reading.getPOSTag()).matches();
if (found) {
... | class class_name[name] begin[{]
method[matchesPosTagRegex, return_type[type[boolean]], modifier[public], parameter[posTagRegex]] begin[{]
local_variable[type[Pattern], pattern]
local_variable[type[boolean], found]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(cond... | Keyword[public] Keyword[boolean] identifier[matchesPosTagRegex] operator[SEP] identifier[String] identifier[posTagRegex] operator[SEP] {
identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[posTagRegex] operator[SEP] operator[SEP] Keyw... |
@Override
public UnixSshPath relativize( Path other ) {
if ( other == null ) {
throw new NullPointerException();
}
if ( !(other instanceof UnixSshPath) ) {
throw new ProviderMismatchException();
}
UnixSshPath unixOther = (UnixSshPath) other;
i... | class class_name[name] begin[{]
method[relativize, return_type[type[UnixSshPath]], modifier[public], parameter[other]] begin[{]
if[binary_operation[member[.other], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments... | annotation[@] identifier[Override] Keyword[public] identifier[UnixSshPath] identifier[relativize] operator[SEP] identifier[Path] identifier[other] operator[SEP] {
Keyword[if] operator[SEP] identifier[other] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerExce... |
protected Color getTextForeground(boolean selected) {
Color c = UIManager.getColor(selected ? "SimpleInternalFrame.activeTitleForeground"
: "SimpleInternalFrame.inactiveTitleForeground");
if (c != null) {
return c;
}
return UIManager.getColor(selected ? "Inter... | class class_name[name] begin[{]
method[getTextForeground, return_type[type[Color]], modifier[protected], parameter[selected]] begin[{]
local_variable[type[Color], c]
if[binary_operation[member[.c], !=, literal[null]]] begin[{]
return[member[.c]]
else begin[{]
None
... | Keyword[protected] identifier[Color] identifier[getTextForeground] operator[SEP] Keyword[boolean] identifier[selected] operator[SEP] {
identifier[Color] identifier[c] operator[=] identifier[UIManager] operator[SEP] identifier[getColor] operator[SEP] identifier[selected] operator[?] literal[String] operator[:] l... |
public static vpnglobal_vpnintranetapplication_binding[] get_filtered(nitro_service service, String filter) throws Exception{
vpnglobal_vpnintranetapplication_binding obj = new vpnglobal_vpnintranetapplication_binding();
options option = new options();
option.set_filter(filter);
vpnglobal_vpnintranetapplication... | class class_name[name] begin[{]
method[get_filtered, return_type[type[vpnglobal_vpnintranetapplication_binding]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[vpnglobal_vpnintranetapplication_binding], obj]
local_variable[type[options], option]
... | Keyword[public] Keyword[static] identifier[vpnglobal_vpnintranetapplication_binding] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnglobal... |
@Override
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException {
if (inputType.length > 1)
throw new InvalidKerasConfigurationException(
"Keras LRN layer accepts only one input (received " + inputType.length + ")");
... | class class_name[name] begin[{]
method[getOutputType, return_type[type[InputType]], modifier[public], parameter[inputType]] begin[{]
if[binary_operation[member[inputType.length], >, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(... | annotation[@] identifier[Override] Keyword[public] identifier[InputType] identifier[getOutputType] operator[SEP] identifier[InputType] operator[...] identifier[inputType] operator[SEP] Keyword[throws] identifier[InvalidKerasConfigurationException] {
Keyword[if] operator[SEP] identifier[inputType] operator[SEP] i... |
public com.google.protobuf.UInt32Value getConfigVersion() {
return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_;
} | class class_name[name] begin[{]
method[getConfigVersion, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=configVersion_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Lite... | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[UInt32Value] identifier[getConfigVersion] operator[SEP] operator[SEP] {
Keyword[return] identifier[configVersion_] operator[==] Other[null] operator[?] identifier[com] operator[SEP] identi... |
private static List<Integer> parseArray(String value, ValueParser parser){
final List<Integer> values = new ArrayList<>();
final List<String> parts = StrUtil.split(value, StrUtil.C_COMMA);
for (String part : parts) {
CollectionUtil.addAllIfNotContains(values, parseStep(part, parser));
}
return val... | class class_name[name] begin[{]
method[parseArray, return_type[type[List]], modifier[private static], parameter[value, parser]] begin[{]
local_variable[type[List], values]
local_variable[type[List], parts]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expr... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Integer] operator[>] identifier[parseArray] operator[SEP] identifier[String] identifier[value] , identifier[ValueParser] identifier[parser] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[Integer] operator[>] identif... |
private void flush() {
try {
parent.append(future.get(60, TimeUnit.SECONDS).collect(this));
parent.append(buffer);
if (parent instanceof AsyncAppendable) {
((AsyncAppendable) parent).flush();
}
} catch (Exception e) {
throw new ... | class class_name[name] begin[{]
method[flush, return_type[void], modifier[private], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60)... | Keyword[private] Keyword[void] identifier[flush] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[parent] operator[SEP] identifier[append] operator[SEP] identifier[future] operator[SEP] identifier[get] operator[SEP] Other[60] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SE... |
private void updateTaskProgress() {
m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID);
m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS, m_progressMessage);
m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS_TIME, Long.toString(m_lastProgressTimestamp));
TaskManagerService.ins... | class class_name[name] begin[{]
method[updateTaskProgress, return_type[void], modifier[private], parameter[]] begin[{]
call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_EXECUTOR], member[.m_hostID]]]
call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_P... | Keyword[private] Keyword[void] identifier[updateTaskProgress] operator[SEP] operator[SEP] {
identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_EXECUTOR] , identifier[m_hostID] operator[SEP] operator[SEP] identifier[m_taskRecord] oper... |
public static void print(Matrix m, String format) {
print(m, DEFAULT_CONTROL, new FormatterNumberFormatter(format, Locale.getDefault()));
} | class class_name[name] begin[{]
method[print, return_type[void], modifier[public static], parameter[m, format]] begin[{]
call[.print, parameter[member[.m], member[.DEFAULT_CONTROL], ClassCreator(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[Matrix] identifier[m] , identifier[String] identifier[format] operator[SEP] {
identifier[print] operator[SEP] identifier[m] , identifier[DEFAULT_CONTROL] , Keyword[new] identifier[FormatterNumberFormatter] operator[SEP] i... |
@NonNull
protected InputStream openFile(@NonNull Artwork artwork) throws IOException {
Context context = getContext();
if (context == null) {
throw new IOException();
}
Uri persistentUri = artwork.getPersistentUri();
if (persistentUri == null) {
throw ... | class class_name[name] begin[{]
method[openFile, return_type[type[InputStream]], modifier[protected], parameter[artwork]] begin[{]
local_variable[type[Context], context]
if[binary_operation[member[.context], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator... | annotation[@] identifier[NonNull] Keyword[protected] identifier[InputStream] identifier[openFile] operator[SEP] annotation[@] identifier[NonNull] identifier[Artwork] identifier[artwork] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Context] identifier[context] operator[=] identifier[getConte... |
private List<Serializable> getSelectedValues(List<IdName> values, List<Serializable> defaultValues) {
List<Serializable> selectedValues = new ArrayList<Serializable>();
if (defaultValues == null) {
return selectedValues;
}
for (Serializable s : defaultValues) {
fo... | class class_name[name] begin[{]
method[getSelectedValues, return_type[type[List]], modifier[private], parameter[values, defaultValues]] begin[{]
local_variable[type[List], selectedValues]
if[binary_operation[member[.defaultValues], ==, literal[null]]] begin[{]
return[member[... | Keyword[private] identifier[List] operator[<] identifier[Serializable] operator[>] identifier[getSelectedValues] operator[SEP] identifier[List] operator[<] identifier[IdName] operator[>] identifier[values] , identifier[List] operator[<] identifier[Serializable] operator[>] identifier[defaultValues] operator[SEP] {
... |
public void onError(def<Void> handler) {
while (!inProcess) {
// block
Style.sleep(1);
}
synchronized (lock) {
this.handler = handler;
if (err != null) {
... | class class_name[name] begin[{]
method[onError, return_type[void], modifier[public], parameter[handler]] begin[{]
while[member[.inProcess]] begin[{]
call[Style.sleep, parameter[literal[1]]]
end[}]
SYNCHRONIZED[member[.lock]] BEGIN[{]
... | Keyword[public] Keyword[void] identifier[onError] operator[SEP] identifier[def] operator[<] identifier[Void] operator[>] identifier[handler] operator[SEP] {
Keyword[while] operator[SEP] operator[!] identifier[inProcess] operator[SEP] {
identifier[Style] operator[SEP] identifier[sleep] operator[SEP] Ot... |
public T getDefaultInstance()
{
Object result;
// For basic Java types return the standard default value. For others, try the default constructor.
switch (type)
{
case BOOLEAN:
result = DEFAULT_BOOLEAN;
break;
case CHARACTER:
resu... | class class_name[name] begin[{]
method[getDefaultInstance, return_type[type[T]], modifier[public], parameter[]] begin[{]
local_variable[type[Object], result]
SwitchStatement(cases=[SwitchStatementCase(case=['BOOLEAN'], statements=[StatementExpression(expression=Assignment(expressionl=MemberRefe... | Keyword[public] identifier[T] identifier[getDefaultInstance] operator[SEP] operator[SEP] {
identifier[Object] identifier[result] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[BOOLEAN] operator[:] identifier[result] operator[=] identifier[DEFAULT... |
private Stream<Triple> memberRelations(final FedoraResource container) throws RepositoryException {
final org.apache.jena.graph.Node memberRelation;
if (container.hasProperty(LDP_HAS_MEMBER_RELATION)) {
final Property property = getJcrNode(container).getProperty(LDP_HAS_MEMBER_RELATION);
... | class class_name[name] begin[{]
method[memberRelations, return_type[type[Stream]], modifier[private], parameter[container]] begin[{]
local_variable[type[org], memberRelation]
if[call[container.hasProperty, parameter[member[.LDP_HAS_MEMBER_RELATION]]]] begin[{]
local_variable... | Keyword[private] identifier[Stream] operator[<] identifier[Triple] operator[>] identifier[memberRelations] operator[SEP] Keyword[final] identifier[FedoraResource] identifier[container] operator[SEP] Keyword[throws] identifier[RepositoryException] {
Keyword[final] identifier[org] operator[SEP] identifier[apache] ... |
public Attribute getChild(String attrName) {
Iterable<Attribute> attrParts = getEntities(CHILDREN, Attribute.class);
return Streams.stream(attrParts)
.filter(attrPart -> attrPart.getName().equals(attrName))
.findFirst()
.orElse(null);
} | class class_name[name] begin[{]
method[getChild, return_type[type[Attribute]], modifier[public], parameter[attrName]] begin[{]
local_variable[type[Iterable], attrParts]
return[call[Streams.stream, parameter[member[.attrParts]]]]
end[}]
END[}] | Keyword[public] identifier[Attribute] identifier[getChild] operator[SEP] identifier[String] identifier[attrName] operator[SEP] {
identifier[Iterable] operator[<] identifier[Attribute] operator[>] identifier[attrParts] operator[=] identifier[getEntities] operator[SEP] identifier[CHILDREN] , identifier[Attribute]... |
private List<MethodNode> findMacroMethods(String methodName, List<Expression> callArguments) {
List<MethodNode> methods = MacroMethodsCache.get(classLoader).get(methodName);
if (methods == null) {
// Not a macro call
return Collections.emptyList();
}
ClassNode[]... | class class_name[name] begin[{]
method[findMacroMethods, return_type[type[List]], modifier[private], parameter[methodName, callArguments]] begin[{]
local_variable[type[List], methods]
if[binary_operation[member[.methods], ==, literal[null]]] begin[{]
return[call[Collections.... | Keyword[private] identifier[List] operator[<] identifier[MethodNode] operator[>] identifier[findMacroMethods] operator[SEP] identifier[String] identifier[methodName] , identifier[List] operator[<] identifier[Expression] operator[>] identifier[callArguments] operator[SEP] {
identifier[List] operator[<] identifie... |
final MemorySegment getNextBuffer() {
// check if the list directly offers memory
int s = this.availableMemory.size();
if (s > 0) {
return this.availableMemory.remove(s-1);
}
// check if there are write behind buffers that actually are to be used for the hash table
if (this.writeBehindBuffersAvailable... | class class_name[name] begin[{]
method[getNextBuffer, return_type[type[MemorySegment]], modifier[final], parameter[]] begin[{]
local_variable[type[int], s]
if[binary_operation[member[.s], >, literal[0]]] begin[{]
return[THIS[member[None.availableMemory]call[None.remove, para... | Keyword[final] identifier[MemorySegment] identifier[getNextBuffer] operator[SEP] operator[SEP] {
Keyword[int] identifier[s] operator[=] Keyword[this] operator[SEP] identifier[availableMemory] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator... |
private void generateImmutableToBuilder() {
if (data.isBuilderGenerated()) {
if (data.isConstructable()) {
List<PropertyGen> nonDerived = nonDerivedProperties();
if (nonDerived.size() > 0 || !data.isTypeFinal()) {
addLine(1, "/**");
... | class class_name[name] begin[{]
method[generateImmutableToBuilder, return_type[void], modifier[private], parameter[]] begin[{]
if[call[data.isBuilderGenerated, parameter[]]] begin[{]
if[call[data.isConstructable, parameter[]]] begin[{]
local_variable[type... | Keyword[private] Keyword[void] identifier[generateImmutableToBuilder] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[isBuilderGenerated] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[is... |
@Override
public List<CPDefinitionGroupedEntry> getCPDefinitionGroupedEntriesByUuidAndCompanyId(
String uuid, long companyId) {
return cpDefinitionGroupedEntryPersistence.findByUuid_C(uuid, companyId);
} | class class_name[name] begin[{]
method[getCPDefinitionGroupedEntriesByUuidAndCompanyId, return_type[type[List]], modifier[public], parameter[uuid, companyId]] begin[{]
return[call[cpDefinitionGroupedEntryPersistence.findByUuid_C, parameter[member[.uuid], member[.companyId]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionGroupedEntry] operator[>] identifier[getCPDefinitionGroupedEntriesByUuidAndCompanyId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] {
Keyword[return] ide... |
public void setCPDefinitionVirtualSettingLocalService(
com.liferay.commerce.product.type.virtual.service.CPDefinitionVirtualSettingLocalService cpDefinitionVirtualSettingLocalService) {
this.cpDefinitionVirtualSettingLocalService = cpDefinitionVirtualSettingLocalService;
} | class class_name[name] begin[{]
method[setCPDefinitionVirtualSettingLocalService, return_type[void], modifier[public], parameter[cpDefinitionVirtualSettingLocalService]] begin[{]
assign[THIS[member[None.cpDefinitionVirtualSettingLocalService]], member[.cpDefinitionVirtualSettingLocalService]]
... | Keyword[public] Keyword[void] identifier[setCPDefinitionVirtualSettingLocalService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[type] operator[SEP] identifier[virtual] operator[SEP] identifier[service] oper... |
public static Predicate greaterThan(String attribute, Comparable value) {
return new GreaterLessPredicate(attribute, value, false, false);
} | class class_name[name] begin[{]
method[greaterThan, return_type[type[Predicate]], modifier[public static], parameter[attribute, value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=... | Keyword[public] Keyword[static] identifier[Predicate] identifier[greaterThan] operator[SEP] identifier[String] identifier[attribute] , identifier[Comparable] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[GreaterLessPredicate] operator[SEP] identifier[attribute] , identifier[value] ,... |
@Override
public void close() {
log.debug("Close");
if (dataSource != null) {
try {
dataSource.close();
} catch (IOException e) {
log.error("Channel close {}", e);
} finally {
if (frames != null) {
... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
call[log.debug, parameter[literal["Close"]]]
if[binary_operation[member[.dataSource], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(express... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataSource] operator[!=] Other[null] operator[SEP] {
... |
public static String removeStartingChars(String s, char c) {
int lastToRemove = -1;
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == c) {
lastToRemove = i;
continue;
}
if (s.charAt(i) != c) {
break;
... | class class_name[name] begin[{]
method[removeStartingChars, return_type[type[String]], modifier[public static], parameter[s, c]] begin[{]
local_variable[type[int], lastToRemove]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocat... | Keyword[public] Keyword[static] identifier[String] identifier[removeStartingChars] operator[SEP] identifier[String] identifier[s] , Keyword[char] identifier[c] operator[SEP] {
Keyword[int] identifier[lastToRemove] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[... |
public void setPositionType(com.google.api.ads.admanager.axis.v201805.VideoPositionType positionType) {
this.positionType = positionType;
} | class class_name[name] begin[{]
method[setPositionType, return_type[void], modifier[public], parameter[positionType]] begin[{]
assign[THIS[member[None.positionType]], member[.positionType]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setPositionType] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201805] operator[SEP] identifier[VideoPosition... |
void writeSomeValueRestriction(String propertyUri, String rangeUri,
Resource bnode) throws RDFHandlerException {
this.rdfWriter.writeTripleValueObject(bnode, RdfWriter.RDF_TYPE,
RdfWriter.OWL_RESTRICTION);
this.rdfWriter.writeTripleUriObject(bnode, RdfWriter.OWL_ON_PROPERTY,
propertyUri);
this.rdfWrite... | class class_name[name] begin[{]
method[writeSomeValueRestriction, return_type[void], modifier[default], parameter[propertyUri, rangeUri, bnode]] begin[{]
THIS[member[None.rdfWriter]call[None.writeTripleValueObject, parameter[member[.bnode], member[RdfWriter.RDF_TYPE], member[RdfWriter.OWL_RESTR... | Keyword[void] identifier[writeSomeValueRestriction] operator[SEP] identifier[String] identifier[propertyUri] , identifier[String] identifier[rangeUri] , identifier[Resource] identifier[bnode] operator[SEP] Keyword[throws] identifier[RDFHandlerException] {
Keyword[this] operator[SEP] identifier[rdfWriter] opera... |
public <T extends Number> void compareFloatingPoint(
Local<Integer> target, Local<T> a, Local<T> b, int nanValue) {
Rop rop;
if (nanValue == 1) {
rop = Rops.opCmpg(a.type.ropType);
} else if (nanValue == -1) {
rop = Rops.opCmpl(a.type.ropType);
} else ... | class class_name[name] begin[{]
method[compareFloatingPoint, return_type[void], modifier[public], parameter[target, a, b, nanValue]] begin[{]
local_variable[type[Rop], rop]
if[binary_operation[member[.nanValue], ==, literal[1]]] begin[{]
assign[member[.rop], call... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] Keyword[void] identifier[compareFloatingPoint] operator[SEP] identifier[Local] operator[<] identifier[Integer] operator[>] identifier[target] , identifier[Local] operator[<] identifier[T] operator[>] identifier[a] , identifier[L... |
@Override
public void position(long pos) {
log.debug("position: {}", pos);
currentFrame = getFrame(pos);
log.debug("Setting current sample: {}", currentFrame);
} | class class_name[name] begin[{]
method[position, return_type[void], modifier[public], parameter[pos]] begin[{]
call[log.debug, parameter[literal["position: {}"], member[.pos]]]
assign[member[.currentFrame], call[.getFrame, parameter[member[.pos]]]]
call[log.debug... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[position] operator[SEP] Keyword[long] identifier[pos] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pos] operator[SEP] operator[SEP] identifier[currentFrame] operator[=] ident... |
public void marshall(DeleteMethodRequest deleteMethodRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteMethodRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteMethodRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteMethodRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteMethodRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteMethodRequest] identifier[deleteMethodRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteMethodRequest] operator[==] Other[null] operator[SEP] {
... |
public static void visitPreOrder(
Node node, Visitor visitor, Predicate<Node> traverseChildrenPred) {
visitor.visit(node);
if (traverseChildrenPred.apply(node)) {
for (Node c = node.getFirstChild(); c != null; c = c.getNext()) {
visitPreOrder(c, visitor, traverseChildrenPred);
}
}... | class class_name[name] begin[{]
method[visitPreOrder, return_type[void], modifier[public static], parameter[node, visitor, traverseChildrenPred]] begin[{]
call[visitor.visit, parameter[member[.node]]]
if[call[traverseChildrenPred.apply, parameter[member[.node]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[visitPreOrder] operator[SEP] identifier[Node] identifier[node] , identifier[Visitor] identifier[visitor] , identifier[Predicate] operator[<] identifier[Node] operator[>] identifier[traverseChildrenPred] operator[SEP] {
identifier[visitor] operator[SEP] i... |
public ISarlInterfaceBuilder addSarlInterface(String name) {
ISarlInterfaceBuilder builder = this.iSarlInterfaceBuilderProvider.get();
builder.eInit(getSarlAgent(), name, getTypeResolutionContext());
return builder;
} | class class_name[name] begin[{]
method[addSarlInterface, return_type[type[ISarlInterfaceBuilder]], modifier[public], parameter[name]] begin[{]
local_variable[type[ISarlInterfaceBuilder], builder]
call[builder.eInit, parameter[call[.getSarlAgent, parameter[]], member[.name], call[.getTyp... | Keyword[public] identifier[ISarlInterfaceBuilder] identifier[addSarlInterface] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[ISarlInterfaceBuilder] identifier[builder] operator[=] Keyword[this] operator[SEP] identifier[iSarlInterfaceBuilderProvider] operator[SEP] identifier[get] op... |
@Nonnull
public static <T1, T2, R> LBiObjCharFunctionBuilder<T1, T2, R> biObjCharFunction(Consumer<LBiObjCharFunction<T1, T2, R>> consumer) {
return new LBiObjCharFunctionBuilder(consumer);
} | class class_name[name] begin[{]
method[biObjCharFunction, return_type[type[LBiObjCharFunctionBuilder]], modifier[public static], parameter[consumer]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[LBiObjCharFunctionBuilder] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[biObjCharFunction] operator[SEP] identifier[Consumer] ope... |
public Transactions getAccountTransactions(final String accountCode) {
return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Transactions.TRANSACTIONS_RESOURCE,
Transactions.class, new QueryParams());
} | class class_name[name] begin[{]
method[getAccountTransactions, return_type[type[Transactions]], modifier[public], parameter[accountCode]] begin[{]
return[call[.doGET, parameter[binary_operation[binary_operation[binary_operation[member[Accounts.ACCOUNTS_RESOURCE], +, literal["/"]], +, member[.accountCod... | Keyword[public] identifier[Transactions] identifier[getAccountTransactions] operator[SEP] Keyword[final] identifier[String] identifier[accountCode] operator[SEP] {
Keyword[return] identifier[doGET] operator[SEP] identifier[Accounts] operator[SEP] identifier[ACCOUNTS_RESOURCE] operator[+] literal[String] operator... |
public void generateProxy(Element element) {
try {
getClassBuilder(element)
.buildProxyClass()
.build()
.writeTo(filer);
} catch (Exception ex) {
messager.printMessage(Diagnostic.Kind.WARNING, "Error while generat... | class class_name[name] begin[{]
method[generateProxy, return_type[void], modifier[public], parameter[element]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], m... | Keyword[public] Keyword[void] identifier[generateProxy] operator[SEP] identifier[Element] identifier[element] operator[SEP] {
Keyword[try] {
identifier[getClassBuilder] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[buildProxyClass] operator[SEP] operator[SEP] operator[SEP] i... |
public void logInfo(Object[] message,Throwable throwable)
{
this.log(LogLevel.INFO,message,throwable);
} | class class_name[name] begin[{]
method[logInfo, return_type[void], modifier[public], parameter[message, throwable]] begin[{]
THIS[call[None.log, parameter[member[LogLevel.INFO], member[.message], member[.throwable]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[logInfo] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] {
Keyword[this] operator[SEP] identifier[log] operator[SEP] identifier[LogLevel] operator[SEP] identifier[INFO] , identi... |
protected Response getConfiguration(final String extensionId, final Sid accountSid, final MediaType responseType) {
//Parameter "extensionId" could be the extension Sid or extension name.
ExtensionConfiguration extensionConfiguration = null;
ExtensionConfiguration extensionAccountConfiguration ... | class class_name[name] begin[{]
method[getConfiguration, return_type[type[Response]], modifier[protected], parameter[extensionId, accountSid, responseType]] begin[{]
local_variable[type[ExtensionConfiguration], extensionConfiguration]
local_variable[type[ExtensionConfiguration], extensionAccoun... | Keyword[protected] identifier[Response] identifier[getConfiguration] operator[SEP] Keyword[final] identifier[String] identifier[extensionId] , Keyword[final] identifier[Sid] identifier[accountSid] , Keyword[final] identifier[MediaType] identifier[responseType] operator[SEP] {
identifier[ExtensionConfiguration]... |
@Override
public List<String> getTrailerNames() {
HttpTrailers trailers = message.getTrailers();
if (trailers != null)
return trailers.getAllHeaderNames();
else
return null;
} | class class_name[name] begin[{]
method[getTrailerNames, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[HttpTrailers], trailers]
if[binary_operation[member[.trailers], !=, literal[null]]] begin[{]
return[call[trailers.getAllHeaderNames, parameter[]]]... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getTrailerNames] operator[SEP] operator[SEP] {
identifier[HttpTrailers] identifier[trailers] operator[=] identifier[message] operator[SEP] identifier[getTrailers] operator[SEP] operator[SEP] ... |
protected void encodeInvalidData(final FacesContext context, final Sheet sheet, final WidgetBuilder wb)
throws IOException {
wb.attr("errors", sheet.getInvalidDataValue());
} | class class_name[name] begin[{]
method[encodeInvalidData, return_type[void], modifier[protected], parameter[context, sheet, wb]] begin[{]
call[wb.attr, parameter[literal["errors"], call[sheet.getInvalidDataValue, parameter[]]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[encodeInvalidData] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[WidgetBuilder] identifier[wb] operator[SEP] Keyword[throws] identifier[IOException] {
identif... |
@Override
public DisassociateRouteTableResult disassociateRouteTable(DisassociateRouteTableRequest request) {
request = beforeClientExecution(request);
return executeDisassociateRouteTable(request);
} | class class_name[name] begin[{]
method[disassociateRouteTable, return_type[type[DisassociateRouteTableResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDisassociateRouteTable, ... | annotation[@] identifier[Override] Keyword[public] identifier[DisassociateRouteTableResult] identifier[disassociateRouteTable] operator[SEP] identifier[DisassociateRouteTableRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[req... |
public static MaskedText maskInUrl(String url){
MaskedText result = new MaskedText();
result.setClearText(url);
result.setText(url);
result.setMasked(null);
if (url != null){
Matcher urlMatcher = URL_PATTERN.matcher(url);
if (urlMatcher.find()) {
Matcher pwdMatcher = PASSWORD_IN_URL_PATT... | class class_name[name] begin[{]
method[maskInUrl, return_type[type[MaskedText]], modifier[public static], parameter[url]] begin[{]
local_variable[type[MaskedText], result]
call[result.setClearText, parameter[member[.url]]]
call[result.setText, parameter[member[.url]]]
... | Keyword[public] Keyword[static] identifier[MaskedText] identifier[maskInUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] {
identifier[MaskedText] identifier[result] operator[=] Keyword[new] identifier[MaskedText] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identi... |
public HttpComponentsClientHttpRequestFactory getObject() throws Exception {
Assert.notNull(credentials, "User credentials not set properly!");
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient) {
@Override
prot... | class class_name[name] begin[{]
method[getObject, return_type[type[HttpComponentsClientHttpRequestFactory]], modifier[public], parameter[]] begin[{]
call[Assert.notNull, parameter[member[.credentials], literal["User credentials not set properly!"]]]
local_variable[type[HttpComponentsCli... | Keyword[public] identifier[HttpComponentsClientHttpRequestFactory] identifier[getObject] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[credentials] , literal[String] operator[SEP] operator[SEP] identifier[HttpCom... |
private void initComponents()
{
fileChooser = new javax.swing.JFileChooser();
jLabel1 = new javax.swing.JLabel();
txtInputDir = new javax.swing.JTextField();
btCancel = new javax.swing.JButton();
btOk = new javax.swing.JButton();
btSearchInputDir = new javax.swing.JButton();
pbImport = ne... | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.fileChooser], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=Re... | Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[fileChooser] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JFileChooser] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel1] operator[=] Keyword[new] ... |
private String getObjectUrl( CPath path )
{
String containerUrl = getCurrentContainerUrl();
return containerUrl + path.getUrlEncoded();
} | class class_name[name] begin[{]
method[getObjectUrl, return_type[type[String]], modifier[private], parameter[path]] begin[{]
local_variable[type[String], containerUrl]
return[binary_operation[member[.containerUrl], +, call[path.getUrlEncoded, parameter[]]]]
end[}]
END[}] | Keyword[private] identifier[String] identifier[getObjectUrl] operator[SEP] identifier[CPath] identifier[path] operator[SEP] {
identifier[String] identifier[containerUrl] operator[=] identifier[getCurrentContainerUrl] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[containerUrl] operator[+] i... |
public final ListFindingTypeStatsResponse listFindingTypeStats(String parent) {
ListFindingTypeStatsRequest request =
ListFindingTypeStatsRequest.newBuilder().setParent(parent).build();
return listFindingTypeStats(request);
} | class class_name[name] begin[{]
method[listFindingTypeStats, return_type[type[ListFindingTypeStatsResponse]], modifier[final public], parameter[parent]] begin[{]
local_variable[type[ListFindingTypeStatsRequest], request]
return[call[.listFindingTypeStats, parameter[member[.request]]]]
end[}... | Keyword[public] Keyword[final] identifier[ListFindingTypeStatsResponse] identifier[listFindingTypeStats] operator[SEP] identifier[String] identifier[parent] operator[SEP] {
identifier[ListFindingTypeStatsRequest] identifier[request] operator[=] identifier[ListFindingTypeStatsRequest] operator[SEP] identifier[new... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Empty, OperationMetadata> deleteDatasetAsync(DatasetName name) {
DeleteDatasetRequest request =
DeleteDatasetRequest.newBuilder().setName(name == null ? null : name.toSt... | class class_name[name] begin[{]
method[deleteDatasetAsync, return_type[type[OperationFuture]], modifier[final public], parameter[name]] begin[{]
local_variable[type[DeleteDatasetRequest], request]
return[call[.deleteDatasetAsync, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[OperationMetadata] operator[>] identifier[deleteDatasetAsync] operator[SEP] identifier[DatasetName] identifier[name] operator[SEP] {
... |
@Override
public synchronized void addOrUpdateMessages(ApptentiveMessage... apptentiveMessages) {
fetchEntries();
for (ApptentiveMessage apptentiveMessage : apptentiveMessages) {
MessageEntry existing = findMessageEntry(apptentiveMessage);
if (existing != null) {
// Update
existing.id = apptentiveMe... | class class_name[name] begin[{]
method[addOrUpdateMessages, return_type[void], modifier[synchronized public], parameter[apptentiveMessages]] begin[{]
call[.fetchEntries, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declar... | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[addOrUpdateMessages] operator[SEP] identifier[ApptentiveMessage] operator[...] identifier[apptentiveMessages] operator[SEP] {
identifier[fetchEntries] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[... |
@Override
public void visitCode(Code obj) {
stack.resetForMethodEntry(this);
toStringRegisters.clear();
super.visitCode(obj);
} | class class_name[name] begin[{]
method[visitCode, return_type[void], modifier[public], parameter[obj]] begin[{]
call[stack.resetForMethodEntry, parameter[THIS[]]]
call[toStringRegisters.clear, parameter[]]
SuperMethodInvocation(arguments=[MemberReference(member=o... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitCode] operator[SEP] identifier[Code] identifier[obj] operator[SEP] {
identifier[stack] operator[SEP] identifier[resetForMethodEntry] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[toStringRegisters] operator[SEP]... |
@SuppressWarnings("deprecation")
MenuItem findItemWithShortcutForKey(int keyCode, KeyEvent event) {
// Get all items that can be associated directly or indirectly with the keyCode
ArrayList<MenuItem> items = mTempShortcutItemList;
items.clear();
findItemsWithShortcutForKey(items, key... | class class_name[name] begin[{]
method[findItemWithShortcutForKey, return_type[type[MenuItem]], modifier[default], parameter[keyCode, event]] begin[{]
local_variable[type[ArrayList], items]
call[items.clear, parameter[]]
call[.findItemsWithShortcutForKey, parameter[membe... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[MenuItem] identifier[findItemWithShortcutForKey] operator[SEP] Keyword[int] identifier[keyCode] , identifier[KeyEvent] identifier[event] operator[SEP] {
identifier[ArrayList] operator[<] identifier[MenuItem] operat... |
public static Expression constant(final char value) {
return new Expression(Type.CHAR_TYPE, Feature.CHEAP) {
@Override
protected void doGen(CodeBuilder mv) {
mv.pushInt(value);
}
};
} | class class_name[name] begin[{]
method[constant, return_type[type[Expression]], modifier[public static], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=CHAR_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), MemberReference(member=CHEAP, po... | Keyword[public] Keyword[static] identifier[Expression] identifier[constant] operator[SEP] Keyword[final] Keyword[char] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[Expression] operator[SEP] identifier[Type] operator[SEP] identifier[CHAR_TYPE] , identifier[Feature] operator[SEP] iden... |
public void fillParams(CmsGallerySearchBean search) {
m_localeSelection.setFormValue(search.getLocale(), false);
m_searchInput.setFormValueAsString(search.getQuery());
m_includeExpiredCheckBox.setChecked(search.isIncludeExpired());
if (search.getDateCreatedStart() > 9) {
m_d... | class class_name[name] begin[{]
method[fillParams, return_type[void], modifier[public], parameter[search]] begin[{]
call[m_localeSelection.setFormValue, parameter[call[search.getLocale, parameter[]], literal[false]]]
call[m_searchInput.setFormValueAsString, parameter[call[search... | Keyword[public] Keyword[void] identifier[fillParams] operator[SEP] identifier[CmsGallerySearchBean] identifier[search] operator[SEP] {
identifier[m_localeSelection] operator[SEP] identifier[setFormValue] operator[SEP] identifier[search] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] , literal[b... |
public static sslpolicy_sslvserver_binding[] get(nitro_service service, String name) throws Exception{
sslpolicy_sslvserver_binding obj = new sslpolicy_sslvserver_binding();
obj.set_name(name);
sslpolicy_sslvserver_binding response[] = (sslpolicy_sslvserver_binding[]) obj.get_resources(service);
return response... | class class_name[name] begin[{]
method[get, return_type[type[sslpolicy_sslvserver_binding]], modifier[public static], parameter[service, name]] begin[{]
local_variable[type[sslpolicy_sslvserver_binding], obj]
call[obj.set_name, parameter[member[.name]]]
local_variable[type[sslpo... | Keyword[public] Keyword[static] identifier[sslpolicy_sslvserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[sslpolicy_sslvserver_binding] id... |
public AwsSecurityFindingFilters withSourceUrl(StringFilter... sourceUrl) {
if (this.sourceUrl == null) {
setSourceUrl(new java.util.ArrayList<StringFilter>(sourceUrl.length));
}
for (StringFilter ele : sourceUrl) {
this.sourceUrl.add(ele);
}
return this;
... | class class_name[name] begin[{]
method[withSourceUrl, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[sourceUrl]] begin[{]
if[binary_operation[THIS[member[None.sourceUrl]], ==, literal[null]]] begin[{]
call[.setSourceUrl, parameter[ClassCreator(... | Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withSourceUrl] operator[SEP] identifier[StringFilter] operator[...] identifier[sourceUrl] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[sourceUrl] operator[==] Other[null] operator[SEP] {
identifier[set... |
protected static String getSQLSelectString(PoiCategoryFilter filter, int count, int version) {
if (filter != null) {
return PoiCategoryRangeQueryGenerator.getSQLSelectString(filter, count, version);
}
StringBuilder sb = new StringBuilder();
sb.append(DbConstants.FIND_IN_BOX_C... | class class_name[name] begin[{]
method[getSQLSelectString, return_type[type[String]], modifier[static protected], parameter[filter, count, version]] begin[{]
if[binary_operation[member[.filter], !=, literal[null]]] begin[{]
return[call[PoiCategoryRangeQueryGenerator.getSQLSelectStri... | Keyword[protected] Keyword[static] identifier[String] identifier[getSQLSelectString] operator[SEP] identifier[PoiCategoryFilter] identifier[filter] , Keyword[int] identifier[count] , Keyword[int] identifier[version] operator[SEP] {
Keyword[if] operator[SEP] identifier[filter] operator[!=] Other[null] operator[... |
public RequestedAttributes buildObject(String namespaceURI, String localName, String namespacePrefix) {
return new RequestedAttributesImpl(namespaceURI, localName, namespacePrefix);
} | class class_name[name] begin[{]
method[buildObject, return_type[type[RequestedAttributes]], modifier[public], parameter[namespaceURI, localName, namespacePrefix]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=namespaceURI, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] identifier[RequestedAttributes] identifier[buildObject] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localName] , identifier[String] identifier[namespacePrefix] operator[SEP] {
Keyword[return] Keyword[new] identifier[RequestedAttributesImpl] operator... |
private boolean transfer(long total,
GlobusInputStream in,
GlobusOutputStream out)
throws IOException {
byte [] buffer = new byte[bufferSize];
int bytes = 0;
long totalBytes = total;
long transferedB... | class class_name[name] begin[{]
method[transfer, return_type[type[boolean]], modifier[private], parameter[total, in, out]] begin[{]
local_variable[type[byte], buffer]
local_variable[type[int], bytes]
local_variable[type[long], totalBytes]
local_variable[type[long], transferedByt... | Keyword[private] Keyword[boolean] identifier[transfer] operator[SEP] Keyword[long] identifier[total] , identifier[GlobusInputStream] identifier[in] , identifier[GlobusOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buffe... |
public void setFile(String file) throws ApplicationException {
if (StringUtil.isEmpty(file)) return;
if (file.indexOf('/') != -1 || file.indexOf('\\') != -1)
throw new ApplicationException("value [" + file + "] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not al... | class class_name[name] begin[{]
method[setFile, return_type[void], modifier[public], parameter[file]] begin[{]
if[call[StringUtil.isEmpty, parameter[member[.file]]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[call[file.in... | Keyword[public] Keyword[void] identifier[setFile] operator[SEP] identifier[String] identifier[file] operator[SEP] Keyword[throws] identifier[ApplicationException] {
Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keywor... |
public Object parse(URL url, String charset) {
return parseURL(url, null, charset);
} | class class_name[name] begin[{]
method[parse, return_type[type[Object]], modifier[public], parameter[url, charset]] begin[{]
return[call[.parseURL, parameter[member[.url], literal[null], member[.charset]]]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[parse] operator[SEP] identifier[URL] identifier[url] , identifier[String] identifier[charset] operator[SEP] {
Keyword[return] identifier[parseURL] operator[SEP] identifier[url] , Other[null] , identifier[charset] operator[SEP] operator[SEP]
}
|
public static ResourcePatternResolver getResourcePatternResolver(ResourceLoader resourceLoader) {
Assert.notNull(resourceLoader, "ResourceLoader must not be null");
if (resourceLoader instanceof ResourcePatternResolver) {
return (ResourcePatternResolver) resourceLoader;
}
else if (resourceLoader != null) {
... | class class_name[name] begin[{]
method[getResourcePatternResolver, return_type[type[ResourcePatternResolver]], modifier[public static], parameter[resourceLoader]] begin[{]
call[Assert.notNull, parameter[member[.resourceLoader], literal["ResourceLoader must not be null"]]]
if[bin... | Keyword[public] Keyword[static] identifier[ResourcePatternResolver] identifier[getResourcePatternResolver] operator[SEP] identifier[ResourceLoader] identifier[resourceLoader] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[resourceLoader] , literal[String] operator[... |
public void redirect(final String location) {
// set the header AND a meta refresh just in case
response().headers().set("Location", location);
sendReply(HttpResponseStatus.OK,
new StringBuilder(
"<html></head><meta http-equiv=\"refresh\" content=\"0; url="
+ location + "\"></head... | class class_name[name] begin[{]
method[redirect, return_type[void], modifier[public], parameter[location]] begin[{]
call[.response, parameter[]]
call[.sendReply, parameter[member[HttpResponseStatus.OK], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Li... | Keyword[public] Keyword[void] identifier[redirect] operator[SEP] Keyword[final] identifier[String] identifier[location] operator[SEP] {
identifier[response] operator[SEP] operator[SEP] operator[SEP] identifier[headers] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] literal[String] , ide... |
protected void recordTiming(String statKey, long timeSpan) {
final String longKey = getActualStatKey(statKey);
statsCollector.recordTiming(longKey, timeSpan);
} | class class_name[name] begin[{]
method[recordTiming, return_type[void], modifier[protected], parameter[statKey, timeSpan]] begin[{]
local_variable[type[String], longKey]
call[statsCollector.recordTiming, parameter[member[.longKey], member[.timeSpan]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[recordTiming] operator[SEP] identifier[String] identifier[statKey] , Keyword[long] identifier[timeSpan] operator[SEP] {
Keyword[final] identifier[String] identifier[longKey] operator[=] identifier[getActualStatKey] operator[SEP] identifier[statKey] operator[SEP] opera... |
@Pure
public static Point3f computeLineLineIntersection(
double x1, double y1, double z1, double x2, double y2, double z2,
double x3, double y3, double z3, double x4, double y4, double z4) {
double s = computeLineLineIntersectionFactor(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4);
if (Double.isNaN(s)) {
... | class class_name[name] begin[{]
method[computeLineLineIntersection, return_type[type[Point3f]], modifier[public static], parameter[x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4]] begin[{]
local_variable[type[double], s]
if[call[Double.isNaN, parameter[member[.s]]]] begin[{]
... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Point3f] identifier[computeLineLineIntersection] operator[SEP] Keyword[double] identifier[x1] , Keyword[double] identifier[y1] , Keyword[double] identifier[z1] , Keyword[double] identifier[x2] , Keyword[double] identifier[y2] , Keyword[doubl... |
public Map<List<String>, String> extractNestedTypes(XEvent event) {
return XCostType.instance().extractNestedValues(event);
} | class class_name[name] begin[{]
method[extractNestedTypes, return_type[type[Map]], modifier[public], parameter[event]] begin[{]
return[call[XCostType.instance, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[List] operator[<] identifier[String] operator[>] , identifier[String] operator[>] identifier[extractNestedTypes] operator[SEP] identifier[XEvent] identifier[event] operator[SEP] {
Keyword[return] identifier[XCostType] operator[SEP] identifier[instance] oper... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.