code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Image getRemoteImage (String url, int width, int height) {
Exception error = new Exception(
"Remote image loading not yet supported: " + url + "@" + width + "x" + height);
ImageImpl image = createImage(false, width, height, url);
image.fail(error);
return image;
} | class class_name[name] begin[{]
method[getRemoteImage, return_type[type[Image]], modifier[public], parameter[url, width, height]] begin[{]
local_variable[type[Exception], error]
local_variable[type[ImageImpl], image]
call[image.fail, parameter[member[.error]]]
return[mem... | Keyword[public] identifier[Image] identifier[getRemoteImage] operator[SEP] identifier[String] identifier[url] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
identifier[Exception] identifier[error] operator[=] Keyword[new] identifier[Exception] operator[SEP] literal[String] o... |
private String validateFilename(String filename) {
// if its an external filename, use it directly
if (isExternal(filename)) {
return filename;
}
// check if this resource name does already exist
// if so add a postfix to the name
int postfix = 1;
b... | class class_name[name] begin[{]
method[validateFilename, return_type[type[String]], modifier[private], parameter[filename]] begin[{]
if[call[.isExternal, parameter[member[.filename]]]] begin[{]
return[member[.filename]]
else begin[{]
None
end[}]
local_variabl... | Keyword[private] identifier[String] identifier[validateFilename] operator[SEP] identifier[String] identifier[filename] operator[SEP] {
Keyword[if] operator[SEP] identifier[isExternal] operator[SEP] identifier[filename] operator[SEP] operator[SEP] {
Keyword[return] identifier[filename] operator[SEP]
... |
public void marshall(GetHostnameSuggestionRequest getHostnameSuggestionRequest, ProtocolMarshaller protocolMarshaller) {
if (getHostnameSuggestionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getHostnameSuggestionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getHostnameSuggestionRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetHostnameSuggestionRequest] identifier[getHostnameSuggestionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getHostnameSuggestionRequest] operator[==] Other... |
@DoesServiceRequest
public ArrayList<FileRange> downloadFileRanges(final AccessCondition accessCondition, FileRequestOptions options,
OperationContext opContext) throws StorageException {
if (opContext == null) {
opContext = new OperationContext();
}
options = FileRe... | class class_name[name] begin[{]
method[downloadFileRanges, return_type[type[ArrayList]], modifier[public], parameter[accessCondition, options, opContext]] begin[{]
if[binary_operation[member[.opContext], ==, literal[null]]] begin[{]
assign[member[.opContext], ClassCreato... | annotation[@] identifier[DoesServiceRequest] Keyword[public] identifier[ArrayList] operator[<] identifier[FileRange] operator[>] identifier[downloadFileRanges] operator[SEP] Keyword[final] identifier[AccessCondition] identifier[accessCondition] , identifier[FileRequestOptions] identifier[options] , identifier[Operati... |
public Pager<Project> getForks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return new Pager<Project>(this, Project.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "forks");
} | class class_name[name] begin[{]
method[getForks, return_type[type[Pager]], modifier[public], parameter[projectIdOrPath, itemsPerPage]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_opera... | Keyword[public] identifier[Pager] operator[<] identifier[Project] operator[>] identifier[getForks] operator[SEP] identifier[Object] identifier[projectIdOrPath] , Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] Keyword[new] identifier[Pager] op... |
@SuppressWarnings("unchecked")
public static List<LbConfig> unwrapLoadBalancingConfigList(List<Map<String, ?>> list) {
ArrayList<LbConfig> result = new ArrayList<>();
for (Map<String, ?> rawChildPolicy : list) {
result.add(unwrapLoadBalancingConfig(rawChildPolicy));
}
return Collections.unmodifi... | class class_name[name] begin[{]
method[unwrapLoadBalancingConfigList, return_type[type[List]], modifier[public static], parameter[list]] begin[{]
local_variable[type[ArrayList], result]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(argu... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[LbConfig] operator[>] identifier[unwrapLoadBalancingConfigList] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , oper... |
public static Table setPadding (final Padding padding, final Table table) {
table.pad(padding.getTop(), padding.getLeft(), padding.getBottom(), padding.getRight());
return table;
} | class class_name[name] begin[{]
method[setPadding, return_type[type[Table]], modifier[public static], parameter[padding, table]] begin[{]
call[table.pad, parameter[call[padding.getTop, parameter[]], call[padding.getLeft, parameter[]], call[padding.getBottom, parameter[]], call[padding.getRight,... | Keyword[public] Keyword[static] identifier[Table] identifier[setPadding] operator[SEP] Keyword[final] identifier[Padding] identifier[padding] , Keyword[final] identifier[Table] identifier[table] operator[SEP] {
identifier[table] operator[SEP] identifier[pad] operator[SEP] identifier[padding] operator[SEP] ident... |
public boolean isToday() {
Validate.notNull(getValue(), getClass().getSimpleName() + " contains null value");
return DateUtils.isSameDay(new Date(), getValue());
} | class class_name[name] begin[{]
method[isToday, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
call[Validate.notNull, parameter[call[.getValue, parameter[]], binary_operation[call[.getClass, parameter[]], +, literal[" contains null value"]]]]
return[call[DateUtils.i... | Keyword[public] Keyword[boolean] identifier[isToday] operator[SEP] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operat... |
public LRResult getObtainJSONData(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly) throws LRException
{
return getObtainJSONData(requestID, byResourceID, byDocID, idsOnly, null);
} | class class_name[name] begin[{]
method[getObtainJSONData, return_type[type[LRResult]], modifier[public], parameter[requestID, byResourceID, byDocID, idsOnly]] begin[{]
return[call[.getObtainJSONData, parameter[member[.requestID], member[.byResourceID], member[.byDocID], member[.idsOnly], literal[null]]... | Keyword[public] identifier[LRResult] identifier[getObtainJSONData] operator[SEP] identifier[String] identifier[requestID] , identifier[Boolean] identifier[byResourceID] , identifier[Boolean] identifier[byDocID] , identifier[Boolean] identifier[idsOnly] operator[SEP] Keyword[throws] identifier[LRException] {
K... |
@RequiresPermission(Manifest.permission.INTERNET)
protected static Observable<Boolean> observeInternetConnectivity(
final InternetObservingStrategy strategy, final int initialIntervalInMs,
final int intervalInMs, final String host, final int port, final int timeoutInMs,
final int httpResponse, final... | class class_name[name] begin[{]
method[observeInternetConnectivity, return_type[type[Observable]], modifier[static protected], parameter[strategy, initialIntervalInMs, intervalInMs, host, port, timeoutInMs, httpResponse, errorHandler]] begin[{]
call[.checkStrategyIsNotNull, parameter[member[.st... | annotation[@] identifier[RequiresPermission] operator[SEP] identifier[Manifest] operator[SEP] identifier[permission] operator[SEP] identifier[INTERNET] operator[SEP] Keyword[protected] Keyword[static] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[observeInternetConnectivity] operator[SEP... |
public static int dataCompare(final Bits left, final Bits right) {
for (int i = 0; i < left.bytes.length; i++) {
if (right.bytes.length <= i) {
return 1;
}
final int a = left.bytes[i] & 0xFF;
final int b = right.bytes[i] & 0xFF;
if (a < b) {
return -1;
}
if ... | class class_name[name] begin[{]
method[dataCompare, return_type[type[int]], modifier[public static], parameter[left, right]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_opera... | Keyword[public] Keyword[static] Keyword[int] identifier[dataCompare] operator[SEP] Keyword[final] identifier[Bits] identifier[left] , Keyword[final] identifier[Bits] identifier[right] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[... |
private BufferedImage getImage(String url) throws Exception {
HttpGet get = null;
LOGGER.info("ImageManipulation: GET " + url);
try {
DefaultHttpClient client = new DefaultHttpClient(cManager);
client.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 20... | class class_name[name] begin[{]
method[getImage, return_type[type[BufferedImage]], modifier[private], parameter[url]] begin[{]
local_variable[type[HttpGet], get]
call[LOGGER.info, parameter[binary_operation[literal["ImageManipulation: GET "], +, member[.url]]]]
TryStatement(bloc... | Keyword[private] identifier[BufferedImage] identifier[getImage] operator[SEP] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[HttpGet] identifier[get] operator[=] Other[null] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[... |
public SufficientStatistics train(ParametricFactorGraph bn,
SufficientStatistics initialParameters, List<DynamicAssignment> trainingData) {
ExpectationMaximization em = new ExpectationMaximization(numIterations, log);
EmFactorGraphOracle oracle = new EmFactorGraphOracle(bn, marginalCalculator, i... | class class_name[name] begin[{]
method[train, return_type[type[SufficientStatistics]], modifier[public], parameter[bn, initialParameters, trainingData]] begin[{]
local_variable[type[ExpectationMaximization], em]
local_variable[type[EmFactorGraphOracle], oracle]
return[call[em.train, par... | Keyword[public] identifier[SufficientStatistics] identifier[train] operator[SEP] identifier[ParametricFactorGraph] identifier[bn] , identifier[SufficientStatistics] identifier[initialParameters] , identifier[List] operator[<] identifier[DynamicAssignment] operator[>] identifier[trainingData] operator[SEP] {
id... |
public void setDeclaredParam(JvmFormalParameter newDeclaredParam)
{
if (newDeclaredParam != declaredParam)
{
NotificationChain msgs = null;
if (declaredParam != null)
msgs = ((InternalEObject)declaredParam).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XCATCH_CLAUSE__DECLARED_PARAM, null, ms... | class class_name[name] begin[{]
method[setDeclaredParam, return_type[void], modifier[public], parameter[newDeclaredParam]] begin[{]
if[binary_operation[member[.newDeclaredParam], !=, member[.declaredParam]]] begin[{]
local_variable[type[NotificationChain], msgs]
... | Keyword[public] Keyword[void] identifier[setDeclaredParam] operator[SEP] identifier[JvmFormalParameter] identifier[newDeclaredParam] operator[SEP] {
Keyword[if] operator[SEP] identifier[newDeclaredParam] operator[!=] identifier[declaredParam] operator[SEP] {
identifier[NotificationChain] identifier[ms... |
private void fireMultipleLinePropertyParsedEvent(String name, String[] value)
{
MultipleLinePropertyParsedEvent _event = new MultipleLinePropertyParsedEvent(name, value);
for (PropertiesParsingListener _listener : getListeners())
{
_listener.onMultipleLinePropertyParsed(_event);
}
} | class class_name[name] begin[{]
method[fireMultipleLinePropertyParsedEvent, return_type[void], modifier[private], parameter[name, value]] begin[{]
local_variable[type[MultipleLinePropertyParsedEvent], _event]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expressio... | Keyword[private] Keyword[void] identifier[fireMultipleLinePropertyParsedEvent] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[SEP] operator[SEP] identifier[value] operator[SEP] {
identifier[MultipleLinePropertyParsedEvent] identifier[_event] operator[=] Keyword[new] identifier[M... |
@Override
public CommerceCurrency[] findByUuid_PrevAndNext(long commerceCurrencyId,
String uuid, OrderByComparator<CommerceCurrency> orderByComparator)
throws NoSuchCurrencyException {
CommerceCurrency commerceCurrency = findByPrimaryKey(commerceCurrencyId);
Session session = null;
try {
session = openS... | class class_name[name] begin[{]
method[findByUuid_PrevAndNext, return_type[type[CommerceCurrency]], modifier[public], parameter[commerceCurrencyId, uuid, orderByComparator]] begin[{]
local_variable[type[CommerceCurrency], commerceCurrency]
local_variable[type[Session], session]
TryState... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceCurrency] operator[SEP] operator[SEP] identifier[findByUuid_PrevAndNext] operator[SEP] Keyword[long] identifier[commerceCurrencyId] , identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceCurrency] opera... |
public SourceFile findSourceFile(String packageName, String fileName) throws IOException {
// On windows the fileName specification is different between a file in
// a directory tree, and a
// file in a zip file. In a directory tree the separator used is '\',
// while in a zip it's '/'
... | class class_name[name] begin[{]
method[findSourceFile, return_type[type[SourceFile]], modifier[public], parameter[packageName, fileName]] begin[{]
local_variable[type[String], platformName]
local_variable[type[String], canonicalName]
local_variable[type[SourceFile], sourceFile]
... | Keyword[public] identifier[SourceFile] identifier[findSourceFile] operator[SEP] identifier[String] identifier[packageName] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[platformName] operator[=] identifier[getPlatformName] operato... |
protected void appendCyclicObject(final StringBuffer buffer, final String fieldName, final Object value) {
ObjectUtils.identityToString(buffer, value);
} | class class_name[name] begin[{]
method[appendCyclicObject, return_type[void], modifier[protected], parameter[buffer, fieldName, value]] begin[{]
call[ObjectUtils.identityToString, parameter[member[.buffer], member[.value]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[appendCyclicObject] operator[SEP] Keyword[final] identifier[StringBuffer] identifier[buffer] , Keyword[final] identifier[String] identifier[fieldName] , Keyword[final] identifier[Object] identifier[value] operator[SEP] {
identifier[ObjectUtils] operator[SEP] identifi... |
protected void initPage() throws DocumentException {
// the pagenumber is incremented
pageN++;
// initialization of some page objects
annotationsImp.resetAnnotations();
pageResources = new PageResources();
writer.resetContent();
graphics = new PdfContentByte(wri... | class class_name[name] begin[{]
method[initPage, return_type[void], modifier[protected], parameter[]] begin[{]
member[.pageN]
call[annotationsImp.resetAnnotations, parameter[]]
assign[member[.pageResources], ClassCreator(arguments=[], body=None, constructor_type_... | Keyword[protected] Keyword[void] identifier[initPage] operator[SEP] operator[SEP] Keyword[throws] identifier[DocumentException] {
identifier[pageN] operator[++] operator[SEP] identifier[annotationsImp] operator[SEP] identifier[resetAnnotations] operator[SEP] operator[SEP] operator[SEP] identifier[pageResources] ... |
@Override
public final <T> int retrieveAndWriteEntities(
final Map<String, Object> pAddParam,
final Class<T> pEntityClass, final Writer pWriter) throws Exception {
//e.g. "limit 20 offset 19":
//e.g. "where (ITSID>0 and IDDATABASEBIRTH=2135) limit 20 offset 19":
String conditions = (String) pAdd... | class class_name[name] begin[{]
method[retrieveAndWriteEntities, return_type[type[int]], modifier[final public], parameter[pAddParam, pEntityClass, pWriter]] begin[{]
local_variable[type[String], conditions]
local_variable[type[int], requestingDatabaseVersion]
local_variable[type[int], ... | annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] Keyword[int] identifier[retrieveAndWriteEntities] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[Class... |
public EEnum getIfcProjectOrderTypeEnum() {
if (ifcProjectOrderTypeEnumEEnum == null) {
ifcProjectOrderTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(875);
}
return ifcProjectOrderTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcProjectOrderTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcProjectOrderTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcProjectOrderTypeEnumEEnum], Cast... | Keyword[public] identifier[EEnum] identifier[getIfcProjectOrderTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcProjectOrderTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcProjectOrderTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operat... |
@SuppressFBWarnings(value = "GC_UNRELATED_TYPES", justification = "Cross-comparison is intended")
public Class<?> find(ClassLoader classLoader, T key) {
ConcurrentMap<T, Reference<Class<?>>> storage = cache.get(new LookupKey(classLoader));
if (storage == null) {
return NOT_FOUND;
... | class class_name[name] begin[{]
method[find, return_type[type[Class]], modifier[public], parameter[classLoader, key]] begin[{]
local_variable[type[ConcurrentMap], storage]
if[binary_operation[member[.storage], ==, literal[null]]] begin[{]
return[member[.NOT_FOUND]]
e... | annotation[@] identifier[SuppressFBWarnings] operator[SEP] identifier[value] operator[=] literal[String] , identifier[justification] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[find] operator[SEP] identifier[ClassLoader] identifier[classLoa... |
void write(ObjectOutputStream out) throws IOException {
PutField fields = out.putFields();
fields.put(CONTEXT, threadContextDescriptor.serialize());
fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties());
fields.put(INTERNAL_PROP_NAMES, internalPropNames);
B... | class class_name[name] begin[{]
method[write, return_type[void], modifier[default], parameter[out]] begin[{]
local_variable[type[PutField], fields]
call[fields.put, parameter[member[.CONTEXT], call[threadContextDescriptor.serialize, parameter[]]]]
call[fields.put, parame... | Keyword[void] identifier[write] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[PutField] identifier[fields] operator[=] identifier[out] operator[SEP] identifier[putFields] operator[SEP] operator[SEP] operator[SEP] identifier[fields]... |
@Override
public ScheduledFuture<?> schedule(Runnable task, Date startTime) {
long initialDelay = startTime.getTime() - System.currentTimeMillis();
try {
return this.scheduledExecutor.schedule(decorateTask(task, false), initialDelay, TimeUnit.MILLISECONDS);
} catch (RejectedExecu... | class class_name[name] begin[{]
method[schedule, return_type[type[ScheduledFuture]], modifier[public], parameter[task, startTime]] begin[{]
local_variable[type[long], initialDelay]
TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, sel... | annotation[@] identifier[Override] Keyword[public] identifier[ScheduledFuture] operator[<] operator[?] operator[>] identifier[schedule] operator[SEP] identifier[Runnable] identifier[task] , identifier[Date] identifier[startTime] operator[SEP] {
Keyword[long] identifier[initialDelay] operator[=] identifier[start... |
private void check() throws CouchbaseLiteException {
synchronized (lock) {
if (c4query != null) { return; }
database = (Database) from.getSource();
final String json = encodeAsJson();
Log.v(DOMAIN, "Query encoded as %s", json);
if (json == null) { thr... | class class_name[name] begin[{]
method[check, return_type[void], modifier[private], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[member[.c4query], !=, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[private] Keyword[void] identifier[check] operator[SEP] operator[SEP] Keyword[throws] identifier[CouchbaseLiteException] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] identifier[c4query] operator[!=] Other[null] operator[SEP] {
K... |
@Override
public EClass getIfcAdvancedFace() {
if (ifcAdvancedFaceEClass == null) {
ifcAdvancedFaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(9);
}
return ifcAdvancedFaceEClass;
} | class class_name[name] begin[{]
method[getIfcAdvancedFace, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcAdvancedFaceEClass], ==, literal[null]]] begin[{]
assign[member[.ifcAdvancedFaceEClass], Cast(expression=MethodInv... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcAdvancedFace] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcAdvancedFaceEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcAdvancedFaceEClass] operator[=] operator[SEP] identifier... |
public static <T extends ImageBase<T>>
void rectifyImages(T distortedLeft,
T distortedRight,
Se3_F64 leftToRight,
CameraPinholeBrown intrinsicLeft,
CameraPinholeBrown intrinsicRight,
T rectifiedLeft,
T rectifiedRight,
GrayU8 rectifiedMask,
DMatrixRMaj rec... | class class_name[name] begin[{]
method[rectifyImages, return_type[void], modifier[public static], parameter[distortedLeft, distortedRight, leftToRight, intrinsicLeft, intrinsicRight, rectifiedLeft, rectifiedRight, rectifiedMask, rectifiedK, rectifiedR]] begin[{]
local_variable[type[RectifyCalibrated], ... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ImageBase] operator[<] identifier[T] operator[>] operator[>] Keyword[void] identifier[rectifyImages] operator[SEP] identifier[T] identifier[distortedLeft] , identifier[T] identifier[distortedRight] , identifier[Se3_F64] identifier[l... |
protected Map<String, String> initialize(final Map<String, Object> attributes) {
val cachedAttributesToEncode = new HashMap<String, String>();
removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL);
removeAttributeAndC... | class class_name[name] begin[{]
method[initialize, return_type[type[Map]], modifier[protected], parameter[attributes]] begin[{]
local_variable[type[val], cachedAttributesToEncode]
call[.removeAttributeAndCacheForEncoding, parameter[member[.attributes], member[.cachedAttributesToEncode],... | Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[initialize] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[attributes] operator[SEP] {
identifier[val] identifier[cachedAttribut... |
public void update(final HllSketch sketch) {
gadget.hllSketchImpl = unionImpl(sketch.hllSketchImpl, gadget.hllSketchImpl, lgMaxK);
} | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[sketch]] begin[{]
assign[member[gadget.hllSketchImpl], call[.unionImpl, parameter[member[sketch.hllSketchImpl], member[gadget.hllSketchImpl], member[.lgMaxK]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[final] identifier[HllSketch] identifier[sketch] operator[SEP] {
identifier[gadget] operator[SEP] identifier[hllSketchImpl] operator[=] identifier[unionImpl] operator[SEP] identifier[sketch] operator[SEP] identifier[hllSketchImpl] , identifie... |
public void addBlockMeta(BlockMeta blockMeta) throws WorkerOutOfSpaceException,
BlockAlreadyExistsException {
Preconditions.checkNotNull(blockMeta, "blockMeta");
long blockId = blockMeta.getBlockId();
long blockSize = blockMeta.getBlockSize();
if (getAvailableBytes() < blockSize) {
throw ne... | class class_name[name] begin[{]
method[addBlockMeta, return_type[void], modifier[public], parameter[blockMeta]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.blockMeta], literal["blockMeta"]]]
local_variable[type[long], blockId]
local_variable[type[long], blockSize... | Keyword[public] Keyword[void] identifier[addBlockMeta] operator[SEP] identifier[BlockMeta] identifier[blockMeta] operator[SEP] Keyword[throws] identifier[WorkerOutOfSpaceException] , identifier[BlockAlreadyExistsException] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifi... |
private void invalidateConsumerKey(String nic, String currentCK) throws IOException {
config.invalidateConsumerKey(nic, currentCK);
} | class class_name[name] begin[{]
method[invalidateConsumerKey, return_type[void], modifier[private], parameter[nic, currentCK]] begin[{]
call[config.invalidateConsumerKey, parameter[member[.nic], member[.currentCK]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[invalidateConsumerKey] operator[SEP] identifier[String] identifier[nic] , identifier[String] identifier[currentCK] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[config] operator[SEP] identifier[invalidateConsumerKey] operator[SEP] identifier[nic] , ... |
@Override
public final void setJmsDeliveryMode(PersistenceType value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setJmsDeliveryMode", value);
getHdr2().setField(JsHdr2Access.JMSDELIVERYMODE_DATA, value.toByte());
if (TraceComponent.i... | class class_name[name] begin[{]
method[setJmsDeliveryMode, return_type[void], modifier[final public], parameter[value]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setJmsDeliveryMode] operator[SEP] identifier[PersistenceType] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP]... |
public void removePhaseListener(PhaseListener phaseListener)
{
if (phaseListener == null)
{
return;
}
getStateHelper().remove(PropertyKeys.phaseListeners, phaseListener);
} | class class_name[name] begin[{]
method[removePhaseListener, return_type[void], modifier[public], parameter[phaseListener]] begin[{]
if[binary_operation[member[.phaseListener], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[.g... | Keyword[public] Keyword[void] identifier[removePhaseListener] operator[SEP] identifier[PhaseListener] identifier[phaseListener] operator[SEP] {
Keyword[if] operator[SEP] identifier[phaseListener] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
identifier[getState... |
public long count(String[] indices, String[] types,
QueryBuilder filterQueryBuilder) {
return countQuery(getSearchRequestBuilderWithMatchAll(false, indices,
types, filterQueryBuilder));
} | class class_name[name] begin[{]
method[count, return_type[type[long]], modifier[public], parameter[indices, types, filterQueryBuilder]] begin[{]
return[call[.countQuery, parameter[call[.getSearchRequestBuilderWithMatchAll, parameter[literal[false], member[.indices], member[.types], member[.filterQueryB... | Keyword[public] Keyword[long] identifier[count] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[indices] , identifier[String] operator[SEP] operator[SEP] identifier[types] , identifier[QueryBuilder] identifier[filterQueryBuilder] operator[SEP] {
Keyword[return] identifier[countQuery] op... |
private void loadHeaderRows(final SheetConfiguration sheetConfig, final Map<String, CellRangeAddress> cellRangeMap,
final List<String> skippedRegionCells) {
int top = sheetConfig.getHeaderCellRange().getTopRow();
int bottom = sheetConfig.getHeaderCellRange().getBottomRow();
int left = sheetConfig.getHead... | class class_name[name] begin[{]
method[loadHeaderRows, return_type[void], modifier[private], parameter[sheetConfig, cellRangeMap, skippedRegionCells]] begin[{]
local_variable[type[int], top]
local_variable[type[int], bottom]
local_variable[type[int], left]
local_variable[type[in... | Keyword[private] Keyword[void] identifier[loadHeaderRows] operator[SEP] Keyword[final] identifier[SheetConfiguration] identifier[sheetConfig] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[CellRangeAddress] operator[>] identifier[cellRangeMap] , Keyword[final] identifier[List] operator[... |
public static Predicate<Number> getLess(Number target) {
return number -> number.doubleValue() < target.doubleValue();
} | class class_name[name] begin[{]
method[getLess, return_type[type[Predicate]], modifier[public static], parameter[target]] begin[{]
return[LambdaExpression(body=BinaryOperation(operandl=MethodInvocation(arguments=[], member=doubleValue, postfix_operators=[], prefix_operators=[], qualifier=number, select... | Keyword[public] Keyword[static] identifier[Predicate] operator[<] identifier[Number] operator[>] identifier[getLess] operator[SEP] identifier[Number] identifier[target] operator[SEP] {
Keyword[return] identifier[number] operator[->] identifier[number] operator[SEP] identifier[doubleValue] operator[SEP] operator[... |
public static DataRowsFacade normalize(DataRowsFacade dataFrame, double min, double max) {
return normalize(dataFrame, min, max, Collections.<String>emptyList());
} | class class_name[name] begin[{]
method[normalize, return_type[type[DataRowsFacade]], modifier[public static], parameter[dataFrame, min, max]] begin[{]
return[call[.normalize, parameter[member[.dataFrame], member[.min], member[.max], call[.Collections, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[DataRowsFacade] identifier[normalize] operator[SEP] identifier[DataRowsFacade] identifier[dataFrame] , Keyword[double] identifier[min] , Keyword[double] identifier[max] operator[SEP] {
Keyword[return] identifier[normalize] operator[SEP] identifier[dataFrame] , identi... |
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = GetCheckedOutDocs.class)
public JAXBElement<CmisExtensionType> createGetCheckedOutDocsExtension(
CmisExtensionType value) {
return new JAXBElement<CmisExtensionType>(
_GetPropertiesExtension_QNA... | class class_name[name] begin[{]
method[createGetCheckedOutDocsExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetCheckedOutDocs] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifie... |
public List<Form> getAllByLoggedInUserWhereCanCreateInstanceOf()
{
Form form = new Form();
if(this.serviceTicket != null)
{
form.setServiceTicket(this.serviceTicket);
}
return new FormListing(this.postJson(
form, WS.Path.FormDefinition.Version1.g... | class class_name[name] begin[{]
method[getAllByLoggedInUserWhereCanCreateInstanceOf, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[Form], form]
if[binary_operation[THIS[member[None.serviceTicket]], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[List] operator[<] identifier[Form] operator[>] identifier[getAllByLoggedInUserWhereCanCreateInstanceOf] operator[SEP] operator[SEP] {
identifier[Form] identifier[form] operator[=] Keyword[new] identifier[Form] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[... |
@Override
public void stopped() {
// Mark as stopped
started.set(false);
// Stop timers
super.stopped();
// Disconnect
try {
Thread.sleep(100);
} catch (InterruptedException interrupt) {
}
disconnect();
} | class class_name[name] begin[{]
method[stopped, return_type[void], modifier[public], parameter[]] begin[{]
call[started.set, parameter[literal[false]]]
SuperMethodInvocation(arguments=[], member=stopped, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], ty... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[stopped] operator[SEP] operator[SEP] {
identifier[started] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[stopped] operator[SEP] operator[SEP] operator[SEP... |
public static void removeValue(String registryName, String key) {
Sysprop registryObject = readRegistryObject(registryName);
if (registryObject == null || StringUtils.isBlank(key)) {
return;
}
if (registryObject.hasProperty(key)) {
registryObject.removeProperty(key);
CoreUtils.getInstance().getDao().up... | class class_name[name] begin[{]
method[removeValue, return_type[void], modifier[public static], parameter[registryName, key]] begin[{]
local_variable[type[Sysprop], registryObject]
if[binary_operation[binary_operation[member[.registryObject], ==, literal[null]], ||, call[StringUtils.isB... | Keyword[public] Keyword[static] Keyword[void] identifier[removeValue] operator[SEP] identifier[String] identifier[registryName] , identifier[String] identifier[key] operator[SEP] {
identifier[Sysprop] identifier[registryObject] operator[=] identifier[readRegistryObject] operator[SEP] identifier[registryName] op... |
MetricFamilySamples fromMeter(String dropwizardName, Meter meter) {
final MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "_total",
new ArrayList<String>(),
new ArrayList<String>(),
meter.getCount());
return new MetricFamilyS... | class class_name[name] begin[{]
method[fromMeter, return_type[type[MetricFamilySamples]], modifier[default], parameter[dropwizardName, meter]] begin[{]
local_variable[type[MetricFamilySamples], sample]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_oper... | identifier[MetricFamilySamples] identifier[fromMeter] operator[SEP] identifier[String] identifier[dropwizardName] , identifier[Meter] identifier[meter] operator[SEP] {
Keyword[final] identifier[MetricFamilySamples] operator[SEP] identifier[Sample] identifier[sample] operator[=] identifier[sampleBuilder] operato... |
public Observable<DomainInner> beginUpdateAsync(String resourceGroupName, String domainName, Map<String, String> tags) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName, tags).map(new Func1<ServiceResponse<DomainInner>, DomainInner>() {
@Override
public DomainInn... | class class_name[name] begin[{]
method[beginUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, domainName, tags]] begin[{]
return[call[.beginUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.domainName], member[.tags]]]]
end[}]
END... | Keyword[public] identifier[Observable] operator[<] identifier[DomainInner] operator[>] identifier[beginUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[t... |
public FeatureVector createWordFeatures(DependencyInstance dependencyInstance, int i) {
int[] pos = dependencyInstance.getPostagids();
int[] posA = dependencyInstance.getCpostagids();
int[] toks = dependencyInstance.getFormids();
int[] lemma = dependencyInstance.getLemmaids();
... | class class_name[name] begin[{]
method[createWordFeatures, return_type[type[FeatureVector]], modifier[public], parameter[dependencyInstance, i]] begin[{]
local_variable[type[int], pos]
local_variable[type[int], posA]
local_variable[type[int], toks]
local_variable[type[int], lemm... | Keyword[public] identifier[FeatureVector] identifier[createWordFeatures] operator[SEP] identifier[DependencyInstance] identifier[dependencyInstance] , Keyword[int] identifier[i] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[pos] operator[=] identifier[dependencyInstance] operator[SEP] iden... |
public void setDeployments(java.util.Collection<BulkDeploymentResult> deployments) {
if (deployments == null) {
this.deployments = null;
return;
}
this.deployments = new java.util.ArrayList<BulkDeploymentResult>(deployments);
} | class class_name[name] begin[{]
method[setDeployments, return_type[void], modifier[public], parameter[deployments]] begin[{]
if[binary_operation[member[.deployments], ==, literal[null]]] begin[{]
assign[THIS[member[None.deployments]], literal[null]]
return[No... | Keyword[public] Keyword[void] identifier[setDeployments] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[BulkDeploymentResult] operator[>] identifier[deployments] operator[SEP] {
Keyword[if] operator[SEP] identifier[deployments] operator[=... |
final public ReturnExpressionBuilder<T> returnExp() {
final int sourceLineNumber = builder.getSourceLineNumber();
return new ReturnExpressionBuilder<T>(new ExpressionHandler<T>() {
public T handleExpression(Expression e) {
return statementHandler().handleStatement(new ReturnStatement(sourceLineNum... | class class_name[name] begin[{]
method[returnExp, return_type[type[ReturnExpressionBuilder]], modifier[final public], parameter[]] begin[{]
local_variable[type[int], sourceLineNumber]
return[ClassCreator(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnS... | Keyword[final] Keyword[public] identifier[ReturnExpressionBuilder] operator[<] identifier[T] operator[>] identifier[returnExp] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[sourceLineNumber] operator[=] identifier[builder] operator[SEP] identifier[getSourceLineNumber] operator[SEP] operato... |
public Set<Class<? extends Exception>> getRecoverableExceptions() {
return recoverableExceptions != null ? recoverableExceptions : parent != null ? parent.getRecoverableExceptions()
: Collections.<Class<? extends Exception>>emptySet();
} | class class_name[name] begin[{]
method[getRecoverableExceptions, return_type[type[Set]], modifier[public], parameter[]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=recoverableExceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] operator[>] identifier[getRecoverableExceptions] operator[SEP] operator[SEP] {
Keyword[return] identifier[recoverableExceptions] operator[!=] Other[null] operator[?] identifier... |
private String formatMaybeIpv6(String address) {
String openBracket = "[";
String closeBracket = "]";
if (address.contains(":") && !address.startsWith(openBracket) && !address.endsWith(closeBracket)) {
return openBracket + address + closeBracket;
}
return address;
... | class class_name[name] begin[{]
method[formatMaybeIpv6, return_type[type[String]], modifier[private], parameter[address]] begin[{]
local_variable[type[String], openBracket]
local_variable[type[String], closeBracket]
if[binary_operation[binary_operation[call[address.contains, par... | Keyword[private] identifier[String] identifier[formatMaybeIpv6] operator[SEP] identifier[String] identifier[address] operator[SEP] {
identifier[String] identifier[openBracket] operator[=] literal[String] operator[SEP] identifier[String] identifier[closeBracket] operator[=] literal[String] operator[SEP] Keyword[i... |
public String getHeader(@NotNull final String name, String defaultValue) {
if (headers().contains(name)) {
return getHeader(name);
} else {
return defaultValue;
}
} | class class_name[name] begin[{]
method[getHeader, return_type[type[String]], modifier[public], parameter[name, defaultValue]] begin[{]
if[call[.headers, parameter[]]] begin[{]
return[call[.getHeader, parameter[member[.name]]]]
else begin[{]
return[member[.default... | Keyword[public] identifier[String] identifier[getHeader] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[name] , identifier[String] identifier[defaultValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[headers] operator[SEP] operator[SEP] operator[SEP] identi... |
public static Field getFieldByDBField(Class<?> clazz, String dbFieldName) {
List<Field> fields = getColumns(clazz);
for(Field field : fields) {
Column column = field.getAnnotation(Column.class);
if(column.value().equals(dbFieldName)) {
return field;
}
}
return null;
} | class class_name[name] begin[{]
method[getFieldByDBField, return_type[type[Field]], modifier[public static], parameter[clazz, dbFieldName]] begin[{]
local_variable[type[List], fields]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[... | Keyword[public] Keyword[static] identifier[Field] identifier[getFieldByDBField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[dbFieldName] operator[SEP] {
identifier[List] operator[<] identifier[Field] operator[>] identifier[fields] operato... |
private void checkUnicity(ValidationStampFilter filter) {
// Check project vs branch
if (filter.getProject() != null && filter.getBranch() != null) {
throw new IllegalStateException("Filter cannot be associated with both a project and a branch.");
}
// Gets the existing filte... | class class_name[name] begin[{]
method[checkUnicity, return_type[void], modifier[private], parameter[filter]] begin[{]
if[binary_operation[binary_operation[call[filter.getProject, parameter[]], !=, literal[null]], &&, binary_operation[call[filter.getBranch, parameter[]], !=, literal[null]]]] be... | Keyword[private] Keyword[void] identifier[checkUnicity] operator[SEP] identifier[ValidationStampFilter] identifier[filter] operator[SEP] {
Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[filter] operato... |
private void applyL1Reg(final double eta_t, Vec x)
{
//apply l1 regularization
if(lambda1 > 0)
{
l1U += eta_t*lambda1;//line 6: in Tsuruoka et al paper, figure 2
for(int k = 0; k < ws.length; k++)
{
final Vec w_k = ws[k];
fi... | class class_name[name] begin[{]
method[applyL1Reg, return_type[void], modifier[private], parameter[eta_t, x]] begin[{]
if[binary_operation[member[.lambda1], >, literal[0]]] begin[{]
assign[member[.l1U], binary_operation[member[.eta_t], *, member[.lambda1]]]
F... | Keyword[private] Keyword[void] identifier[applyL1Reg] operator[SEP] Keyword[final] Keyword[double] identifier[eta_t] , identifier[Vec] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[lambda1] operator[>] Other[0] operator[SEP] {
identifier[l1U] operator[+=] identifier[eta_t] operat... |
public final void setExceptions(SortedSet<Date> dates) {
m_exceptions.clear();
if (null != dates) {
m_exceptions.addAll(dates);
}
} | class class_name[name] begin[{]
method[setExceptions, return_type[void], modifier[final public], parameter[dates]] begin[{]
call[m_exceptions.clear, parameter[]]
if[binary_operation[literal[null], !=, member[.dates]]] begin[{]
call[m_exceptions.addAll, pa... | Keyword[public] Keyword[final] Keyword[void] identifier[setExceptions] operator[SEP] identifier[SortedSet] operator[<] identifier[Date] operator[>] identifier[dates] operator[SEP] {
identifier[m_exceptions] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[... |
public Observable<ServiceResponse<List<IdentifyResult>>> identifyWithServiceResponseAsync(String personGroupId, List<UUID> faceIds, IdentifyOptionalParameter identifyOptionalParameter) {
if (this.client.azureRegion() == null) {
throw new IllegalArgumentException("Parameter this.client.azureRegion() ... | class class_name[name] begin[{]
method[identifyWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[personGroupId, faceIds, identifyOptionalParameter]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.azureRegion, parameter[]]], ==, literal[null]]] ... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[IdentifyResult] operator[>] operator[>] operator[>] identifier[identifyWithServiceResponseAsync] operator[SEP] identifier[String] identifier[personGroupId] , identifier[List] operator[<] i... |
public static Object getProperty(Class senderClass, Object receiver, String messageName) throws Throwable {
try {
return InvokerHelper.getProperty(receiver, messageName);
} catch (GroovyRuntimeException gre) {
throw unwrap(gre);
}
} | class class_name[name] begin[{]
method[getProperty, return_type[type[Object]], modifier[public static], parameter[senderClass, receiver, messageName]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=receiver, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[static] identifier[Object] identifier[getProperty] operator[SEP] identifier[Class] identifier[senderClass] , identifier[Object] identifier[receiver] , identifier[String] identifier[messageName] operator[SEP] Keyword[throws] identifier[Throwable] {
Keyword[try] {
Keyword[retur... |
public void setStart(int x1, int y1) {
start.x = x1;
start.y = y1;
needsRefresh = true;
} | class class_name[name] begin[{]
method[setStart, return_type[void], modifier[public], parameter[x1, y1]] begin[{]
assign[member[start.x], member[.x1]]
assign[member[start.y], member[.y1]]
assign[member[.needsRefresh], literal[true]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setStart] operator[SEP] Keyword[int] identifier[x1] , Keyword[int] identifier[y1] operator[SEP] {
identifier[start] operator[SEP] identifier[x] operator[=] identifier[x1] operator[SEP] identifier[start] operator[SEP] identifier[y] operator[=] identifier[y1] operator[SEP]... |
@Override
public boolean showGraphMindMapFileLinksDialog(@Nullable final File projectFolder, @Nullable final File initialMindMapFile, final boolean openIfSelected) {
Utils.assertSwingDispatchThread();
boolean result = false;
if (projectFolder != null || initialMindMapFile != null) {
File projectFol... | class class_name[name] begin[{]
method[showGraphMindMapFileLinksDialog, return_type[type[boolean]], modifier[public], parameter[projectFolder, initialMindMapFile, openIfSelected]] begin[{]
call[Utils.assertSwingDispatchThread, parameter[]]
local_variable[type[boolean], result]
... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[showGraphMindMapFileLinksDialog] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[File] identifier[projectFolder] , annotation[@] identifier[Nullable] Keyword[final] identifier[File] identifier[initialMindMapFile] ... |
@Nonnull
public CloseableHttpResponse execute (@Nonnull final HttpUriRequest aRequest) throws IOException
{
return execute (aRequest, (HttpContext) null);
} | class class_name[name] begin[{]
method[execute, return_type[type[CloseableHttpResponse]], modifier[public], parameter[aRequest]] begin[{]
return[call[.execute, parameter[member[.aRequest], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type... | annotation[@] identifier[Nonnull] Keyword[public] identifier[CloseableHttpResponse] identifier[execute] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[HttpUriRequest] identifier[aRequest] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[execute] operat... |
public DJBarChartBuilder addSerie(AbstractColumn column, String label) {
getDataset().addSerie(column, label);
return this;
} | class class_name[name] begin[{]
method[addSerie, return_type[type[DJBarChartBuilder]], modifier[public], parameter[column, label]] begin[{]
call[.getDataset, parameter[]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[DJBarChartBuilder] identifier[addSerie] operator[SEP] identifier[AbstractColumn] identifier[column] , identifier[String] identifier[label] operator[SEP] {
identifier[getDataset] operator[SEP] operator[SEP] operator[SEP] identifier[addSerie] operator[SEP] identifier[column] , identifi... |
public Observable<PolicyDefinitionInner> getAsync(String policyDefinitionName) {
return getWithServiceResponseAsync(policyDefinitionName).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() {
@Override
public PolicyDefinitionInner call(ServiceResponse<PolicyDef... | class class_name[name] begin[{]
method[getAsync, return_type[type[Observable]], modifier[public], parameter[policyDefinitionName]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.policyDefinitionName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[PolicyDefinitionInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[policyDefinitionName] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[policyDefinitionName] operator[S... |
private Geometry simplify(Geometry geom, double resolution, double factor){
Geometry simplifiedGeometry = null;
if( geom instanceof GeometryCollection ){
GeometryCollection collection = (GeometryCollection)geom;
boolean isSimplified = false;
//List<Geometry> newComponents = new Vector<Geometry>();
... | class class_name[name] begin[{]
method[simplify, return_type[type[Geometry]], modifier[private], parameter[geom, resolution, factor]] begin[{]
local_variable[type[Geometry], simplifiedGeometry]
if[binary_operation[member[.geom], instanceof, type[GeometryCollection]]] begin[{]
... | Keyword[private] identifier[Geometry] identifier[simplify] operator[SEP] identifier[Geometry] identifier[geom] , Keyword[double] identifier[resolution] , Keyword[double] identifier[factor] operator[SEP] {
identifier[Geometry] identifier[simplifiedGeometry] operator[=] Other[null] operator[SEP] Keyword[if] oper... |
@RequestMapping(value = "/feature/{number}", method = GET, produces = APPLICATION_JSON_VALUE)
public DataResponse<List<Feature>> story(
@RequestParam(value = "component", required = true) String cId,
@PathVariable(value = "number") String storyNumber) {
ObjectId componentId = new ObjectId(cId);
return this.f... | class class_name[name] begin[{]
method[story, return_type[type[DataResponse]], modifier[public], parameter[cId, storyNumber]] begin[{]
local_variable[type[ObjectId], componentId]
return[THIS[member[None.featureService]call[None.getStory, parameter[member[.componentId], member[.storyNumber]]]]]
... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[GET] , identifier[produces] operator[=] identifier[APPLICATION_JSON_VALUE] operator[SEP] Keyword[public] identifier[DataResponse] operator[<] identifier[List] operator[<] id... |
public static <T> Seq<T> of(Collection<T> c) {
if (N.isNullOrEmpty(c)) {
return EMPTY;
}
return new Seq<>(c);
} | class class_name[name] begin[{]
method[of, return_type[type[Seq]], modifier[public static], parameter[c]] begin[{]
if[call[N.isNullOrEmpty, parameter[member[.c]]]] begin[{]
return[member[.EMPTY]]
else begin[{]
None
end[}]
return[ClassCreator(arguments=[Member... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Seq] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNu... |
void appendEndElement()
{
// pop up the stacks
if (previousSiblingWasParent)
nodes.writeEntry(previousSibling, 2, NULL);
// Pop parentage
previousSibling = currentParent;
nodes.readSlot(currentParent, gotslot);
currentParent = gotslot[1] & 0xFFFF;
// The element just being finishe... | class class_name[name] begin[{]
method[appendEndElement, return_type[void], modifier[default], parameter[]] begin[{]
if[member[.previousSiblingWasParent]] begin[{]
call[nodes.writeEntry, parameter[member[.previousSibling], literal[2], member[.NULL]]]
else begin[{]
None
... | Keyword[void] identifier[appendEndElement] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[previousSiblingWasParent] operator[SEP] identifier[nodes] operator[SEP] identifier[writeEntry] operator[SEP] identifier[previousSibling] , Other[2] , identifier[NULL] operator[SEP] operator[SEP] identi... |
public static aaa_stats get(nitro_service service) throws Exception{
aaa_stats obj = new aaa_stats();
aaa_stats[] response = (aaa_stats[])obj.stat_resources(service);
return response[0];
} | class class_name[name] begin[{]
method[get, return_type[type[aaa_stats]], modifier[public static], parameter[service]] begin[{]
local_variable[type[aaa_stats], obj]
local_variable[type[aaa_stats], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[aaa_stats] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[aaa_stats] identifier[obj] operator[=] Keyword[new] identifier[aaa_stats] operator[SEP] operator[SEP] operator[SEP] id... |
private void fireTreeStructureChanged()
{
// Guaranteed to return a non-null array
Object[] listeners = m_listenerList.getListenerList();
TreeModelEvent e = null;
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.le... | class class_name[name] begin[{]
method[fireTreeStructureChanged, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Object], listeners]
local_variable[type[TreeModelEvent], e]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Bin... | Keyword[private] Keyword[void] identifier[fireTreeStructureChanged] operator[SEP] operator[SEP] {
identifier[Object] operator[SEP] operator[SEP] identifier[listeners] operator[=] identifier[m_listenerList] operator[SEP] identifier[getListenerList] operator[SEP] operator[SEP] operator[SEP] identifier[TreeModelEve... |
public void setRunningIssues(String runningIssues, boolean addOnIssues) {
Validate.notNull(runningIssues, "Parameter runningIssues must not be null.");
this.runningIssues = runningIssues;
this.addOnRunningIssues = addOnIssues;
} | class class_name[name] begin[{]
method[setRunningIssues, return_type[void], modifier[public], parameter[runningIssues, addOnIssues]] begin[{]
call[Validate.notNull, parameter[member[.runningIssues], literal["Parameter runningIssues must not be null."]]]
assign[THIS[member[None.r... | Keyword[public] Keyword[void] identifier[setRunningIssues] operator[SEP] identifier[String] identifier[runningIssues] , Keyword[boolean] identifier[addOnIssues] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[runningIssues] , literal[String] operator[SEP] operato... |
public ConstructorInfo searchDeclaredConstructor(Class<?>... parameterTypes) {
ConstructorInfo constructor = ExecutableUtils.getExecutable(declaredConstructorsGetter.get(), null, parameterTypes);
if (constructor == null) {
constructor = ExecutableUtils.searchExecutable(declaredConstructorsGe... | class class_name[name] begin[{]
method[searchDeclaredConstructor, return_type[type[ConstructorInfo]], modifier[public], parameter[parameterTypes]] begin[{]
local_variable[type[ConstructorInfo], constructor]
if[binary_operation[member[.constructor], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[ConstructorInfo] identifier[searchDeclaredConstructor] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[parameterTypes] operator[SEP] {
identifier[ConstructorInfo] identifier[constructor] operator[=] identifier[ExecutableUtils] operator[SEP] ... |
public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) {
return getBySiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getBySite, return_type[type[ResourceHealthMetadataInner]], modifier[public], parameter[resourceGroupName, name]] begin[{]
return[call[.getBySiteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.name]]]]
end[}]
END[}] | Keyword[public] identifier[ResourceHealthMetadataInner] identifier[getBySite] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] operator[SEP] {
Keyword[return] identifier[getBySiteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifi... |
public static String resolve(String path) {
if (path == null) {
return null;
}
if (path.startsWith("~" + File.separator)) {
return SystemUtil.getUserHome() + path.substring(1);
}
return path;
} | class class_name[name] begin[{]
method[resolve, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
if[binary_operation[member[.path], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[call[path.... | Keyword[public] Keyword[static] identifier[String] identifier[resolve] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if] operator[SE... |
@Override
public java.util.concurrent.Future<DescribeReservedCacheNodesOfferingsResult> describeReservedCacheNodesOfferingsAsync(
com.amazonaws.handlers.AsyncHandler<DescribeReservedCacheNodesOfferingsRequest, DescribeReservedCacheNodesOfferingsResult> asyncHandler) {
return describeReservedCac... | class class_name[name] begin[{]
method[describeReservedCacheNodesOfferingsAsync, return_type[type[java]], modifier[public], parameter[asyncHandler]] begin[{]
return[call[.describeReservedCacheNodesOfferingsAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_o... | annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[DescribeReservedCacheNodesOfferingsResult] operator[>] identifier[describeReservedCacheNodesOfferingsAsync] operator[SEP] identi... |
public void append(char c[], int off, int len) throws IOException {
append(new String(c, off, len));
} | class class_name[name] begin[{]
method[append, return_type[void], modifier[public], parameter[c, off, len]] begin[{]
call[.append, parameter[ClassCreator(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfi... | Keyword[public] Keyword[void] identifier[append] operator[SEP] Keyword[char] identifier[c] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[append] operator[SEP] Keyword[new] identifier[String] operator[... |
public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> listUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
... | class class_name[name] begin[{]
method[listUsagesSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, name, filter]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] operator[>] identifier[listUsagesSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final]... |
public String getTargetDestination()
{
if (tc.isEntryEnabled())
{
SibTr.entry(tc, "getTargetDestination");
SibTr.exit(tc, "getTargetDestination", targetDestination);
}
return targetDestination;
} | class class_name[name] begin[{]
method[getTargetDestination, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["getTargetDestination"]]]
... | Keyword[public] identifier[String] identifier[getTargetDestination] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc]... |
private void initializeStructure(List<AssociatedTriple> listObs, DMatrixRMaj P2, DMatrixRMaj P3) {
List<DMatrixRMaj> cameraMatrices = new ArrayList<>();
cameraMatrices.add(P1);
cameraMatrices.add(P2);
cameraMatrices.add(P3);
List<Point2D_F64> triangObs = new ArrayList<>();
triangObs.add(null);
triangObs.... | class class_name[name] begin[{]
method[initializeStructure, return_type[void], modifier[private], parameter[listObs, P2, P3]] begin[{]
local_variable[type[List], cameraMatrices]
call[cameraMatrices.add, parameter[member[.P1]]]
call[cameraMatrices.add, parameter[member[.P... | Keyword[private] Keyword[void] identifier[initializeStructure] operator[SEP] identifier[List] operator[<] identifier[AssociatedTriple] operator[>] identifier[listObs] , identifier[DMatrixRMaj] identifier[P2] , identifier[DMatrixRMaj] identifier[P3] operator[SEP] {
identifier[List] operator[<] identifier[DMatri... |
private boolean emitAsKey(String field) {
return emitValueAsKey
&& (field.equals(TaskEvent.METADATA_TASK_WORKING_STATE) || field.equals(JobEvent.METADATA_JOB_STATE));
} | class class_name[name] begin[{]
method[emitAsKey, return_type[type[boolean]], modifier[private], parameter[field]] begin[{]
return[binary_operation[member[.emitValueAsKey], &&, binary_operation[call[field.equals, parameter[member[TaskEvent.METADATA_TASK_WORKING_STATE]]], ||, call[field.equals, paramete... | Keyword[private] Keyword[boolean] identifier[emitAsKey] operator[SEP] identifier[String] identifier[field] operator[SEP] {
Keyword[return] identifier[emitValueAsKey] operator[&&] operator[SEP] identifier[field] operator[SEP] identifier[equals] operator[SEP] identifier[TaskEvent] operator[SEP] identifier[METADATA... |
public String getContent() {
String content = "";
NodeList list = dom.getChildNodes();
for (int i=0;i<list.getLength();i++) {
if (list.item(i) instanceof Text) {
content += (list.item(i).getNodeValue());
}
}
return content;
} | class class_name[name] begin[{]
method[getContent, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[String], content]
local_variable[type[NodeList], list]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation... | Keyword[public] identifier[String] identifier[getContent] operator[SEP] operator[SEP] {
identifier[String] identifier[content] operator[=] literal[String] operator[SEP] identifier[NodeList] identifier[list] operator[=] identifier[dom] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[S... |
public static Bearing calculateBearing(Earth e, LatLonPoint pt1,
LatLonPoint pt2, Bearing result) {
return calculateBearing(e, pt1.getLatitude(), pt1.getLongitude(),
pt2.getLatitude(), pt2.getLongitude(),
... | class class_name[name] begin[{]
method[calculateBearing, return_type[type[Bearing]], modifier[public static], parameter[e, pt1, pt2, result]] begin[{]
return[call[.calculateBearing, parameter[member[.e], call[pt1.getLatitude, parameter[]], call[pt1.getLongitude, parameter[]], call[pt2.getLatitude, para... | Keyword[public] Keyword[static] identifier[Bearing] identifier[calculateBearing] operator[SEP] identifier[Earth] identifier[e] , identifier[LatLonPoint] identifier[pt1] , identifier[LatLonPoint] identifier[pt2] , identifier[Bearing] identifier[result] operator[SEP] {
Keyword[return] identifier[calculateBearin... |
public static int waitForExitProcess(Pointer hProcess) throws InterruptedException {
while (true) {
if (Thread.interrupted())
throw new InterruptedException();
Kernel32.INSTANCE.WaitForSingleObject(hProcess,1000);
IntByReference exitCode = new IntByReference(... | class class_name[name] begin[{]
method[waitForExitProcess, return_type[type[int]], modifier[public static], parameter[hProcess]] begin[{]
while[literal[true]] begin[{]
if[call[Thread.interrupted, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[],... | Keyword[public] Keyword[static] Keyword[int] identifier[waitForExitProcess] operator[SEP] identifier[Pointer] identifier[hProcess] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[if] operator[SEP] identifier[Thread]... |
public static MockMvcFactory of(Object[] controllerOrMockMvcConfigurers) {
List<Object> controllers = new ArrayList<Object>();
List<MockMvcConfigurer> configurers = new ArrayList<MockMvcConfigurer>();
for (Object object : controllerOrMockMvcConfigurers) {
if (object instanceof MockMv... | class class_name[name] begin[{]
method[of, return_type[type[MockMvcFactory]], modifier[public static], parameter[controllerOrMockMvcConfigurers]] begin[{]
local_variable[type[List], controllers]
local_variable[type[List], configurers]
ForStatement(body=BlockStatement(label=None, stateme... | Keyword[public] Keyword[static] identifier[MockMvcFactory] identifier[of] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[controllerOrMockMvcConfigurers] operator[SEP] {
identifier[List] operator[<] identifier[Object] operator[>] identifier[controllers] operator[=] Keyword[new] identifier... |
static ModifiableRealmIdentity getRealmIdentity(OperationContext context, String principalName) throws OperationFailedException {
ModifiableSecurityRealm modifiableRealm = getModifiableSecurityRealm(context);
ModifiableRealmIdentity realmIdentity = null;
try {
realmIdentity = modifia... | class class_name[name] begin[{]
method[getRealmIdentity, return_type[type[ModifiableRealmIdentity]], modifier[static], parameter[context, principalName]] begin[{]
local_variable[type[ModifiableSecurityRealm], modifiableRealm]
local_variable[type[ModifiableRealmIdentity], realmIdentity]
... | Keyword[static] identifier[ModifiableRealmIdentity] identifier[getRealmIdentity] operator[SEP] identifier[OperationContext] identifier[context] , identifier[String] identifier[principalName] operator[SEP] Keyword[throws] identifier[OperationFailedException] {
identifier[ModifiableSecurityRealm] identifier[modif... |
private static String formatProvide(String namespace) {
StringBuilder sb = new StringBuilder();
sb.append("goog.provide('");
sb.append(namespace);
sb.append("');");
return sb.toString();
} | class class_name[name] begin[{]
method[formatProvide, return_type[type[String]], modifier[private static], parameter[namespace]] begin[{]
local_variable[type[StringBuilder], sb]
call[sb.append, parameter[literal["goog.provide('"]]]
call[sb.append, parameter[member[.names... | Keyword[private] Keyword[static] identifier[String] identifier[formatProvide] operator[SEP] identifier[String] identifier[namespace] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] i... |
public synchronized int read(long position, byte[] buffer, int offset, int length)
throws IOException {
long oldPos = getPos();
int nread = -1;
try {
seek(position);
nread = read(buffer, offset, length);
} finally {
seek(oldPos);
}
return nread;
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[synchronized public], parameter[position, buffer, offset, length]] begin[{]
local_variable[type[long], oldPos]
local_variable[type[int], nread]
TryStatement(block=[StatementExpression(expression=MethodInvocati... | Keyword[public] Keyword[synchronized] Keyword[int] identifier[read] operator[SEP] Keyword[long] identifier[position] , Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] {
Keywor... |
public static double pdf(double val, double shape, double location, double scale) {
if(val < location) {
return 0;
}
val = (val - location) / scale;
double f = shape / scale * FastMath.pow(val, shape - 1.);
if(f == Double.POSITIVE_INFINITY) {
return 0;
}
double d = 1. + FastMath.... | class class_name[name] begin[{]
method[pdf, return_type[type[double]], modifier[public static], parameter[val, shape, location, scale]] begin[{]
if[binary_operation[member[.val], <, member[.location]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[double] identifier[pdf] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[shape] , Keyword[double] identifier[location] , Keyword[double] identifier[scale] operator[SEP] {
Keyword[if] operator[SEP] identifier[val] operator[<] identifier[location... |
public final static Observable<WatchEvent<?>> from(final File file, List<Kind<?>> kinds) {
return from(file, null, kinds.toArray(new Kind<?>[] {}));
} | class class_name[name] begin[{]
method[from, return_type[type[Observable]], modifier[final public static], parameter[file, kinds]] begin[{]
return[call[.from, parameter[member[.file], literal[null], call[kinds.toArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=... | Keyword[public] Keyword[final] Keyword[static] identifier[Observable] operator[<] identifier[WatchEvent] operator[<] operator[?] operator[>] operator[>] identifier[from] operator[SEP] Keyword[final] identifier[File] identifier[file] , identifier[List] operator[<] identifier[Kind] operator[<] operator[?] operator[>] op... |
public static <T> List<T> takeWhile(List<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
int num = 0;
BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition);
for (T value : self) {
if (bcw.call(value)) {
num += 1;
... | class class_name[name] begin[{]
method[takeWhile, return_type[type[List]], modifier[public static], parameter[self, condition]] begin[{]
local_variable[type[int], num]
local_variable[type[BooleanClosureWrapper], bcw]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(c... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[takeWhile] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[self] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[FirstParam] operato... |
public static CoverageData<?> getCoverageData(GeoPackage geoPackage,
TileDao tileDao, Projection requestProjection) {
return getCoverageData(geoPackage, tileDao, null, null,
requestProjection);
} | class class_name[name] begin[{]
method[getCoverageData, return_type[type[CoverageData]], modifier[public static], parameter[geoPackage, tileDao, requestProjection]] begin[{]
return[call[.getCoverageData, parameter[member[.geoPackage], member[.tileDao], literal[null], literal[null], member[.requestProje... | Keyword[public] Keyword[static] identifier[CoverageData] operator[<] operator[?] operator[>] identifier[getCoverageData] operator[SEP] identifier[GeoPackage] identifier[geoPackage] , identifier[TileDao] identifier[tileDao] , identifier[Projection] identifier[requestProjection] operator[SEP] {
Keyword[return] i... |
public static <I, Void, V> MapOnlyMapper<I, V> forMapper(Mapper<I, Void, V> mapper) {
return new MapperAdapter<>(mapper);
} | class class_name[name] begin[{]
method[forMapper, return_type[type[MapOnlyMapper]], modifier[public static], parameter[mapper]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_argum... | Keyword[public] Keyword[static] operator[<] identifier[I] , identifier[Void] , identifier[V] operator[>] identifier[MapOnlyMapper] operator[<] identifier[I] , identifier[V] operator[>] identifier[forMapper] operator[SEP] identifier[Mapper] operator[<] identifier[I] , identifier[Void] , identifier[V] operator[>] id... |
static boolean isChanged(Collection<RedisNodeDescription> o1, Collection<RedisNodeDescription> o2) {
if (o1.size() != o2.size()) {
return true;
}
for (RedisNodeDescription base : o2) {
if (!essentiallyEqualsTo(base, findNodeByUri(o1, base.getUri()))) {
r... | class class_name[name] begin[{]
method[isChanged, return_type[type[boolean]], modifier[static], parameter[o1, o2]] begin[{]
if[binary_operation[call[o1.size, parameter[]], !=, call[o2.size, parameter[]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[static] Keyword[boolean] identifier[isChanged] operator[SEP] identifier[Collection] operator[<] identifier[RedisNodeDescription] operator[>] identifier[o1] , identifier[Collection] operator[<] identifier[RedisNodeDescription] operator[>] identifier[o2] operator[SEP] {
Keyword[if] operator[SEP] identifie... |
public static TextArea newTextArea (String text, int width, int height)
{
TextArea area = new TextArea();
if (text != null) {
area.setText(text);
}
if (width > 0) {
area.setCharacterWidth(width);
}
if (height > 0) {
area.setVisibleL... | class class_name[name] begin[{]
method[newTextArea, return_type[type[TextArea]], modifier[public static], parameter[text, width, height]] begin[{]
local_variable[type[TextArea], area]
if[binary_operation[member[.text], !=, literal[null]]] begin[{]
call[area.setTe... | Keyword[public] Keyword[static] identifier[TextArea] identifier[newTextArea] operator[SEP] identifier[String] identifier[text] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
identifier[TextArea] identifier[area] operator[=] Keyword[new] identifier[TextArea] operator[SEP] ope... |
public void startDiff(String oldJar, String newJar) throws DiffException {
Element tmp = doc.createElementNS(XML_URI, "diff");
tmp.setAttribute( "old", oldJar);
tmp.setAttribute( "new", newJar);
doc.appendChild(tmp);
currentNode = tmp;
} | class class_name[name] begin[{]
method[startDiff, return_type[void], modifier[public], parameter[oldJar, newJar]] begin[{]
local_variable[type[Element], tmp]
call[tmp.setAttribute, parameter[literal["old"], member[.oldJar]]]
call[tmp.setAttribute, parameter[literal["new"... | Keyword[public] Keyword[void] identifier[startDiff] operator[SEP] identifier[String] identifier[oldJar] , identifier[String] identifier[newJar] operator[SEP] Keyword[throws] identifier[DiffException] {
identifier[Element] identifier[tmp] operator[=] identifier[doc] operator[SEP] identifier[createElementNS] oper... |
void deliverError(final OtpCookedConnection conn, final Exception e) {
removeConnection(conn);
remoteStatus(conn.name, false, e);
} | class class_name[name] begin[{]
method[deliverError, return_type[void], modifier[default], parameter[conn, e]] begin[{]
call[.removeConnection, parameter[member[.conn]]]
call[.remoteStatus, parameter[member[conn.name], literal[false], member[.e]]]
end[}]
END[}] | Keyword[void] identifier[deliverError] operator[SEP] Keyword[final] identifier[OtpCookedConnection] identifier[conn] , Keyword[final] identifier[Exception] identifier[e] operator[SEP] {
identifier[removeConnection] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[remoteStatus] operator[SEP]... |
public static String getProperty(String base, String property) {
return getProperty(base, property, true);
} | class class_name[name] begin[{]
method[getProperty, return_type[type[String]], modifier[public static], parameter[base, property]] begin[{]
return[call[.getProperty, parameter[member[.base], member[.property], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[property] operator[SEP] {
Keyword[return] identifier[getProperty] operator[SEP] identifier[base] , identifier[property] , literal[boolean] operator[SEP] ... |
public Promise<V> now() {
final Promise<V> smartFuture = new Promise<V>();
JobsPlugin.executor.submit(getJobCallingCallable(smartFuture));
return smartFuture;
} | class class_name[name] begin[{]
method[now, return_type[type[Promise]], modifier[public], parameter[]] begin[{]
local_variable[type[Promise], smartFuture]
call[JobsPlugin.executor.submit, parameter[call[.getJobCallingCallable, parameter[member[.smartFuture]]]]]
return[member[.sm... | Keyword[public] identifier[Promise] operator[<] identifier[V] operator[>] identifier[now] operator[SEP] operator[SEP] {
Keyword[final] identifier[Promise] operator[<] identifier[V] operator[>] identifier[smartFuture] operator[=] Keyword[new] identifier[Promise] operator[<] identifier[V] operator[>] operator[SEP]... |
public CloudJobSchedule getJobSchedule(String jobScheduleId) throws BatchErrorException, IOException {
return getJobSchedule(jobScheduleId, null, null);
} | class class_name[name] begin[{]
method[getJobSchedule, return_type[type[CloudJobSchedule]], modifier[public], parameter[jobScheduleId]] begin[{]
return[call[.getJobSchedule, parameter[member[.jobScheduleId], literal[null], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[CloudJobSchedule] identifier[getJobSchedule] operator[SEP] identifier[String] identifier[jobScheduleId] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] {
Keyword[return] identifier[getJobSchedule] operator[SEP] identifier[jobScheduleId] , Other... |
private EventLogger getCustomEventLogger(MuleContext muleContext) {
Object obj = getCustomEventLoggerFromRegistry(muleContext);
if (obj == null) {
log.debug("no custom event logger defined using bean name: {}",
CUSTOM_EVENT_LOGGER_BEAN_NAME);
return null;
}
if (obj instanceof EventLogger) {
log.de... | class class_name[name] begin[{]
method[getCustomEventLogger, return_type[type[EventLogger]], modifier[private], parameter[muleContext]] begin[{]
local_variable[type[Object], obj]
if[binary_operation[member[.obj], ==, literal[null]]] begin[{]
call[log.debug, param... | Keyword[private] identifier[EventLogger] identifier[getCustomEventLogger] operator[SEP] identifier[MuleContext] identifier[muleContext] operator[SEP] {
identifier[Object] identifier[obj] operator[=] identifier[getCustomEventLoggerFromRegistry] operator[SEP] identifier[muleContext] operator[SEP] operator[SEP] Key... |
public static Map<String, OptionalFailure<Object>> deserializeAccumulators(
Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators,
ClassLoader loader) throws IOException, ClassNotFoundException {
if (serializedAccumulators == null || serializedAccumulators.isEmpty()) {
return Collecti... | class class_name[name] begin[{]
method[deserializeAccumulators, return_type[type[Map]], modifier[public static], parameter[serializedAccumulators, loader]] begin[{]
if[binary_operation[binary_operation[member[.serializedAccumulators], ==, literal[null]], ||, call[serializedAccumulators.isEmpty,... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] identifier[deserializeAccumulators] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[SerializedValue] operator[<] identifier[Opti... |
private void validateRSV(byte opcodeByte) throws ProtocolDecoderException {
if ((opcodeByte & 0x70) != 0) {
// We don't support negotiated extensions that deal with RSV bits
if ((opcodeByte & 0x40) != 0) {
throw new ProtocolDecoderException("RSV1 is set");
}
... | class class_name[name] begin[{]
method[validateRSV, return_type[void], modifier[private], parameter[opcodeByte]] begin[{]
if[binary_operation[binary_operation[member[.opcodeByte], &, literal[0x70]], !=, literal[0]]] begin[{]
if[binary_operation[binary_operation[member[.o... | Keyword[private] Keyword[void] identifier[validateRSV] operator[SEP] Keyword[byte] identifier[opcodeByte] operator[SEP] Keyword[throws] identifier[ProtocolDecoderException] {
Keyword[if] operator[SEP] operator[SEP] identifier[opcodeByte] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[S... |
private void resubscribe_if_needed() {
Enumeration channel_names = EventConsumer.getChannelMap().keys();
long now = System.currentTimeMillis();
// check the list of not yet connected events and try to subscribe
while (channel_names.hasMoreElements()) {
String name = (String)... | class class_name[name] begin[{]
method[resubscribe_if_needed, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Enumeration], channel_names]
local_variable[type[long], now]
while[call[channel_names.hasMoreElements, parameter[]]] begin[{]
... | Keyword[private] Keyword[void] identifier[resubscribe_if_needed] operator[SEP] operator[SEP] {
identifier[Enumeration] identifier[channel_names] operator[=] identifier[EventConsumer] operator[SEP] identifier[getChannelMap] operator[SEP] operator[SEP] operator[SEP] identifier[keys] operator[SEP] operator[SEP] ope... |
static String getFontName(AssetManager assets, String filePath) {
TTFAssetInputStream in = null;
try {
InputStream file = assets.open(filePath, AssetManager.ACCESS_RANDOM);
in = new TTFAssetInputStream(file);
return getTTFFontName(in, filePath);
} catch (FileN... | class class_name[name] begin[{]
method[getFontName, return_type[type[String]], modifier[static], parameter[assets, filePath]] begin[{]
local_variable[type[TTFAssetInputStream], in]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initia... | Keyword[static] identifier[String] identifier[getFontName] operator[SEP] identifier[AssetManager] identifier[assets] , identifier[String] identifier[filePath] operator[SEP] {
identifier[TTFAssetInputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[InputStream] id... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.