code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public String[] replaceParameter(String name, String value)
{
Map<String, String[]> map = getMap();
String[] v = map.put(name, new String[] { value });
rebuildQuery();
return v;
} | class class_name[name] begin[{]
method[replaceParameter, return_type[type[String]], modifier[public], parameter[name, value]] begin[{]
local_variable[type[Map], map]
local_variable[type[String], v]
call[.rebuildQuery, parameter[]]
return[member[.v]]
end[}]
END[}] | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[replaceParameter] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identi... |
public static List<CommerceTierPriceEntry> findByCommercePriceEntryId(
long commercePriceEntryId, int start, int end) {
return getPersistence()
.findByCommercePriceEntryId(commercePriceEntryId, start, end);
} | class class_name[name] begin[{]
method[findByCommercePriceEntryId, return_type[type[List]], modifier[public static], parameter[commercePriceEntryId, start, end]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceTierPriceEntry] operator[>] identifier[findByCommercePriceEntryId] operator[SEP] Keyword[long] identifier[commercePriceEntryId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identif... |
public RecordedRequest takeRequest(long timeout, TimeUnit unit) throws InterruptedException {
return requestQueue.poll(timeout, unit);
} | class class_name[name] begin[{]
method[takeRequest, return_type[type[RecordedRequest]], modifier[public], parameter[timeout, unit]] begin[{]
return[call[requestQueue.poll, parameter[member[.timeout], member[.unit]]]]
end[}]
END[}] | Keyword[public] identifier[RecordedRequest] identifier[takeRequest] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[return] identifier[requestQueue] operator[SEP] identifier[poll] operator[SEP] ident... |
@Override
public EClass getIfcMassDensityMeasure() {
if (ifcMassDensityMeasureEClass == null) {
ifcMassDensityMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(834);
}
return ifcMassDensityMeasureEClass;
} | class class_name[name] begin[{]
method[getIfcMassDensityMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcMassDensityMeasureEClass], ==, literal[null]]] begin[{]
assign[member[.ifcMassDensityMeasureEClass], Cast(ex... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcMassDensityMeasure] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcMassDensityMeasureEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcMassDensityMeasureEClass] operator[=] operat... |
private void addMouseListenerImpl(MouseListener listener) {
if (mouseListeners.contains(listener)) {
return;
}
mouseListeners.add(listener);
allListeners.add(listener);
} | class class_name[name] begin[{]
method[addMouseListenerImpl, return_type[void], modifier[private], parameter[listener]] begin[{]
if[call[mouseListeners.contains, parameter[member[.listener]]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[mouse... | Keyword[private] Keyword[void] identifier[addMouseListenerImpl] operator[SEP] identifier[MouseListener] identifier[listener] operator[SEP] {
Keyword[if] operator[SEP] identifier[mouseListeners] operator[SEP] identifier[contains] operator[SEP] identifier[listener] operator[SEP] operator[SEP] {
Keyword[... |
public static long getTileColumn(BoundingBox totalBox, long matrixWidth,
double longitude) {
double minX = totalBox.getMinLongitude();
double maxX = totalBox.getMaxLongitude();
long tileId;
if (longitude < minX) {
tileId = -1;
} else if (longitude >= maxX) {
tileId = matrixWidth;
} else {
doub... | class class_name[name] begin[{]
method[getTileColumn, return_type[type[long]], modifier[public static], parameter[totalBox, matrixWidth, longitude]] begin[{]
local_variable[type[double], minX]
local_variable[type[double], maxX]
local_variable[type[long], tileId]
if[binar... | Keyword[public] Keyword[static] Keyword[long] identifier[getTileColumn] operator[SEP] identifier[BoundingBox] identifier[totalBox] , Keyword[long] identifier[matrixWidth] , Keyword[double] identifier[longitude] operator[SEP] {
Keyword[double] identifier[minX] operator[=] identifier[totalBox] operator[SEP] iden... |
public static DictionaryMaker combine(String pathA, String pathB)
{
DictionaryMaker dictionaryMaker = new DictionaryMaker();
dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(pathA));
dictionaryMaker.addAll(DictionaryMaker.loadAsItemList(pathB));
return dictionaryMaker;
} | class class_name[name] begin[{]
method[combine, return_type[type[DictionaryMaker]], modifier[public static], parameter[pathA, pathB]] begin[{]
local_variable[type[DictionaryMaker], dictionaryMaker]
call[dictionaryMaker.addAll, parameter[call[DictionaryMaker.loadAsItemList, parameter[mem... | Keyword[public] Keyword[static] identifier[DictionaryMaker] identifier[combine] operator[SEP] identifier[String] identifier[pathA] , identifier[String] identifier[pathB] operator[SEP] {
identifier[DictionaryMaker] identifier[dictionaryMaker] operator[=] Keyword[new] identifier[DictionaryMaker] operator[SEP] ope... |
@Nonnull
public static String getURIWithContext (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
@Nonnull final String sHRef)
{
ValueEnforcer.notNull (aRequestScope, "RequestScope");
ValueEnforcer.notNull (sHRef, "HRef");
// If known protocol, kee... | class class_name[name] begin[{]
method[getURIWithContext, return_type[type[String]], modifier[public static], parameter[aRequestScope, sHRef]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aRequestScope], literal["RequestScope"]]]
call[ValueEnforcer.notNull, parameter[m... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[getURIWithContext] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IRequestWebScopeWithoutResponse] identifier[aRequestScope] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] i... |
private int getNumBlocks(R delta) {
ByteBuffer content = getValue(delta);
int numBlocks = 0;
// build numBlocks by adding together each hex digit
for (int i = 0; i < _prefixLength; i++) {
byte b = content.get(i);
numBlocks = numBlocks << 4 | (b <= '9' ? b - '0' :... | class class_name[name] begin[{]
method[getNumBlocks, return_type[type[int]], modifier[private], parameter[delta]] begin[{]
local_variable[type[ByteBuffer], content]
local_variable[type[int], numBlocks]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(ann... | Keyword[private] Keyword[int] identifier[getNumBlocks] operator[SEP] identifier[R] identifier[delta] operator[SEP] {
identifier[ByteBuffer] identifier[content] operator[=] identifier[getValue] operator[SEP] identifier[delta] operator[SEP] operator[SEP] Keyword[int] identifier[numBlocks] operator[=] Other[0] oper... |
public static CPInstance fetchByC_ERC(long companyId,
String externalReferenceCode, boolean retrieveFromCache) {
return getPersistence()
.fetchByC_ERC(companyId, externalReferenceCode,
retrieveFromCache);
} | class class_name[name] begin[{]
method[fetchByC_ERC, return_type[type[CPInstance]], modifier[public static], parameter[companyId, externalReferenceCode, retrieveFromCache]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPInstance] identifier[fetchByC_ERC] operator[SEP] Keyword[long] identifier[companyId] , identifier[String] identifier[externalReferenceCode] , Keyword[boolean] identifier[retrieveFromCache] operator[SEP] {
Keyword[return] identifier[getPersistence] operator[SEP] oper... |
public List<Task> executeAndJumpTask(String taskId, String operator, Map<String, Object> args, String nodeName) {
Execution execution = execute(taskId, operator, args);
if(execution == null) return Collections.emptyList();
ProcessModel model = execution.getProcess().getModel();
AssertHelper.notNull(model, "当前任务... | class class_name[name] begin[{]
method[executeAndJumpTask, return_type[type[List]], modifier[public], parameter[taskId, operator, args, nodeName]] begin[{]
local_variable[type[Execution], execution]
if[binary_operation[member[.execution], ==, literal[null]]] begin[{]
return[call[Collect... | Keyword[public] identifier[List] operator[<] identifier[Task] operator[>] identifier[executeAndJumpTask] operator[SEP] identifier[String] identifier[taskId] , identifier[String] identifier[operator] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[args] , identifier[Strin... |
public static short CONST_SHORT(final int v) throws IllegalArgumentException {
if (v < Short.MIN_VALUE || v > Short.MAX_VALUE) {
throw new IllegalArgumentException("Supplied value must be a valid byte literal between -32768 and 32767: [" + v + "]");
}
return (short) v;
} | class class_name[name] begin[{]
method[CONST_SHORT, return_type[type[short]], modifier[public static], parameter[v]] begin[{]
if[binary_operation[binary_operation[member[.v], <, member[Short.MIN_VALUE]], ||, binary_operation[member[.v], >, member[Short.MAX_VALUE]]]] begin[{]
ThrowSt... | Keyword[public] Keyword[static] Keyword[short] identifier[CONST_SHORT] operator[SEP] Keyword[final] Keyword[int] identifier[v] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[v] operator[<] identifier[Short] operator[SEP] identifier[MIN_VALUE] operator[||... |
public JellyContext createContext() {
JellyContext context = new CustomJellyContext(ROOT_CONTEXT);
context.setClassLoader(owner.loader);
context.setExportLibraries(false);
return context;
} | class class_name[name] begin[{]
method[createContext, return_type[type[JellyContext]], modifier[public], parameter[]] begin[{]
local_variable[type[JellyContext], context]
call[context.setClassLoader, parameter[member[owner.loader]]]
call[context.setExportLibraries, param... | Keyword[public] identifier[JellyContext] identifier[createContext] operator[SEP] operator[SEP] {
identifier[JellyContext] identifier[context] operator[=] Keyword[new] identifier[CustomJellyContext] operator[SEP] identifier[ROOT_CONTEXT] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[set... |
private void initComponents()
{
java.awt.GridBagConstraints gridBagConstraints;
mainMap = new org.jxmapviewer.JXMapViewer();
miniMap = new org.jxmapviewer.JXMapViewer();
jPanel1 = new javax.swing.JPanel();
zoomInButton = new javax.swing.JButton();
zoomOutButt... | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[java], gridBagConstraints]
assign[member[.mainMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_... | Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints] operator[SEP] identifier[mainMap] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[jx... |
public RelatedTags getRelated(String tag) throws JinxException {
JinxUtils.validateParams(tag);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.tags.getRelated");
params.put("tag", tag);
return jinx.flickrGet(params, RelatedTags.class);
} | class class_name[name] begin[{]
method[getRelated, return_type[type[RelatedTags]], modifier[public], parameter[tag]] begin[{]
call[JinxUtils.validateParams, parameter[member[.tag]]]
local_variable[type[Map], params]
call[params.put, parameter[literal["method"], literal["... | Keyword[public] identifier[RelatedTags] identifier[getRelated] operator[SEP] identifier[String] identifier[tag] operator[SEP] Keyword[throws] identifier[JinxException] {
identifier[JinxUtils] operator[SEP] identifier[validateParams] operator[SEP] identifier[tag] operator[SEP] operator[SEP] identifier[Map] operat... |
@Override
public double getCirumscribedRadius() {
return 0.5* Math.sqrt(width*width + height*height + length*length);
} | class class_name[name] begin[{]
method[getCirumscribedRadius, return_type[type[double]], modifier[public], parameter[]] begin[{]
return[binary_operation[literal[0.5], *, call[Math.sqrt, parameter[binary_operation[binary_operation[binary_operation[member[.width], *, member[.width]], +, binary_operation[... | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[getCirumscribedRadius] operator[SEP] operator[SEP] {
Keyword[return] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[width] operator[*] identifier[width] operator[+] identifier[height... |
public void addOrder(String columnName, boolean ascending) {
if (columnName == null) {
return;
}
for (int i = 0; i < columns.size(); i++) {
if (!columnName.equals(columns.get(i).getData())) {
continue;
}
order.add(new Order(i, ascending ? "asc" : "desc"));
}
} | class class_name[name] begin[{]
method[addOrder, return_type[void], modifier[public], parameter[columnName, ascending]] begin[{]
if[binary_operation[member[.columnName], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
ForStatement(body=Blo... | Keyword[public] Keyword[void] identifier[addOrder] operator[SEP] identifier[String] identifier[columnName] , Keyword[boolean] identifier[ascending] operator[SEP] {
Keyword[if] operator[SEP] identifier[columnName] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
K... |
@Override
public JavaFileObject getJavaFileForOutput(Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException {
javaClassObject = new MemoryJavaClassObject(className, kind);
return javaClassObject;
} | class class_name[name] begin[{]
method[getJavaFileForOutput, return_type[type[JavaFileObject]], modifier[public], parameter[location, className, kind, sibling]] begin[{]
assign[member[.javaClassObject], ClassCreator(arguments=[MemberReference(member=className, postfix_operators=[], prefix_opera... | annotation[@] identifier[Override] Keyword[public] identifier[JavaFileObject] identifier[getJavaFileForOutput] operator[SEP] identifier[Location] identifier[location] , identifier[String] identifier[className] , identifier[JavaFileObject] operator[SEP] identifier[Kind] identifier[kind] , identifier[FileObject] ident... |
public final void writeTo(String fmt, OutputStream out) throws IOException {
if (fmt.equalsIgnoreCase(SVG_FMT)) {
out.write(toSvgStr().getBytes(Charsets.UTF_8));
} else if (fmt.equalsIgnoreCase(PS_FMT)) {
out.write(toEpsStr().getBytes(Charsets.UTF_8));
} else if (fmt.equa... | class class_name[name] begin[{]
method[writeTo, return_type[void], modifier[final public], parameter[fmt, out]] begin[{]
if[call[fmt.equalsIgnoreCase, parameter[member[.SVG_FMT]]]] begin[{]
call[out.write, parameter[call[.toSvgStr, parameter[]]]]
else begin[{]
... | Keyword[public] Keyword[final] Keyword[void] identifier[writeTo] operator[SEP] identifier[String] identifier[fmt] , identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[fmt] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] ... |
public double[] getRow(int row) {
checkIndices(row, 0);
double[] rowArr = new double[cols];
int index = getIndex(row, 0);
for (int i = 0; i < cols; ++i)
rowArr[i] = matrix[index++];
return rowArr;
} | class class_name[name] begin[{]
method[getRow, return_type[type[double]], modifier[public], parameter[row]] begin[{]
call[.checkIndices, parameter[member[.row], literal[0]]]
local_variable[type[double], rowArr]
local_variable[type[int], index]
ForStatement(body=Statement... | Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getRow] operator[SEP] Keyword[int] identifier[row] operator[SEP] {
identifier[checkIndices] operator[SEP] identifier[row] , Other[0] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rowArr] operator[=] Keywo... |
public CloseableReference<Bitmap> createBitmap(
Bitmap source,
int x,
int y,
int width,
int height,
@Nullable Object callerContext) {
return createBitmap(source, x, y, width, height, null, false, callerContext);
} | class class_name[name] begin[{]
method[createBitmap, return_type[type[CloseableReference]], modifier[public], parameter[source, x, y, width, height, callerContext]] begin[{]
return[call[.createBitmap, parameter[member[.source], member[.x], member[.y], member[.width], member[.height], literal[null], lit... | Keyword[public] identifier[CloseableReference] operator[<] identifier[Bitmap] operator[>] identifier[createBitmap] operator[SEP] identifier[Bitmap] identifier[source] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , annotation[@] identif... |
public void setParamWithProperty(int param, boolean hasProperty) {
if (param < 0 || param > 31) {
return;
}
if (hasProperty) {
bits |= (1 << param);
} else {
bits &= ~(1 << param);
}
} | class class_name[name] begin[{]
method[setParamWithProperty, return_type[void], modifier[public], parameter[param, hasProperty]] begin[{]
if[binary_operation[binary_operation[member[.param], <, literal[0]], ||, binary_operation[member[.param], >, literal[31]]]] begin[{]
return[None]... | Keyword[public] Keyword[void] identifier[setParamWithProperty] operator[SEP] Keyword[int] identifier[param] , Keyword[boolean] identifier[hasProperty] operator[SEP] {
Keyword[if] operator[SEP] identifier[param] operator[<] Other[0] operator[||] identifier[param] operator[>] Other[31] operator[SEP] {
... |
public static long getResultDisplayDurationInMsOrDefaultValue(Intent intent) {
if (intent == null) return DEFAULT_INTENT_RESULT_DURATION_MS;
return intent.getLongExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS,
DEFAULT_INTENT_RESULT_DURATION_MS);
} | class class_name[name] begin[{]
method[getResultDisplayDurationInMsOrDefaultValue, return_type[type[long]], modifier[public static], parameter[intent]] begin[{]
if[binary_operation[member[.intent], ==, literal[null]]] begin[{]
return[member[.DEFAULT_INTENT_RESULT_DURATION_MS]]
else begi... | Keyword[public] Keyword[static] Keyword[long] identifier[getResultDisplayDurationInMsOrDefaultValue] operator[SEP] identifier[Intent] identifier[intent] operator[SEP] {
Keyword[if] operator[SEP] identifier[intent] operator[==] Other[null] operator[SEP] Keyword[return] identifier[DEFAULT_INTENT_RESULT_DURATION_MS... |
@GwtIncompatible // propagateIfInstanceOf
public static <X1 extends Throwable, X2 extends Throwable> void propagateIfPossible(
@Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2)
throws X1, X2 {
checkNotNull(declaredType2);
propagateIfInstanceOf(throwable, declaredType... | class class_name[name] begin[{]
method[propagateIfPossible, return_type[void], modifier[public static], parameter[throwable, declaredType1, declaredType2]] begin[{]
call[.checkNotNull, parameter[member[.declaredType2]]]
call[.propagateIfInstanceOf, parameter[member[.throwable], ... | annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] operator[<] identifier[X1] Keyword[extends] identifier[Throwable] , identifier[X2] Keyword[extends] identifier[Throwable] operator[>] Keyword[void] identifier[propagateIfPossible] operator[SEP] annotation[@] identifier[Nullable] identifier[Throw... |
public void removeSubject(String subject) {
String prefix = normalizePrefix(subject);
for (String suffix : getSuffixes(prefix).keySet()) {
setItem(prefix + suffix, null);
}
} | class class_name[name] begin[{]
method[removeSubject, return_type[void], modifier[public], parameter[subject]] begin[{]
local_variable[type[String], prefix]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operan... | Keyword[public] Keyword[void] identifier[removeSubject] operator[SEP] identifier[String] identifier[subject] operator[SEP] {
identifier[String] identifier[prefix] operator[=] identifier[normalizePrefix] operator[SEP] identifier[subject] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] id... |
public Type getType(DocumentResolver definitionDocumentResolver) {
Type type;
if (property instanceof RefProperty) {
RefProperty refProperty = (RefProperty) property;
if (refProperty.getRefFormat() == RefFormat.RELATIVE)
type = new ObjectType(refProperty.getTitle(... | class class_name[name] begin[{]
method[getType, return_type[type[Type]], modifier[public], parameter[definitionDocumentResolver]] begin[{]
local_variable[type[Type], type]
if[binary_operation[member[.property], instanceof, type[RefProperty]]] begin[{]
local_variable[type[Ref... | Keyword[public] identifier[Type] identifier[getType] operator[SEP] identifier[DocumentResolver] identifier[definitionDocumentResolver] operator[SEP] {
identifier[Type] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[property] Keyword[instanceof] identifier[RefProperty] operator[SEP] {
... |
public static Polygon circle(@NonNull Point center, double radius, @IntRange(from = 1) int steps,
@TurfConstants.TurfUnitCriteria String units) {
List<Point> coordinates = new ArrayList<>();
for (int i = 0; i < steps; i++) {
coordinates.add(TurfMeasurement.destination(center... | class class_name[name] begin[{]
method[circle, return_type[type[Polygon]], modifier[public static], parameter[center, radius, steps, units]] begin[{]
local_variable[type[List], coordinates]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(... | Keyword[public] Keyword[static] identifier[Polygon] identifier[circle] operator[SEP] annotation[@] identifier[NonNull] identifier[Point] identifier[center] , Keyword[double] identifier[radius] , annotation[@] identifier[IntRange] operator[SEP] identifier[from] operator[=] Other[1] operator[SEP] Keyword[int] identifie... |
public static Set<Annotation> getAllAnnotations(final Class<?> cls) {
List<Class<?>> allTypes = ClassUtil.getAllSuperclasses(cls);
allTypes.addAll(ClassUtil.getAllInterfaces(cls));
allTypes.add(cls);
Set<Annotation> anns = new HashSet<Annotation>();
for (Class<?> type : allTypes) {
anns.addAll(Arrays.asLi... | class class_name[name] begin[{]
method[getAllAnnotations, return_type[type[Set]], modifier[public static], parameter[cls]] begin[{]
local_variable[type[List], allTypes]
call[allTypes.addAll, parameter[call[ClassUtil.getAllInterfaces, parameter[member[.cls]]]]]
call[allTy... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Annotation] operator[>] identifier[getAllAnnotations] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[SEP] {
identifier[List] operator[<] identifier[Class] operator[<] operator[?] op... |
public void marshall(Configuration configuration, ProtocolMarshaller protocolMarshaller) {
if (configuration == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(configuration.getClassification(), CLASS... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[configuration, protocolMarshaller]] begin[{]
if[binary_operation[member[.configuration], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[configuration] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
@Factory
public static <T extends Throwable> Matcher<T> isThrowable(Class<?> type) {
final Matcher<T> typeMatcher = instanceOf(type);
return new IsThrowable<>(typeMatcher);
} | class class_name[name] begin[{]
method[isThrowable, return_type[type[Matcher]], modifier[public static], parameter[type]] begin[{]
local_variable[type[Matcher], typeMatcher]
return[ClassCreator(arguments=[MemberReference(member=typeMatcher, postfix_operators=[], prefix_operators=[], qualifier=,... | annotation[@] identifier[Factory] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Throwable] operator[>] identifier[Matcher] operator[<] identifier[T] operator[>] identifier[isThrowable] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[S... |
public static int subtractExact(int a, int b) {
long result = (long) a - b;
checkNoOverflow(result == (int) result);
return (int) result;
} | class class_name[name] begin[{]
method[subtractExact, return_type[type[int]], modifier[public static], parameter[a, b]] begin[{]
local_variable[type[long], result]
call[.checkNoOverflow, parameter[binary_operation[member[.result], ==, Cast(expression=MemberReference(member=result, postf... | Keyword[public] Keyword[static] Keyword[int] identifier[subtractExact] operator[SEP] Keyword[int] identifier[a] , Keyword[int] identifier[b] operator[SEP] {
Keyword[long] identifier[result] operator[=] operator[SEP] Keyword[long] operator[SEP] identifier[a] operator[-] identifier[b] operator[SEP] identifier[che... |
@Override
public long write(final InputStream _in,
final long _size,
final String _fileName)
throws EFapsException
{
long size = 0;
ConnectionResource res = null;
try {
res = Context.getThreadContext().getConnectionResource(... | class class_name[name] begin[{]
method[write, return_type[type[long]], modifier[public], parameter[_in, _size, _fileName]] begin[{]
local_variable[type[long], size]
local_variable[type[ConnectionResource], res]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=Me... | annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[write] operator[SEP] Keyword[final] identifier[InputStream] identifier[_in] , Keyword[final] Keyword[long] identifier[_size] , Keyword[final] identifier[String] identifier[_fileName] operator[SEP] Keyword[throws] identifier[EFapsException] {... |
public double response( double[] sample ) {
if( sample.length != A.numCols )
throw new IllegalArgumentException("Expected input vector to be in sample space");
DMatrixRMaj dots = new DMatrixRMaj(numComponents,1);
DMatrixRMaj s = DMatrixRMaj.wrap(A.numCols,1,sample);
CommonO... | class class_name[name] begin[{]
method[response, return_type[type[double]], modifier[public], parameter[sample]] begin[{]
if[binary_operation[member[sample.length], !=, member[A.numCols]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[double] identifier[response] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[sample] operator[SEP] {
Keyword[if] operator[SEP] identifier[sample] operator[SEP] identifier[length] operator[!=] identifier[A] operator[SEP] identifier[numCols] operator[SEP] Keyword[throw]... |
@NotNull
public static LongStream iterate(
final long seed,
@NotNull final LongPredicate predicate,
@NotNull final LongUnaryOperator op) {
Objects.requireNonNull(predicate);
return iterate(seed, op).takeWhile(predicate);
} | class class_name[name] begin[{]
method[iterate, return_type[type[LongStream]], modifier[public static], parameter[seed, predicate, op]] begin[{]
call[Objects.requireNonNull, parameter[member[.predicate]]]
return[call[.iterate, parameter[member[.seed], member[.op]]]]
end[}]
END[}] | annotation[@] identifier[NotNull] Keyword[public] Keyword[static] identifier[LongStream] identifier[iterate] operator[SEP] Keyword[final] Keyword[long] identifier[seed] , annotation[@] identifier[NotNull] Keyword[final] identifier[LongPredicate] identifier[predicate] , annotation[@] identifier[NotNull] Keyword[final]... |
public static String deobfuscate(String s)
{
if (s.startsWith("OBF:"))
s=s.substring(4);
byte[] b=new byte[s.length()/2];
int l=0;
for (int i=0;i<s.length();i+=4)
{
String x=s.substring(i,i+4);
int i0 = Integer.parseInt(x,36);
... | class class_name[name] begin[{]
method[deobfuscate, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[call[s.startsWith, parameter[literal["OBF:"]]]] begin[{]
assign[member[.s], call[s.substring, parameter[literal[4]]]]
else begin[{]
None
... | Keyword[public] Keyword[static] identifier[String] identifier[deobfuscate] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[s] ... |
private IConfigurationElement getParserWithHeighestPriority(
String natureId, IConfigurationElement[] config)
{
IConfigurationElement selectedParser = null;
int selectedParserPriority = 0;
for (IConfigurationElement e : config)
{
if (e.getAttribute("nature").equals(natureId))
{
if (selectedParser ... | class class_name[name] begin[{]
method[getParserWithHeighestPriority, return_type[type[IConfigurationElement]], modifier[private], parameter[natureId, config]] begin[{]
local_variable[type[IConfigurationElement], selectedParser]
local_variable[type[int], selectedParserPriority]
ForState... | Keyword[private] identifier[IConfigurationElement] identifier[getParserWithHeighestPriority] operator[SEP] identifier[String] identifier[natureId] , identifier[IConfigurationElement] operator[SEP] operator[SEP] identifier[config] operator[SEP] {
identifier[IConfigurationElement] identifier[selectedParser] opera... |
@Nonnull
public JSDefinedClass _class (@Nonnull @Nonempty final String sName) throws JSNameAlreadyExistsException
{
final JSDefinedClass aDefinedClass = new JSDefinedClass (sName);
return addDeclaration (aDefinedClass);
} | class class_name[name] begin[{]
method[_class, return_type[type[JSDefinedClass]], modifier[public], parameter[sName]] begin[{]
local_variable[type[JSDefinedClass], aDefinedClass]
return[call[.addDeclaration, parameter[member[.aDefinedClass]]]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] identifier[JSDefinedClass] identifier[_class] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[String] identifier[sName] operator[SEP] Keyword[throws] identifier[JSNameAlreadyExistsException] {
Keyword[f... |
byte[] toNewByteArray()
{
int length = myBuffer.length - myOffset;
byte[] bytes = new byte[length];
System.arraycopy(myBuffer, myOffset, bytes, 0, length);
return bytes;
} | class class_name[name] begin[{]
method[toNewByteArray, return_type[type[byte]], modifier[default], parameter[]] begin[{]
local_variable[type[int], length]
local_variable[type[byte], bytes]
call[System.arraycopy, parameter[member[.myBuffer], member[.myOffset], member[.bytes], lit... | Keyword[byte] operator[SEP] operator[SEP] identifier[toNewByteArray] operator[SEP] operator[SEP] {
Keyword[int] identifier[length] operator[=] identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[... |
public Period multipliedBy(int scalar) {
if (this == ZERO || scalar == 1) {
return this;
}
int[] values = getValues(); // cloned
for (int i = 0; i < values.length; i++) {
values[i] = FieldUtils.safeMultiply(values[i], scalar);
}
return new Period(... | class class_name[name] begin[{]
method[multipliedBy, return_type[type[Period]], modifier[public], parameter[scalar]] begin[{]
if[binary_operation[binary_operation[THIS[], ==, member[.ZERO]], ||, binary_operation[member[.scalar], ==, literal[1]]]] begin[{]
return[THIS[]]
else... | Keyword[public] identifier[Period] identifier[multipliedBy] operator[SEP] Keyword[int] identifier[scalar] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[ZERO] operator[||] identifier[scalar] operator[==] Other[1] operator[SEP] {
Keyword[return] Keyword[this] operator[S... |
private void notifyComponentEvent(Event event, ComponentDescriptor<?> descriptor,
ComponentManager componentManager)
{
if (this.shouldStack) {
synchronized (this) {
this.events.push(new ComponentEventEntry(event, descriptor, componentManager));
}
} els... | class class_name[name] begin[{]
method[notifyComponentEvent, return_type[void], modifier[private], parameter[event, descriptor, componentManager]] begin[{]
if[THIS[member[None.shouldStack]]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
THIS[memb... | Keyword[private] Keyword[void] identifier[notifyComponentEvent] operator[SEP] identifier[Event] identifier[event] , identifier[ComponentDescriptor] operator[<] operator[?] operator[>] identifier[descriptor] , identifier[ComponentManager] identifier[componentManager] operator[SEP] {
Keyword[if] operator[SEP] Ke... |
public static String getUserAgent() {
if (USER_AGENT == null) {
USER_AGENT = String.format(Locale.ENGLISH, "%s/%s (%s/%s)",
PRODUCT_NAME,
Version.SYNC_PROTOCOL_VERSION,
Version.getVersionName(),
Version.getCommitHash());... | class class_name[name] begin[{]
method[getUserAgent, return_type[type[String]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.USER_AGENT], ==, literal[null]]] begin[{]
assign[member[.USER_AGENT], call[String.format, parameter[member[Locale.EN... | Keyword[public] Keyword[static] identifier[String] identifier[getUserAgent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[USER_AGENT] operator[==] Other[null] operator[SEP] {
identifier[USER_AGENT] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] ident... |
public static <T, R> Callable<R> andThen(Callable<T> callable, Function<T, R> resultHandler){
return () -> resultHandler.apply(callable.call());
} | class class_name[name] begin[{]
method[andThen, return_type[type[Callable]], modifier[public static], parameter[callable, resultHandler]] begin[{]
return[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=call, postfix_operators=[], prefix_operators=[], qualifier=ca... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Callable] operator[<] identifier[R] operator[>] identifier[andThen] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[callable] , identifier[Function] operator[<] identifier[T] , identif... |
public static byte[] getStopRowForTransaction(byte[] queueRowPrefix, Transaction transaction) {
return Bytes.add(queueRowPrefix, Bytes.toBytes(transaction.getReadPointer() + 1));
} | class class_name[name] begin[{]
method[getStopRowForTransaction, return_type[type[byte]], modifier[public static], parameter[queueRowPrefix, transaction]] begin[{]
return[call[Bytes.add, parameter[member[.queueRowPrefix], call[Bytes.toBytes, parameter[binary_operation[call[transaction.getReadPointer, p... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getStopRowForTransaction] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[queueRowPrefix] , identifier[Transaction] identifier[transaction] operator[SEP] {
Keyword[return] identifier[Bytes] operator[SEP] iden... |
public void marshall(DescribeInputSecurityGroupRequest describeInputSecurityGroupRequest, ProtocolMarshaller protocolMarshaller) {
if (describeInputSecurityGroupRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocol... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeInputSecurityGroupRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeInputSecurityGroupRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeInputSecurityGroupRequest] identifier[describeInputSecurityGroupRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeInputSecurityGroupRequest] ope... |
@Override
public NutMap postPay(String url, String key, Map<String, Object> params, File file, String password) {
params.remove("sign");
String sign = WxPaySign.createSign(key, params);
params.put("sign", sign);
Request req = Request.create(url, METHOD.POST);
req.setData(Xmls... | class class_name[name] begin[{]
method[postPay, return_type[type[NutMap]], modifier[public], parameter[url, key, params, file, password]] begin[{]
call[params.remove, parameter[literal["sign"]]]
local_variable[type[String], sign]
call[params.put, parameter[literal["sign"... | annotation[@] identifier[Override] Keyword[public] identifier[NutMap] identifier[postPay] operator[SEP] identifier[String] identifier[url] , identifier[String] identifier[key] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] , identifier[File] identifier[file] , ... |
public PagedList<JobPreparationAndReleaseTaskExecutionInformation> listPreparationAndReleaseTaskStatus(final String jobId, final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions) {
ServiceResponseWithHeaders<Page<JobPreparationAndReleaseTaskExecutionInformation>, JobLi... | class class_name[name] begin[{]
method[listPreparationAndReleaseTaskStatus, return_type[type[PagedList]], modifier[public], parameter[jobId, jobListPreparationAndReleaseTaskStatusOptions]] begin[{]
local_variable[type[ServiceResponseWithHeaders], response]
return[ClassCreator(arguments=[MethodI... | Keyword[public] identifier[PagedList] operator[<] identifier[JobPreparationAndReleaseTaskExecutionInformation] operator[>] identifier[listPreparationAndReleaseTaskStatus] operator[SEP] Keyword[final] identifier[String] identifier[jobId] , Keyword[final] identifier[JobListPreparationAndReleaseTaskStatusOptions] identif... |
public final EObject entryRuleConjunction() throws RecognitionException {
EObject current = null;
EObject iv_ruleConjunction = null;
try {
// InternalXtext.g:1817:52: (iv_ruleConjunction= ruleConjunction EOF )
// InternalXtext.g:1818:2: iv_ruleConjunction= ruleConjunct... | class class_name[name] begin[{]
method[entryRuleConjunction, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[EObject], iv_ruleConjunction]
TryStatement(block=[BlockStatement(label=None, statements=[Stat... | Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleConjunction] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleConjunction] operator[=] Other[nul... |
private void txtClassUriTemplateFocusLost(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtClassUriTemplateFocusLost
String uriTemplate = txtClassUriTemplate.getText();
if (predicateSubjectMap == null) {
predicateSubjectMap = createPredicateSubjectMap();
}
predicateSubjectMap.setTargetMapping(uriTemplat... | class class_name[name] begin[{]
method[txtClassUriTemplateFocusLost, return_type[void], modifier[private], parameter[evt]] begin[{]
local_variable[type[String], uriTemplate]
if[binary_operation[member[.predicateSubjectMap], ==, literal[null]]] begin[{]
assign[mem... | Keyword[private] Keyword[void] identifier[txtClassUriTemplateFocusLost] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusEvent] identifier[evt] operator[SEP] {
identifier[String] identifier[uriTemplate] operator[=] identifier[txtClassUriTe... |
public static double romb(Function1D f, double a, double b, int max)
{
// see http://en.wikipedia.org/wiki/Romberg's_method
max+=1;
double[] s = new double[max];//first index will not be used
double var = 0;//var is used to hold the value R(n-1,m-1), from the previous row so t... | class class_name[name] begin[{]
method[romb, return_type[type[double]], modifier[public static], parameter[f, a, b, max]] begin[{]
assign[member[.max], literal[1]]
local_variable[type[double], s]
local_variable[type[double], var]
local_variable[type[double], lastVal]
... | Keyword[public] Keyword[static] Keyword[double] identifier[romb] operator[SEP] identifier[Function1D] identifier[f] , Keyword[double] identifier[a] , Keyword[double] identifier[b] , Keyword[int] identifier[max] operator[SEP] {
identifier[max] operator[+=] Other[1] operator[SEP] Keyword[double] operator[SEP] o... |
public CommandLine setExecutionExceptionHandler(IExecutionExceptionHandler executionExceptionHandler) {
this.executionExceptionHandler = Assert.notNull(executionExceptionHandler, "executionExceptionHandler");
for (CommandLine sub : getSubcommands().values()) { sub.setExecutionExceptionHandler(executionE... | class class_name[name] begin[{]
method[setExecutionExceptionHandler, return_type[type[CommandLine]], modifier[public], parameter[executionExceptionHandler]] begin[{]
assign[THIS[member[None.executionExceptionHandler]], call[Assert.notNull, parameter[member[.executionExceptionHandler], literal["... | Keyword[public] identifier[CommandLine] identifier[setExecutionExceptionHandler] operator[SEP] identifier[IExecutionExceptionHandler] identifier[executionExceptionHandler] operator[SEP] {
Keyword[this] operator[SEP] identifier[executionExceptionHandler] operator[=] identifier[Assert] operator[SEP] identifier[not... |
protected void initializeIntent(Intent intent) {
intent.putExtra(UploadService.PARAM_TASK_PARAMETERS, params);
Class taskClass = getTaskClass();
if (taskClass == null)
throw new RuntimeException("The request must specify a task class!");
intent.putExtra(UploadService.PARAM_... | class class_name[name] begin[{]
method[initializeIntent, return_type[void], modifier[protected], parameter[intent]] begin[{]
call[intent.putExtra, parameter[member[UploadService.PARAM_TASK_PARAMETERS], member[.params]]]
local_variable[type[Class], taskClass]
if[binary_op... | Keyword[protected] Keyword[void] identifier[initializeIntent] operator[SEP] identifier[Intent] identifier[intent] operator[SEP] {
identifier[intent] operator[SEP] identifier[putExtra] operator[SEP] identifier[UploadService] operator[SEP] identifier[PARAM_TASK_PARAMETERS] , identifier[params] operator[SEP] opera... |
public void setCookie(String name, String value, String path, Date expirationDate, boolean secure, boolean httpOnly) {
if (remote == null)
throw new IllegalStateException("Cannot setCookie since remote == null");
if (path == null || path.length() == 0)
path = remote.getPath();
... | class class_name[name] begin[{]
method[setCookie, return_type[void], modifier[public], parameter[name, value, path, expirationDate, secure, httpOnly]] begin[{]
if[binary_operation[member[.remote], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[setCookie] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] , identifier[String] identifier[path] , identifier[Date] identifier[expirationDate] , Keyword[boolean] identifier[secure] , Keyword[boolean] identifier[httpOnly] operator[SEP... |
private void developLongDigits(int decExponent, long lvalue,
long insignificant) {
char digits[];
int ndigits;
int digitno;
int c;
//
// Discard non-significant low-order bits, while rounding,
// up to insignificant value.
int i;
... | class class_name[name] begin[{]
method[developLongDigits, return_type[void], modifier[private], parameter[decExponent, lvalue, insignificant]] begin[{]
local_variable[type[char], digits]
local_variable[type[int], ndigits]
local_variable[type[int], digitno]
local_variable[type[in... | Keyword[private] Keyword[void] identifier[developLongDigits] operator[SEP] Keyword[int] identifier[decExponent] , Keyword[long] identifier[lvalue] , Keyword[long] identifier[insignificant] operator[SEP] {
Keyword[char] identifier[digits] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[ndigits... |
private void doWakeUpWorker() {
if (idleWorkers.get() == 0) {
synchronized (workers) {
if (workers.size() >= getMaximumPoolSize()) {
return;
}
if (workers.isEmpty() || (idleWorkers.get() == 0)) {
addWorkerUnsafe... | class class_name[name] begin[{]
method[doWakeUpWorker, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[idleWorkers.get, parameter[]], ==, literal[0]]] begin[{]
SYNCHRONIZED[member[.workers]] BEGIN[{]
if... | Keyword[private] Keyword[void] identifier[doWakeUpWorker] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[idleWorkers] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[workers] operator[SEP... |
public boolean isContaintSensitiveWord(String txt,MatchType matchType){
boolean flag = false;
for(int i = 0 ; i < txt.length() ; i++){
int matchFlag = checkSensitiveWord(txt, i, matchType); //判断是否包含敏感字符
if(matchFlag > 0){ //大于0存在,返回true
flag = true;
}
}
return flag;
} | class class_name[name] begin[{]
method[isContaintSensitiveWord, return_type[type[boolean]], modifier[public], parameter[txt, matchType]] begin[{]
local_variable[type[boolean], flag]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Va... | Keyword[public] Keyword[boolean] identifier[isContaintSensitiveWord] operator[SEP] identifier[String] identifier[txt] , identifier[MatchType] identifier[matchType] operator[SEP] {
Keyword[boolean] identifier[flag] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] o... |
@SuppressWarnings("PMD.EmptyIfStmt")
@Nullable V remap(K key, Object keyRef,
BiFunction<? super K, ? super V, ? extends V> remappingFunction,
long[/* 1 */] now, boolean computeIfAbsent) {
@SuppressWarnings("unchecked")
K[] nodeKey = (K[]) new Object[1];
@SuppressWarnings("unchecked")
V[] o... | class class_name[name] begin[{]
method[remap, return_type[type[V]], modifier[default], parameter[key, keyRef, remappingFunction, now, computeIfAbsent]] begin[{]
local_variable[type[K], nodeKey]
local_variable[type[V], oldValue]
local_variable[type[V], newValue]
local_variable[ty... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Nullable] identifier[V] identifier[remap] operator[SEP] identifier[K] identifier[key] , identifier[Object] identifier[keyRef] , identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[K] , ... |
public CacheManagerBuilder<T> withDefaultSizeOfMaxObjectGraph(long size) {
DefaultSizeOfEngineProviderConfiguration configuration = configBuilder.findServiceByClass(DefaultSizeOfEngineProviderConfiguration.class);
if (configuration == null) {
return new CacheManagerBuilder<>(this, configBuilder.addService... | class class_name[name] begin[{]
method[withDefaultSizeOfMaxObjectGraph, return_type[type[CacheManagerBuilder]], modifier[public], parameter[size]] begin[{]
local_variable[type[DefaultSizeOfEngineProviderConfiguration], configuration]
if[binary_operation[member[.configuration], ==, liter... | Keyword[public] identifier[CacheManagerBuilder] operator[<] identifier[T] operator[>] identifier[withDefaultSizeOfMaxObjectGraph] operator[SEP] Keyword[long] identifier[size] operator[SEP] {
identifier[DefaultSizeOfEngineProviderConfiguration] identifier[configuration] operator[=] identifier[configBuilder] opera... |
static public Date getDate(String str, TimeZone tz, SFSession session) throws SFException
{
try
{
long milliSecsSinceEpoch = Long.valueOf(str) * 86400000;
SFTimestamp tsInUTC = SFTimestamp.fromDate(new Date(milliSecsSinceEpoch),
0, TimeZone.getTime... | class class_name[name] begin[{]
method[getDate, return_type[type[Date]], modifier[public static], parameter[str, tz, session]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(argum... | Keyword[static] Keyword[public] identifier[Date] identifier[getDate] operator[SEP] identifier[String] identifier[str] , identifier[TimeZone] identifier[tz] , identifier[SFSession] identifier[session] operator[SEP] Keyword[throws] identifier[SFException] {
Keyword[try] {
Keyword[long] identifier[mill... |
public void setUser(User user) {
this.user = user;
if (httpSender != null) {
httpSender.setUser(user);
}
} | class class_name[name] begin[{]
method[setUser, return_type[void], modifier[public], parameter[user]] begin[{]
assign[THIS[member[None.user]], member[.user]]
if[binary_operation[member[.httpSender], !=, literal[null]]] begin[{]
call[httpSender.setUser, pa... | Keyword[public] Keyword[void] identifier[setUser] operator[SEP] identifier[User] identifier[user] operator[SEP] {
Keyword[this] operator[SEP] identifier[user] operator[=] identifier[user] operator[SEP] Keyword[if] operator[SEP] identifier[httpSender] operator[!=] Other[null] operator[SEP] {
identifier... |
public void add(String name,String value)
throws IllegalArgumentException
{
if (value==null)
throw new IllegalArgumentException("null value");
FieldInfo info=getFieldInfo(name);
Field field=getField(info,false);
Field last=null;
if (field!=null)
... | class class_name[name] begin[{]
method[add, return_type[void], modifier[public], parameter[name, value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None,... | Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[ne... |
public static String getRepeatedFieldSetterName(Field field) {
if (field.isRepeated()) {
return SETTER_PREFIX + Formatter.toPascalCase(field.getName());
}
throw new IllegalArgumentException(field.toString());
} | class class_name[name] begin[{]
method[getRepeatedFieldSetterName, return_type[type[String]], modifier[public static], parameter[field]] begin[{]
if[call[field.isRepeated, parameter[]]] begin[{]
return[binary_operation[member[.SETTER_PREFIX], +, call[Formatter.toPascalCase, paramete... | Keyword[public] Keyword[static] identifier[String] identifier[getRepeatedFieldSetterName] operator[SEP] identifier[Field] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isRepeated] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] ident... |
@RequestMapping(value = "/api/todolist/{index}",
method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<?> getTodoItem(@PathVariable("index") int index) {
if (index > todoList.size() - 1) {
return new ResponseEntity<>(new TodoItem(-1, "index ... | class class_name[name] begin[{]
method[getTodoItem, return_type[type[ResponseEntity]], modifier[public], parameter[index]] begin[{]
if[binary_operation[member[.index], >, binary_operation[call[todoList.size, parameter[]], -, literal[1]]]] begin[{]
return[ClassCreator(arguments=[Clas... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[produces] operator[=] {
identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON_VALUE]
} operator... |
private static void internalArrayEquals(String message, Object expecteds,
Object actuals) throws ArrayComparisonFailure {
new ExactComparisonCriteria().arrayEquals(message, expecteds, actuals);
} | class class_name[name] begin[{]
method[internalArrayEquals, return_type[void], modifier[private static], parameter[message, expecteds, actuals]] begin[{]
ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[... | Keyword[private] Keyword[static] Keyword[void] identifier[internalArrayEquals] operator[SEP] identifier[String] identifier[message] , identifier[Object] identifier[expecteds] , identifier[Object] identifier[actuals] operator[SEP] Keyword[throws] identifier[ArrayComparisonFailure] {
Keyword[new] identifier[Exac... |
public void getWorldPositions(float[] dest)
{
if (dest.length != mBones.length * 3)
{
throw new IllegalArgumentException("Destination array is the wrong size");
}
sync();
for (int i = 0; i < mBones.length; ++i)
{
int t = i * 3;
dest... | class class_name[name] begin[{]
method[getWorldPositions, return_type[void], modifier[public], parameter[dest]] begin[{]
if[binary_operation[member[dest.length], !=, binary_operation[member[mBones.length], *, literal[3]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[getWorldPositions] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[dest] operator[SEP] {
Keyword[if] operator[SEP] identifier[dest] operator[SEP] identifier[length] operator[!=] identifier[mBones] operator[SEP] identifier[length] operator[*] Other[3] o... |
private void processAttachments(FedoraClient fedora, DigitalObject object,
String vitalPid) throws Exception {
ByteArrayOutputStream out = null;
ByteArrayInputStream in = null;
SolrResult result;
// Search for attachments to this object
String oid = object.getId();
... | class class_name[name] begin[{]
method[processAttachments, return_type[void], modifier[private], parameter[fedora, object, vitalPid]] begin[{]
local_variable[type[ByteArrayOutputStream], out]
local_variable[type[ByteArrayInputStream], in]
local_variable[type[SolrResult], result]
... | Keyword[private] Keyword[void] identifier[processAttachments] operator[SEP] identifier[FedoraClient] identifier[fedora] , identifier[DigitalObject] identifier[object] , identifier[String] identifier[vitalPid] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[ByteArrayOutputStream] identifier[out... |
void triggerSessionRequested(Jingle initJin) {
JingleSessionRequestListener[] jingleSessionRequestListeners;
// Make a synchronized copy of the listenerJingles
synchronized (this.jingleSessionRequestListeners) {
jingleSessionRequestListeners = new JingleSessionRequestListener[this.... | class class_name[name] begin[{]
method[triggerSessionRequested, return_type[void], modifier[default], parameter[initJin]] begin[{]
local_variable[type[JingleSessionRequestListener], jingleSessionRequestListeners]
SYNCHRONIZED[THIS[member[None.jingleSessionRequestListeners]]] BEGIN[{]
... | Keyword[void] identifier[triggerSessionRequested] operator[SEP] identifier[Jingle] identifier[initJin] operator[SEP] {
identifier[JingleSessionRequestListener] operator[SEP] operator[SEP] identifier[jingleSessionRequestListeners] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] ident... |
@Pure
public static <K, V> Pair<K, V> of(K k, V v) {
return new Pair<K, V>(k, v);
} | class class_name[name] begin[{]
method[of, return_type[type[Pair]], modifier[public static], parameter[k, v]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v, postfix_operators=[], prefix_op... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Pair] operator[<] identifier[K] , identifier[V] operator[>] identifier[of] operator[SEP] identifier[K] identifier[k] , identifier[V] identifier[v] operator[SEP] {
Keyword[return] Key... |
public <E> Concatenator LTE(E value) {
getBooleanOp().setOperator(Operator.LTE);
return this.operateOn(value);
} | class class_name[name] begin[{]
method[LTE, return_type[type[Concatenator]], modifier[public], parameter[value]] begin[{]
call[.getBooleanOp, parameter[]]
return[THIS[call[None.operateOn, parameter[member[.value]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[E] operator[>] identifier[Concatenator] identifier[LTE] operator[SEP] identifier[E] identifier[value] operator[SEP] {
identifier[getBooleanOp] operator[SEP] operator[SEP] operator[SEP] identifier[setOperator] operator[SEP] identifier[Operator] operator[SEP] identifier[LTE] ... |
@Override
public RealMatrix outerProduct(RealVector v) {
final int m = this.getDimension();
final int n = v.getDimension();
final RealMatrix product;
if(m > 1000000) { //use only in big values
product = new MapRealMatrix(m, n);
}
else {
product... | class class_name[name] begin[{]
method[outerProduct, return_type[type[RealMatrix]], modifier[public], parameter[v]] begin[{]
local_variable[type[int], m]
local_variable[type[int], n]
local_variable[type[RealMatrix], product]
if[binary_operation[member[.m], >, literal[100... | annotation[@] identifier[Override] Keyword[public] identifier[RealMatrix] identifier[outerProduct] operator[SEP] identifier[RealVector] identifier[v] operator[SEP] {
Keyword[final] Keyword[int] identifier[m] operator[=] Keyword[this] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[SEP... |
@Override
public AsyncAuditOutputStream write(AuditEvent event) {
if (event instanceof AnnotationAuditEvent) {
annotationStream.write((AnnotationAuditEvent) event);
} else {
deferred.accept(event);
b.await();
}
return this;
} | class class_name[name] begin[{]
method[write, return_type[type[AsyncAuditOutputStream]], modifier[public], parameter[event]] begin[{]
if[binary_operation[member[.event], instanceof, type[AnnotationAuditEvent]]] begin[{]
call[annotationStream.write, parameter[Cast(express... | annotation[@] identifier[Override] Keyword[public] identifier[AsyncAuditOutputStream] identifier[write] operator[SEP] identifier[AuditEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] identifier[event] Keyword[instanceof] identifier[AnnotationAuditEvent] operator[SEP] {
identifier[ann... |
public Map<String, Object> getSelectorProperties()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
{
SibTr.entry(tc, "getSelectorProperties");
SibTr.exit(tc, "getSelectorProperties", selectorProperties);
}
return selectorProperties;
} | class class_name[name] begin[{]
method[getSelectorProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, ... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getSelectorProperties] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[t... |
public void hookCommandLineListener(CommandLine cmdLine) throws Exception {
List<CommandLineArgument[]> allCommandLineList = new ArrayList<>();
Map<String, CommandLineListener> extMap = new HashMap<>();
for (Map.Entry<Extension, ExtensionHook> entry : extensionHooks.entrySet()) {
... | class class_name[name] begin[{]
method[hookCommandLineListener, return_type[void], modifier[public], parameter[cmdLine]] begin[{]
local_variable[type[List], allCommandLineList]
local_variable[type[Map], extMap]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclar... | Keyword[public] Keyword[void] identifier[hookCommandLineListener] operator[SEP] identifier[CommandLine] identifier[cmdLine] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[List] operator[<] identifier[CommandLineArgument] operator[SEP] operator[SEP] operator[>] identifier[allCommandLineList] ope... |
public double getDouble(int index) {
byte val = storage[index];
return (double) (isUnsigned() ? DataType.unsignedByteToShort(val) : val);
} | class class_name[name] begin[{]
method[getDouble, return_type[type[double]], modifier[public], parameter[index]] begin[{]
local_variable[type[byte], val]
return[Cast(expression=TernaryExpression(condition=MethodInvocation(arguments=[], member=isUnsigned, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[double] identifier[getDouble] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[byte] identifier[val] operator[=] identifier[storage] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[double] operator[SEP] operator[SEP] id... |
public synchronized TreeEntry<K, V> lowerEntry(final K key) {
// Retorna la clave mas cercana menor a la clave indicada
return getRoundEntry(key, false, false);
} | class class_name[name] begin[{]
method[lowerEntry, return_type[type[TreeEntry]], modifier[synchronized public], parameter[key]] begin[{]
return[call[.getRoundEntry, parameter[member[.key], literal[false], literal[false]]]]
end[}]
END[}] | Keyword[public] Keyword[synchronized] identifier[TreeEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[lowerEntry] operator[SEP] Keyword[final] identifier[K] identifier[key] operator[SEP] {
Keyword[return] identifier[getRoundEntry] operator[SEP] identifier[key] , literal[boolean] , liter... |
private static Method resolveMethod(Class<? extends Handler> handler_class, String handler_method) {
for (Method method : handler_class.getMethods())
if (method.getName().equals(handler_method)) {
Class[] pt = method.getParameterTypes();
if (pt != null && pt.length == 2 && pt[0] == Integer.TYP... | class class_name[name] begin[{]
method[resolveMethod, return_type[type[Method]], modifier[private static], parameter[handler_class, handler_method]] begin[{]
ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=metho... | Keyword[private] Keyword[static] identifier[Method] identifier[resolveMethod] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Handler] operator[>] identifier[handler_class] , identifier[String] identifier[handler_method] operator[SEP] {
Keyword[for] operator[SEP] identifier[M... |
static <E> ImmutableSortedSet<E> unsafeDelegateSortedSet(
SortedSet<E> delegate, boolean isSubset) {
return delegate.isEmpty()
? emptySet(delegate.comparator())
: new RegularImmutableSortedSet<E>(delegate, isSubset);
} | class class_name[name] begin[{]
method[unsafeDelegateSortedSet, return_type[type[ImmutableSortedSet]], modifier[static], parameter[delegate, isSubset]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=delegat... | Keyword[static] operator[<] identifier[E] operator[>] identifier[ImmutableSortedSet] operator[<] identifier[E] operator[>] identifier[unsafeDelegateSortedSet] operator[SEP] identifier[SortedSet] operator[<] identifier[E] operator[>] identifier[delegate] , Keyword[boolean] identifier[isSubset] operator[SEP] {
Ke... |
public Box<Object> out(Object key, int type, String struct,
Converter decoder) {
Parameter parameter = new Parameter();
parameter.setOutput(new Box<Object>());
parameter.setType(type);
parameter.setStruct(struct);
parameter.setDecoder(decoder);
return merge(ke... | class class_name[name] begin[{]
method[out, return_type[type[Box]], modifier[public], parameter[key, type, struct, decoder]] begin[{]
local_variable[type[Parameter], parameter]
call[parameter.setOutput, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, pos... | Keyword[public] identifier[Box] operator[<] identifier[Object] operator[>] identifier[out] operator[SEP] identifier[Object] identifier[key] , Keyword[int] identifier[type] , identifier[String] identifier[struct] , identifier[Converter] identifier[decoder] operator[SEP] {
identifier[Parameter] identifier[param... |
static BinaryToASCIIConverter getBinaryToASCIIConverter(double d, boolean isCompatibleFormat) {
long dBits = Double.doubleToRawLongBits(d);
boolean isNegative = (dBits&DoubleConsts.SIGN_BIT_MASK) != 0; // discover sign
long fractBits = dBits & DoubleConsts.SIGNIF_BIT_MASK;
int binExp = ... | class class_name[name] begin[{]
method[getBinaryToASCIIConverter, return_type[type[BinaryToASCIIConverter]], modifier[static], parameter[d, isCompatibleFormat]] begin[{]
local_variable[type[long], dBits]
local_variable[type[boolean], isNegative]
local_variable[type[long], fractBits]
... | Keyword[static] identifier[BinaryToASCIIConverter] identifier[getBinaryToASCIIConverter] operator[SEP] Keyword[double] identifier[d] , Keyword[boolean] identifier[isCompatibleFormat] operator[SEP] {
Keyword[long] identifier[dBits] operator[=] identifier[Double] operator[SEP] identifier[doubleToRawLongBits] oper... |
public void applyToSourceUnits(SourceUnitOperation body) throws CompilationFailedException {
for (String name : names) {
SourceUnit source = sources.get(name);
if ((source.phase < phase) || (source.phase == phase && !source.phaseComplete)) {
try {
body... | class class_name[name] begin[{]
method[applyToSourceUnits, return_type[void], modifier[public], parameter[body]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argumen... | Keyword[public] Keyword[void] identifier[applyToSourceUnits] operator[SEP] identifier[SourceUnitOperation] identifier[body] operator[SEP] Keyword[throws] identifier[CompilationFailedException] {
Keyword[for] operator[SEP] identifier[String] identifier[name] operator[:] identifier[names] operator[SEP] {
... |
public Observable<Void> promoteAsync(String resourceGroupName, String clusterName, String scriptExecutionId) {
return promoteWithServiceResponseAsync(resourceGroupName, clusterName, scriptExecutionId).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceRespon... | class class_name[name] begin[{]
method[promoteAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, clusterName, scriptExecutionId]] begin[{]
return[call[.promoteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.clusterName], member[.scriptExecutionI... | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[promoteAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[clusterName] , identifier[String] identifier[scriptExecutionId] operator[SEP] {
Keyword[return] identifier[prom... |
public String replaceObjectNameParameters (String pattern, MBeanLocationParameterSource parameterSource) {
Matcher matcher = replaceParamPattern.matcher(pattern);
StringBuffer result = new StringBuffer();
while ( matcher.find() ) {
String name = matcher.group("paramName");
... | class class_name[name] begin[{]
method[replaceObjectNameParameters, return_type[type[String]], modifier[public], parameter[pattern, parameterSource]] begin[{]
local_variable[type[Matcher], matcher]
local_variable[type[StringBuffer], result]
while[call[matcher.find, parameter[]]]... | Keyword[public] identifier[String] identifier[replaceObjectNameParameters] operator[SEP] identifier[String] identifier[pattern] , identifier[MBeanLocationParameterSource] identifier[parameterSource] operator[SEP] {
identifier[Matcher] identifier[matcher] operator[=] identifier[replaceParamPattern] operator[SEP]... |
public static RequestParameter exists(final String name)
{
return new RequestParameter(name, "{" + RequestParameter.class.getName() + "_" + name + "_value}") {
@Override
public String toString()
{
return "RequestParameter.exists(\"" + name + "\")";
}
};
... | class class_name[name] begin[{]
method[exists, return_type[type[RequestParameter]], modifier[public static], parameter[name]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperati... | Keyword[public] Keyword[static] identifier[RequestParameter] identifier[exists] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
Keyword[return] Keyword[new] identifier[RequestParameter] operator[SEP] identifier[name] , literal[String] operator[+] identifier[RequestParameter] ope... |
private boolean ignoreCompoundWithIgnoredWord(String word) throws IOException {
if (!StringTools.startsWithUppercase(word) && !StringUtils.startsWithAny(word, "nord", "west", "ost", "süd")) {
// otherwise stuff like "rumfangreichen" gets accepted
return false;
}
String[] words = word.split("-");... | class class_name[name] begin[{]
method[ignoreCompoundWithIgnoredWord, return_type[type[boolean]], modifier[private], parameter[word]] begin[{]
if[binary_operation[call[StringTools.startsWithUppercase, parameter[member[.word]]], &&, call[StringUtils.startsWithAny, parameter[member[.word], litera... | Keyword[private] Keyword[boolean] identifier[ignoreCompoundWithIgnoredWord] operator[SEP] identifier[String] identifier[word] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[StringTools] operator[SEP] identifier[startsWithUppercase] operator[SEP] identifie... |
public Observable<ServiceResponse<List<EntityRole>>> getHierarchicalEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
... | class class_name[name] begin[{]
method[getHierarchicalEntityRolesWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, hEntityId]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.endpoint, parameter[]]], ==, literal[null]]] begin[{... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[EntityRole] operator[>] operator[>] operator[>] identifier[getHierarchicalEntityRolesWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identif... |
public void setContentView(int resId) {
if (mCurrentLayoutId != resId) {
View view = inflate(mContext, resId, null);
if (mDefaultContentView == null &&
resId == mCallback.getContentViewDefaultLayoutId(this)) {
mDefaultContentView = view;
mD... | class class_name[name] begin[{]
method[setContentView, return_type[void], modifier[public], parameter[resId]] begin[{]
if[binary_operation[member[.mCurrentLayoutId], !=, member[.resId]]] begin[{]
local_variable[type[View], view]
if[binary_operation[binary_ope... | Keyword[public] Keyword[void] identifier[setContentView] operator[SEP] Keyword[int] identifier[resId] operator[SEP] {
Keyword[if] operator[SEP] identifier[mCurrentLayoutId] operator[!=] identifier[resId] operator[SEP] {
identifier[View] identifier[view] operator[=] identifier[inflate] operator[SEP] id... |
public static Money parse(CharSequence text, MonetaryAmountFormat formatter) {
return from(formatter.parse(text));
} | class class_name[name] begin[{]
method[parse, return_type[type[Money]], modifier[public static], parameter[text, formatter]] begin[{]
return[call[.from, parameter[call[formatter.parse, parameter[member[.text]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Money] identifier[parse] operator[SEP] identifier[CharSequence] identifier[text] , identifier[MonetaryAmountFormat] identifier[formatter] operator[SEP] {
Keyword[return] identifier[from] operator[SEP] identifier[formatter] operator[SEP] identifier[parse] operator[SEP] ... |
@Override
public void unregisterAttributeListener(String attributeName, AttributeListener attributeListener) {
List<AttributeListener> listeners = attributeListeners.get(attributeName);
if (listeners == null) {
LOG.error("trying to unregister an attribute listener for attribute \"" + att... | class class_name[name] begin[{]
method[unregisterAttributeListener, return_type[void], modifier[public], parameter[attributeName, attributeListener]] begin[{]
local_variable[type[List], listeners]
if[binary_operation[member[.listeners], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[unregisterAttributeListener] operator[SEP] identifier[String] identifier[attributeName] , identifier[AttributeListener] identifier[attributeListener] operator[SEP] {
identifier[List] operator[<] identifier[AttributeListener] operator[>]... |
public ScriptEngine getScriptEngine(String language, boolean resolveFromCache) {
ScriptEngine scriptEngine = null;
if (resolveFromCache) {
scriptEngine = cachedEngines.get(language);
if(scriptEngine == null) {
scriptEngine = scriptEngineManager.getEngineByName(language);
if(scrip... | class class_name[name] begin[{]
method[getScriptEngine, return_type[type[ScriptEngine]], modifier[public], parameter[language, resolveFromCache]] begin[{]
local_variable[type[ScriptEngine], scriptEngine]
if[member[.resolveFromCache]] begin[{]
assign[member[.scrip... | Keyword[public] identifier[ScriptEngine] identifier[getScriptEngine] operator[SEP] identifier[String] identifier[language] , Keyword[boolean] identifier[resolveFromCache] operator[SEP] {
identifier[ScriptEngine] identifier[scriptEngine] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[... |
private static StackTraceElement normalizeClassName(final StackTraceElement element) {
String className = element.getClassName();
int dollarIndex = className.indexOf("$");
if (dollarIndex == -1) {
return element;
} else {
className = stripAnonymousPart(className);
return new StackTraceElement(className... | class class_name[name] begin[{]
method[normalizeClassName, return_type[type[StackTraceElement]], modifier[private static], parameter[element]] begin[{]
local_variable[type[String], className]
local_variable[type[int], dollarIndex]
if[binary_operation[member[.dollarIndex], ==, li... | Keyword[private] Keyword[static] identifier[StackTraceElement] identifier[normalizeClassName] operator[SEP] Keyword[final] identifier[StackTraceElement] identifier[element] operator[SEP] {
identifier[String] identifier[className] operator[=] identifier[element] operator[SEP] identifier[getClassName] operator[SEP... |
public ServiceFuture<List<ExplicitListItem>> getExplicitListAsync(UUID appId, String versionId, UUID entityId, final ServiceCallback<List<ExplicitListItem>> serviceCallback) {
return ServiceFuture.fromResponse(getExplicitListWithServiceResponseAsync(appId, versionId, entityId), serviceCallback);
} | class class_name[name] begin[{]
method[getExplicitListAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, entityId, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.getExplicitListWithServiceResponseAsync, parameter[member[.appId], me... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[ExplicitListItem] operator[>] operator[>] identifier[getExplicitListAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] , Keyword[final]... |
public URI toURI() throws URISyntaxException {
if (m_isStrict && m_errorFree) {
// we have already verified that the URI contains no errors
return new URI(m_uri);
}
// create a new URI from the components
// using this constructor the input will be escaped if req... | class class_name[name] begin[{]
method[toURI, return_type[type[URI]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_isStrict], &&, member[.m_errorFree]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=m_uri, postfix_operators=[], prefix_operat... | Keyword[public] identifier[URI] identifier[toURI] operator[SEP] operator[SEP] Keyword[throws] identifier[URISyntaxException] {
Keyword[if] operator[SEP] identifier[m_isStrict] operator[&&] identifier[m_errorFree] operator[SEP] {
Keyword[return] Keyword[new] identifier[URI] operator[SEP] identifier[m_u... |
public static String convertMethodSignature(XMethod xmethod) {
@DottedClassName
String className = xmethod.getClassName();
assert className.indexOf('/') == -1;
return convertMethodSignature(className, xmethod.getName(), xmethod.getSignature());
} | class class_name[name] begin[{]
method[convertMethodSignature, return_type[type[String]], modifier[public static], parameter[xmethod]] begin[{]
local_variable[type[String], className]
AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], pr... | Keyword[public] Keyword[static] identifier[String] identifier[convertMethodSignature] operator[SEP] identifier[XMethod] identifier[xmethod] operator[SEP] {
annotation[@] identifier[DottedClassName] identifier[String] identifier[className] operator[=] identifier[xmethod] operator[SEP] identifier[getClassName] ope... |
private boolean handleClassWithIndexForSortOnly(OSelectExecutionPlan plan, OIdentifier queryTarget, Set<String> filterClusters,
QueryPlanningInfo info, OCommandContext ctx, boolean profilingEnabled) {
OSchema schema = getSchemaFromContext(ctx);
OClass clazz = schema.getClass(queryTarget.getStringValue());... | class class_name[name] begin[{]
method[handleClassWithIndexForSortOnly, return_type[type[boolean]], modifier[private], parameter[plan, queryTarget, filterClusters, info, ctx, profilingEnabled]] begin[{]
local_variable[type[OSchema], schema]
local_variable[type[OClass], clazz]
if... | Keyword[private] Keyword[boolean] identifier[handleClassWithIndexForSortOnly] operator[SEP] identifier[OSelectExecutionPlan] identifier[plan] , identifier[OIdentifier] identifier[queryTarget] , identifier[Set] operator[<] identifier[String] operator[>] identifier[filterClusters] , identifier[QueryPlanningInfo] ident... |
public BooleanColumn set(Selection rowSelection, boolean newValue) {
for (int row : rowSelection) {
set(row, newValue);
}
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[BooleanColumn]], modifier[public], parameter[rowSelection, newValue]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[... | Keyword[public] identifier[BooleanColumn] identifier[set] operator[SEP] identifier[Selection] identifier[rowSelection] , Keyword[boolean] identifier[newValue] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[row] operator[:] identifier[rowSelection] operator[SEP] {
identifier[set] ... |
public static void usage(Object command, PrintStream out) {
toCommandLine(command, new DefaultFactory()).usage(out);
} | class class_name[name] begin[{]
method[usage, return_type[void], modifier[public static], parameter[command, out]] begin[{]
call[.toCommandLine, parameter[member[.command], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] Keyword[static] Keyword[void] identifier[usage] operator[SEP] identifier[Object] identifier[command] , identifier[PrintStream] identifier[out] operator[SEP] {
identifier[toCommandLine] operator[SEP] identifier[command] , Keyword[new] identifier[DefaultFactory] operator[SEP] operator[SEP] operat... |
public UpdatePullRequestParams notifiedUserIds(List<Long> notifiedUserIds) {
for (Long notifiedUserId : notifiedUserIds) {
parameters.add(new NameValuePair("notifiedUserId[]", notifiedUserId.toString()));
}
return this;
} | class class_name[name] begin[{]
method[notifiedUserIds, return_type[type[UpdatePullRequestParams]], modifier[public], parameter[notifiedUserIds]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(... | Keyword[public] identifier[UpdatePullRequestParams] identifier[notifiedUserIds] operator[SEP] identifier[List] operator[<] identifier[Long] operator[>] identifier[notifiedUserIds] operator[SEP] {
Keyword[for] operator[SEP] identifier[Long] identifier[notifiedUserId] operator[:] identifier[notifiedUserIds] opera... |
@Override
public Datastream getDatastream(Context context,
String pid,
String datastreamID,
Date asOfDateTime) throws ServerException {
return mgmt.getDatastream(context, pid, datastreamID, asOfDateTi... | class class_name[name] begin[{]
method[getDatastream, return_type[type[Datastream]], modifier[public], parameter[context, pid, datastreamID, asOfDateTime]] begin[{]
return[call[mgmt.getDatastream, parameter[member[.context], member[.pid], member[.datastreamID], member[.asOfDateTime]]]]
end[}]
END[}... | annotation[@] identifier[Override] Keyword[public] identifier[Datastream] identifier[getDatastream] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[pid] , identifier[String] identifier[datastreamID] , identifier[Date] identifier[asOfDateTime] operator[SEP] Keyword[throws] identi... |
public static Method getSingleSetter(String fieldName, Class<?> clazz) {
String setterName = buildSetterName(fieldName);
try {
// Using getMathods(), getMathod(...) expects exact parameter type
// matching and ignores inheritance-tree.
Method[] methods = clazz.getMethods();
List<Method> ... | class class_name[name] begin[{]
method[getSingleSetter, return_type[type[Method]], modifier[public static], parameter[fieldName, clazz]] begin[{]
local_variable[type[String], setterName]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ... | Keyword[public] Keyword[static] identifier[Method] identifier[getSingleSetter] operator[SEP] identifier[String] identifier[fieldName] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
identifier[String] identifier[setterName] operator[=] identifier[buildSetterName] operat... |
@CanIgnoreReturnValue
@NonNullDecl
public static <T extends Object> T checkNotNull(
@NonNullDecl T reference,
@NullableDecl String errorMessageTemplate,
@NullableDecl Object... errorMessageArgs) {
if (reference == null) {
throw new NullPointerException(lenientFormat(errorMessageTemplate,... | class class_name[name] begin[{]
method[checkNotNull, return_type[type[T]], modifier[public static], parameter[reference, errorMessageTemplate, errorMessageArgs]] begin[{]
if[binary_operation[member[.reference], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | annotation[@] identifier[CanIgnoreReturnValue] annotation[@] identifier[NonNullDecl] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Object] operator[>] identifier[T] identifier[checkNotNull] operator[SEP] annotation[@] identifier[NonNullDecl] identifier[T] identifier[reference] , ... |
@Override
public CPOptionValue findByUuid_C_First(String uuid, long companyId,
OrderByComparator<CPOptionValue> orderByComparator)
throws NoSuchCPOptionValueException {
CPOptionValue cpOptionValue = fetchByUuid_C_First(uuid, companyId,
orderByComparator);
if (cpOptionValue != null) {
return cpOptionVal... | class class_name[name] begin[{]
method[findByUuid_C_First, return_type[type[CPOptionValue]], modifier[public], parameter[uuid, companyId, orderByComparator]] begin[{]
local_variable[type[CPOptionValue], cpOptionValue]
if[binary_operation[member[.cpOptionValue], !=, literal[null]]] begin... | annotation[@] identifier[Override] Keyword[public] identifier[CPOptionValue] identifier[findByUuid_C_First] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPOptionValue] operator[>] identifier[orderByComparator] operator[S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.