code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
protected T handleRow(ResultSet rs) throws SQLException {
/**
* 根据bean的class类型实例化为对象
*/
T mappedObject = ClassHelper.instantiate(mappedClass);
ResultSetMetaData rsmd = rs.getMetaData();
int columnCount = rsmd.getColumnCount();
/**
* 对ResultSet结果集字段进行循环
*/
for (int index = 1; index <= columnCount... | class class_name[name] begin[{]
method[handleRow, return_type[type[T]], modifier[protected], parameter[rs]] begin[{]
local_variable[type[T], mappedObject]
local_variable[type[ResultSetMetaData], rsmd]
local_variable[type[int], columnCount]
ForStatement(body=BlockStatement(label=... | Keyword[protected] identifier[T] identifier[handleRow] operator[SEP] identifier[ResultSet] identifier[rs] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[T] identifier[mappedObject] operator[=] identifier[ClassHelper] operator[SEP] identifier[instantiate] operator[SEP] identifier[mappedClass]... |
private boolean currentGateLeadsToOtherStage(final TraversalEntry te, final boolean forward) {
final ManagementGroupVertex groupVertex = te.getManagementVertex().getGroupVertex();
if (forward) {
if (te.getCurrentGate() >= groupVertex.getNumberOfForwardEdges()) {
return false;
}
final ManagementGrou... | class class_name[name] begin[{]
method[currentGateLeadsToOtherStage, return_type[type[boolean]], modifier[private], parameter[te, forward]] begin[{]
local_variable[type[ManagementGroupVertex], groupVertex]
if[member[.forward]] begin[{]
if[binary_operation[call[te... | Keyword[private] Keyword[boolean] identifier[currentGateLeadsToOtherStage] operator[SEP] Keyword[final] identifier[TraversalEntry] identifier[te] , Keyword[final] Keyword[boolean] identifier[forward] operator[SEP] {
Keyword[final] identifier[ManagementGroupVertex] identifier[groupVertex] operator[=] identifier[... |
private boolean mustDecode(String word, List<String> wordList, int count) {
boolean decode = true;
String nextWord = null;
if (count < (wordList.size() - 1)) {
nextWord = wordList.get(count + 1);
}
// test if the current word contains a "&" and the following with a ... | class class_name[name] begin[{]
method[mustDecode, return_type[type[boolean]], modifier[private], parameter[word, wordList, count]] begin[{]
local_variable[type[boolean], decode]
local_variable[type[String], nextWord]
if[binary_operation[member[.count], <, binary_operation[call[... | Keyword[private] Keyword[boolean] identifier[mustDecode] operator[SEP] identifier[String] identifier[word] , identifier[List] operator[<] identifier[String] operator[>] identifier[wordList] , Keyword[int] identifier[count] operator[SEP] {
Keyword[boolean] identifier[decode] operator[=] literal[boolean] operato... |
public com.google.api.ads.admanager.axis.v201902.ScalableType getScalableType() {
return scalableType;
} | class class_name[name] begin[{]
method[getScalableType, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.scalableType]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[ScalableType] identifier[getScalableType] operator[SEP] operator[SEP]... |
public static RSM parseRSM(Element queryElement) {
RSM rsm = new RSM();
Element setElement = queryElement.element("set");
if (setElement == null) {
return rsm;
}
Element after = setElement.element("after");
if (after != null) {
rsm.setAfter(after... | class class_name[name] begin[{]
method[parseRSM, return_type[type[RSM]], modifier[public static], parameter[queryElement]] begin[{]
local_variable[type[RSM], rsm]
local_variable[type[Element], setElement]
if[binary_operation[member[.setElement], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[static] identifier[RSM] identifier[parseRSM] operator[SEP] identifier[Element] identifier[queryElement] operator[SEP] {
identifier[RSM] identifier[rsm] operator[=] Keyword[new] identifier[RSM] operator[SEP] operator[SEP] operator[SEP] identifier[Element] identifier[setElement] operator[=]... |
public String objectToSql(Object value, Database database) {
if ((value == null) || "null".equals(value.toString().toLowerCase(Locale.US))) {
return null;
} else if (value instanceof DatabaseFunction) {
return functionToSql((DatabaseFunction) value, database);
} else if (... | class class_name[name] begin[{]
method[objectToSql, return_type[type[String]], modifier[public], parameter[value, database]] begin[{]
if[binary_operation[binary_operation[member[.value], ==, literal[null]], ||, literal["null"]]] begin[{]
return[literal[null]]
else begin[{]
... | Keyword[public] identifier[String] identifier[objectToSql] operator[SEP] identifier[Object] identifier[value] , identifier[Database] identifier[database] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] operator[||] literal[String] operator[SEP] id... |
public void lockResource(CmsRequestContext context, CmsResource resource, CmsLockType type) throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
try {
checkOfflineProject(dbc);
checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_WRITE, false, Cm... | class class_name[name] begin[{]
method[lockResource, return_type[void], modifier[public], parameter[context, resource, type]] begin[{]
local_variable[type[CmsDbContext], dbc]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_opera... | Keyword[public] Keyword[void] identifier[lockResource] operator[SEP] identifier[CmsRequestContext] identifier[context] , identifier[CmsResource] identifier[resource] , identifier[CmsLockType] identifier[type] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsDbContext] identifier[dbc] oper... |
void removeChannel(StoredClientChannel channel) {
lock.lock();
try {
mapChannels.remove(channel.id, channel);
} finally {
lock.unlock();
}
updatedChannel(channel);
} | class class_name[name] begin[{]
method[removeChannel, return_type[void], modifier[default], parameter[channel]] begin[{]
call[lock.lock, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_op... | Keyword[void] identifier[removeChannel] operator[SEP] identifier[StoredClientChannel] identifier[channel] operator[SEP] {
identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[mapChannels] operator[SEP] identifier[remove] operator[SEP] iden... |
public com.google.appengine.v1.InboundServiceType getInboundServices(int index) {
return inboundServices_converter_.convert(inboundServices_.get(index));
} | class class_name[name] begin[{]
method[getInboundServices, return_type[type[com]], modifier[public], parameter[index]] begin[{]
return[call[inboundServices_converter_.convert, parameter[call[inboundServices_.get, parameter[member[.index]]]]]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[appengine] operator[SEP] identifier[v1] operator[SEP] identifier[InboundServiceType] identifier[getInboundServices] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[return] identifier[inboundServices_con... |
@Generated(value={"com.threerings.presents.tools.GenDObjectTask"})
public void setAwayMessage (String value)
{
String ovalue = this.awayMessage;
requestAttributeChange(
AWAY_MESSAGE, value, ovalue);
this.awayMessage = value;
} | class class_name[name] begin[{]
method[setAwayMessage, return_type[void], modifier[public], parameter[value]] begin[{]
local_variable[type[String], ovalue]
call[.requestAttributeChange, parameter[member[.AWAY_MESSAGE], member[.value], member[.ovalue]]]
assign[THIS[member... | annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] {
literal[String]
} operator[SEP] Keyword[public] Keyword[void] identifier[setAwayMessage] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[String] identifier[ovalue] operator[=] Keyword[this] o... |
public void adjustJobMetricsOnRetry(int branches) {
TaskMetrics metrics = TaskMetrics.get(this);
for (int i = 0; i < branches; i++) {
String forkBranchId = ForkOperatorUtils.getForkId(this.taskId, i);
long recordsWritten = metrics.getCounter(MetricGroup.TASK.name(), forkBranchId, RECORDS).getCount(... | class class_name[name] begin[{]
method[adjustJobMetricsOnRetry, return_type[void], modifier[public], parameter[branches]] begin[{]
local_variable[type[TaskMetrics], metrics]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDe... | Keyword[public] Keyword[void] identifier[adjustJobMetricsOnRetry] operator[SEP] Keyword[int] identifier[branches] operator[SEP] {
identifier[TaskMetrics] identifier[metrics] operator[=] identifier[TaskMetrics] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[for] oper... |
@Override
public void rollback() {
final Iterator<MultipartFormFile> iter = elementsFile.values().iterator();
while (iter.hasNext()) {
final MultipartFormFile formFile = iter.next();
formFile.destroy();
}
} | class class_name[name] begin[{]
method[rollback, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Iterator], iter]
while[call[iter.hasNext, parameter[]]] begin[{]
local_variable[type[MultipartFormFile], formFile]
call[for... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[rollback] operator[SEP] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[MultipartFormFile] operator[>] identifier[iter] operator[=] identifier[elementsFile] operator[SEP] identifier[values] operator[SEP] operat... |
@Override
public void executeListMultiActions() throws CmsRuntimeException {
if (getParamListAction().equals(LIST_MACTION_DELETE)) {
// execute the delete multiaction
Map<String, String[]> params = new HashMap<String, String[]>();
params.put(A_CmsEditUserDialog.PARAM_USE... | class class_name[name] begin[{]
method[executeListMultiActions, return_type[void], modifier[public], parameter[]] begin[{]
if[call[.getParamListAction, parameter[]]] begin[{]
local_variable[type[Map], params]
call[params.put, parameter[member[A_CmsEditUserDia... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[executeListMultiActions] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsRuntimeException] {
Keyword[if] operator[SEP] identifier[getParamListAction] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] id... |
public static <A, V> BaseCommand<A, V> withAutoRetry(@NotNull Command<A, V> cmd) {
return new AutoRetryExtension.Interceptor<>(cmd);
} | class class_name[name] begin[{]
method[withAutoRetry, return_type[type[BaseCommand]], modifier[public static], parameter[cmd]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=cmd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments... | Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[V] operator[>] identifier[BaseCommand] operator[<] identifier[A] , identifier[V] operator[>] identifier[withAutoRetry] operator[SEP] annotation[@] identifier[NotNull] identifier[Command] operator[<] identifier[A] , identifier[V] operator[>] ident... |
private static String classToString(final Class<?> c) {
if (c.isArray()) {
return toString(c.getComponentType()) + "[]";
}
final StringBuilder buf = new StringBuilder();
if (c.getEnclosingClass() != null) {
buf.append(classToString(c.getEnclosingClass())).append... | class class_name[name] begin[{]
method[classToString, return_type[type[String]], modifier[private static], parameter[c]] begin[{]
if[call[c.isArray, parameter[]]] begin[{]
return[binary_operation[call[.toString, parameter[call[c.getComponentType, parameter[]]]], +, literal["[]"]]]
... | Keyword[private] Keyword[static] identifier[String] identifier[classToString] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] {
... |
protected void updateThrottle()
{
long now = CurrentTime.getCurrentTimeActual();
if (_throttleTimestamp + _throttlePeriod < now) {
_throttleTimestamp = now;
_throttleCount = 1;
_isThrottle = false;
return;
}
_throttleCount++;
if (_throttleCount < _thro... | class class_name[name] begin[{]
method[updateThrottle, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[long], now]
if[binary_operation[binary_operation[member[._throttleTimestamp], +, member[._throttlePeriod]], <, member[.now]]] begin[{]
... | Keyword[protected] Keyword[void] identifier[updateThrottle] operator[SEP] operator[SEP] {
Keyword[long] identifier[now] operator[=] identifier[CurrentTime] operator[SEP] identifier[getCurrentTimeActual] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_throttleTimestamp] operator[+]... |
@Override
public String encode(Date object) {
String formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(object);
return formatted.substring(0, 22) + ":" + formatted.substring(22);
} | class class_name[name] begin[{]
method[encode, return_type[type[String]], modifier[public], parameter[object]] begin[{]
local_variable[type[String], formatted]
return[binary_operation[binary_operation[call[formatted.substring, parameter[literal[0], literal[22]]], +, literal[":"]], +, call[forma... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[encode] operator[SEP] identifier[Date] identifier[object] operator[SEP] {
identifier[String] identifier[formatted] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] ident... |
public T getMaximum() {
Lock lock = this.lock.readLock();
lock.lock();
try {
return this.maximum;
} finally {
lock.unlock();
}
} | class class_name[name] begin[{]
method[getMaximum, return_type[type[T]], modifier[public], parameter[]] begin[{]
local_variable[type[Lock], lock]
call[lock.lock, parameter[]]
TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] identifier[T] identifier[getMaximum] operator[SEP] operator[SEP] {
identifier[Lock] identifier[lock] operator[=] Keyword[this] operator[SEP] identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] identifier[lock] operator[SEP] ... |
public int getFooterViewType(int position) {
if (footerContent != null) {
if (footerContent.getData() == getItem(position) && (position == getLastItemIndex())) {
return footerContent.getViewtype();
}
}
return PeasyHeaderViewHolder.VIEWTYPE_NOTHING;
} | class class_name[name] begin[{]
method[getFooterViewType, return_type[type[int]], modifier[public], parameter[position]] begin[{]
if[binary_operation[member[.footerContent], !=, literal[null]]] begin[{]
if[binary_operation[binary_operation[call[footerContent.getData, par... | Keyword[public] Keyword[int] identifier[getFooterViewType] operator[SEP] Keyword[int] identifier[position] operator[SEP] {
Keyword[if] operator[SEP] identifier[footerContent] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[footerContent] operator[SEP] identifier[getData] ... |
public XHTMLText appendOpenHeaderTag(int level, String style) {
if (level > 3 || level < 1) {
throw new IllegalArgumentException("Level must be between 1 and 3");
}
text.halfOpenElement(H + Integer.toString(level));
text.optAttribute(STYLE, style);
text.rightAngleBrac... | class class_name[name] begin[{]
method[appendOpenHeaderTag, return_type[type[XHTMLText]], modifier[public], parameter[level, style]] begin[{]
if[binary_operation[binary_operation[member[.level], >, literal[3]], ||, binary_operation[member[.level], <, literal[1]]]] begin[{]
ThrowStat... | Keyword[public] identifier[XHTMLText] identifier[appendOpenHeaderTag] operator[SEP] Keyword[int] identifier[level] , identifier[String] identifier[style] operator[SEP] {
Keyword[if] operator[SEP] identifier[level] operator[>] Other[3] operator[||] identifier[level] operator[<] Other[1] operator[SEP] {
... |
static MutableDoubleTuple createSubTuple(
MutableDoubleTuple parent, int fromIndex, int toIndex)
{
return new MutableSubDoubleTuple(parent, fromIndex, toIndex);
} | class class_name[name] begin[{]
method[createSubTuple, return_type[type[MutableDoubleTuple]], modifier[static], parameter[parent, fromIndex, toIndex]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefer... | Keyword[static] identifier[MutableDoubleTuple] identifier[createSubTuple] operator[SEP] identifier[MutableDoubleTuple] identifier[parent] , Keyword[int] identifier[fromIndex] , Keyword[int] identifier[toIndex] operator[SEP] {
Keyword[return] Keyword[new] identifier[MutableSubDoubleTuple] operator[SEP] identifi... |
private static TypeAndOrder findTao(int center, String key) {
Map<String, BufrCdmIndexProto.FldType> local = locals.get(center);
if (local != null) {
BufrCdmIndexProto.FldType result = local.get(key);
if (result != null) return new TypeAndOrder(result, -1);
}
return fld2type.get(key);
} | class class_name[name] begin[{]
method[findTao, return_type[type[TypeAndOrder]], modifier[private static], parameter[center, key]] begin[{]
local_variable[type[Map], local]
if[binary_operation[member[.local], !=, literal[null]]] begin[{]
local_variable[type[BufrCdmIndexProto... | Keyword[private] Keyword[static] identifier[TypeAndOrder] identifier[findTao] operator[SEP] Keyword[int] identifier[center] , identifier[String] identifier[key] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[BufrCdmIndexProto] operator[SEP] identifier[FldType] operator[>] identifie... |
public void moveRectangleTo(Rectangle rect, float x, float y) {
float width = rect.getWidth();
float height = rect.getHeight();
rect.setLeft(x);
rect.setBottom(y);
rect.setRight(rect.getLeft() + width);
rect.setTop(rect.getBottom() + height);
} | class class_name[name] begin[{]
method[moveRectangleTo, return_type[void], modifier[public], parameter[rect, x, y]] begin[{]
local_variable[type[float], width]
local_variable[type[float], height]
call[rect.setLeft, parameter[member[.x]]]
call[rect.setBottom, para... | Keyword[public] Keyword[void] identifier[moveRectangleTo] operator[SEP] identifier[Rectangle] identifier[rect] , Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] {
Keyword[float] identifier[width] operator[=] identifier[rect] operator[SEP] identifier[getWidth] operator[SEP] operator[SE... |
@Override
public Optional<SipHeader> getHeader(final String headerName) throws SipPacketParseException {
return this.msg.getHeader(headerName);
} | class class_name[name] begin[{]
method[getHeader, return_type[type[Optional]], modifier[public], parameter[headerName]] begin[{]
return[THIS[member[None.msg]call[None.getHeader, parameter[member[.headerName]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Optional] operator[<] identifier[SipHeader] operator[>] identifier[getHeader] operator[SEP] Keyword[final] identifier[String] identifier[headerName] operator[SEP] Keyword[throws] identifier[SipPacketParseException] {
Keyword[return] Keyword[this] oper... |
@BetaApi
public final TargetHttpProxy getTargetHttpProxy(
ProjectGlobalTargetHttpProxyName targetHttpProxy) {
GetTargetHttpProxyHttpRequest request =
GetTargetHttpProxyHttpRequest.newBuilder()
.setTargetHttpProxy(targetHttpProxy == null ? null : targetHttpProxy.toString())
.... | class class_name[name] begin[{]
method[getTargetHttpProxy, return_type[type[TargetHttpProxy]], modifier[final public], parameter[targetHttpProxy]] begin[{]
local_variable[type[GetTargetHttpProxyHttpRequest], request]
return[call[.getTargetHttpProxy, parameter[member[.request]]]]
end[}]
END[... | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[TargetHttpProxy] identifier[getTargetHttpProxy] operator[SEP] identifier[ProjectGlobalTargetHttpProxyName] identifier[targetHttpProxy] operator[SEP] {
identifier[GetTargetHttpProxyHttpRequest] identifier[request] operator[=] identifier[G... |
public void init(IPageBookViewPage page, IConsole console)
{
fPage = page;
fConsole = (VdmDebugConsole) console;
// fRemoveTerminated = new ConsoleRemoveLaunchAction(fConsole.getProcess().getLaunch());
// fRemoveAllTerminated = new ConsoleRemoveAllTerminatedAction();
fTerminate = new ConsoleTerminateAction(... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[page, console]] begin[{]
assign[member[.fPage], member[.page]]
assign[member[.fConsole], Cast(expression=MemberReference(member=console, postfix_operators=[], prefix_operators=[], qualifi... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[IPageBookViewPage] identifier[page] , identifier[IConsole] identifier[console] operator[SEP] {
identifier[fPage] operator[=] identifier[page] operator[SEP] identifier[fConsole] operator[=] operator[SEP] identifier[VdmDebugConsole] operator[... |
public static MethodInvokeProxy proxyByName(Object target,String methodName,Object ...args)
{
Method m=findMethodByName(target, methodName);
if(m!=null)
{
return new MethodInvokeProxy(target, m, args);
}
return null;
} | class class_name[name] begin[{]
method[proxyByName, return_type[type[MethodInvokeProxy]], modifier[public static], parameter[target, methodName, args]] begin[{]
local_variable[type[Method], m]
if[binary_operation[member[.m], !=, literal[null]]] begin[{]
return[ClassCreator(a... | Keyword[public] Keyword[static] identifier[MethodInvokeProxy] identifier[proxyByName] operator[SEP] identifier[Object] identifier[target] , identifier[String] identifier[methodName] , identifier[Object] operator[...] identifier[args] operator[SEP] {
identifier[Method] identifier[m] operator[=] identifier[findM... |
public static String toNormalizedString(IPv4AddressNetwork network, SegmentValueProvider lowerValueProvider, SegmentValueProvider upperValueProvider, Integer prefixLength) {
return toNormalizedString(network.getPrefixConfiguration(), lowerValueProvider, upperValueProvider, prefixLength, SEGMENT_COUNT, BYTES_PER_SEGME... | class class_name[name] begin[{]
method[toNormalizedString, return_type[type[String]], modifier[public static], parameter[network, lowerValueProvider, upperValueProvider, prefixLength]] begin[{]
return[call[.toNormalizedString, parameter[call[network.getPrefixConfiguration, parameter[]], member[.lowerVa... | Keyword[public] Keyword[static] identifier[String] identifier[toNormalizedString] operator[SEP] identifier[IPv4AddressNetwork] identifier[network] , identifier[SegmentValueProvider] identifier[lowerValueProvider] , identifier[SegmentValueProvider] identifier[upperValueProvider] , identifier[Integer] identifier[prefi... |
@Override
public Object appendEL(Object o) {
if (offset + size + 1 > arr.length) enlargeCapacity(size + 1);
arr[offset + size] = o;
size++;
return o;
} | class class_name[name] begin[{]
method[appendEL, return_type[type[Object]], modifier[public], parameter[o]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.offset], +, member[.size]], +, literal[1]], >, member[arr.length]]] begin[{]
call[.enlargeCapacity, para... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[appendEL] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[offset] operator[+] identifier[size] operator[+] Other[1] operator[>] identifier[arr] operator[SEP] identifier[length] ope... |
public static void registerDeploymentResource(final DeploymentResourceSupport deploymentResourceSupport, final LoggingConfigurationService service) {
final PathElement base = PathElement.pathElement("configuration", service.getConfiguration());
deploymentResourceSupport.getDeploymentSubModel(LoggingExte... | class class_name[name] begin[{]
method[registerDeploymentResource, return_type[void], modifier[public static], parameter[deploymentResourceSupport, service]] begin[{]
local_variable[type[PathElement], base]
call[deploymentResourceSupport.getDeploymentSubModel, parameter[member[LoggingEx... | Keyword[public] Keyword[static] Keyword[void] identifier[registerDeploymentResource] operator[SEP] Keyword[final] identifier[DeploymentResourceSupport] identifier[deploymentResourceSupport] , Keyword[final] identifier[LoggingConfigurationService] identifier[service] operator[SEP] {
Keyword[final] identifier[Pat... |
@Override
public GetContainerPolicyResult getContainerPolicy(GetContainerPolicyRequest request) {
request = beforeClientExecution(request);
return executeGetContainerPolicy(request);
} | class class_name[name] begin[{]
method[getContainerPolicy, return_type[type[GetContainerPolicyResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetContainerPolicy, parameter[me... | annotation[@] identifier[Override] Keyword[public] identifier[GetContainerPolicyResult] identifier[getContainerPolicy] operator[SEP] identifier[GetContainerPolicyRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operat... |
public static <T> Collector<T, ?, ArrayList<T>> toArrayList() {
return java.util.stream.Collectors.toCollection(ArrayList::new);
} | class class_name[name] begin[{]
method[toArrayList, return_type[type[Collector]], modifier[public static], parameter[]] begin[{]
return[call[java.util.stream.Collectors.toCollection, parameter[MethodReference(expression=MemberReference(member=ArrayList, postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[ArrayList] operator[<] identifier[T] operator[>] operator[>] identifier[toArrayList] operator[SEP] operator[SEP] {
Keyword[return] identifier[java] operator[SEP] iden... |
@Override
public void visitTypeNominal(Type.Nominal type, Set<QualifiedName> visited) {
// Extract declaration link
Decl.Link<Decl.Type> link = type.getLink();
// Sanity check type makes sense
if(link.isResolved()) {
// Extract the declaration to which this type refers.
Decl.Type decl = link.getTarget();... | class class_name[name] begin[{]
method[visitTypeNominal, return_type[void], modifier[public], parameter[type, visited]] begin[{]
local_variable[type[Decl], link]
if[call[link.isResolved, parameter[]]] begin[{]
local_variable[type[Decl], decl]
call[.vi... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitTypeNominal] operator[SEP] identifier[Type] operator[SEP] identifier[Nominal] identifier[type] , identifier[Set] operator[<] identifier[QualifiedName] operator[>] identifier[visited] operator[SEP] {
identifier[Decl] operator[SEP] i... |
@Nonnull
public static String removeMultiple (@Nullable final String sInputString, @Nonnull final char [] aRemoveChars)
{
ValueEnforcer.notNull (aRemoveChars, "RemoveChars");
// Any input text?
if (hasNoText (sInputString))
return "";
// Anything to remove?
if (aRemoveChars.length == 0)
... | class class_name[name] begin[{]
method[removeMultiple, return_type[type[String]], modifier[public static], parameter[sInputString, aRemoveChars]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aRemoveChars], literal["RemoveChars"]]]
if[call[.hasNoText, parameter[member[.... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[String] identifier[removeMultiple] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sInputString] , annotation[@] identifier[Nonnull] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identi... |
public java.util.List<DeleteLaunchTemplateVersionsResponseSuccessItem> getSuccessfullyDeletedLaunchTemplateVersions() {
if (successfullyDeletedLaunchTemplateVersions == null) {
successfullyDeletedLaunchTemplateVersions = new com.amazonaws.internal.SdkInternalList<DeleteLaunchTemplateVersionsResponse... | class class_name[name] begin[{]
method[getSuccessfullyDeletedLaunchTemplateVersions, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.successfullyDeletedLaunchTemplateVersions], ==, literal[null]]] begin[{]
assign[member[.succe... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[DeleteLaunchTemplateVersionsResponseSuccessItem] operator[>] identifier[getSuccessfullyDeletedLaunchTemplateVersions] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[successful... |
public static void glBufferSubData(int target, int offset, int size, float[] data)
{
checkContextCompatibility();
Float32Array dataBuffer = Float32ArrayNative.create(data.length);
dataBuffer.set(data);
nglBufferSubData(target, offset, size, dataBuffer);
} | class class_name[name] begin[{]
method[glBufferSubData, return_type[void], modifier[public static], parameter[target, offset, size, data]] begin[{]
call[.checkContextCompatibility, parameter[]]
local_variable[type[Float32Array], dataBuffer]
call[dataBuffer.set, parameter... | Keyword[public] Keyword[static] Keyword[void] identifier[glBufferSubData] operator[SEP] Keyword[int] identifier[target] , Keyword[int] identifier[offset] , Keyword[int] identifier[size] , Keyword[float] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
identifier[checkContextCompatibility] operator... |
public ServiceFuture<List<DataLakeStoreAccountBasicInner>> listByResourceGroupAsync(final String resourceGroupName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count, final ListOperationCallback<DataLakeStoreAccountBasicInner> serviceCallback) {
... | class class_name[name] begin[{]
method[listByResourceGroupAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, filter, top, skip, select, orderby, count, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listByResourceGroupSin... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[DataLakeStoreAccountBasicInner] operator[>] operator[>] identifier[listByResourceGroupAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[filter]... |
public static KieServerControllerClient newWebSocketClient(final String controllerUrl,
final String login,
final String password) {
return new WebSocketKieServerControllerClient(controll... | class class_name[name] begin[{]
method[newWebSocketClient, return_type[type[KieServerControllerClient]], modifier[public static], parameter[controllerUrl, login, password]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=controllerUrl, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[static] identifier[KieServerControllerClient] identifier[newWebSocketClient] operator[SEP] Keyword[final] identifier[String] identifier[controllerUrl] , Keyword[final] identifier[String] identifier[login] , Keyword[final] identifier[String] identifier[password] operator[SEP] {
Keyword[r... |
private void encodeThis() throws IOException {
if (require == -1 && inhibit == -1) {
this.extensionValue = null;
return;
}
DerOutputStream tagged = new DerOutputStream();
DerOutputStream seq = new DerOutputStream();
if (require != -1) {
DerOut... | class class_name[name] begin[{]
method[encodeThis, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.require], ==, literal[1]], &&, binary_operation[member[.inhibit], ==, literal[1]]]] begin[{]
assign[THIS[member[Non... | Keyword[private] Keyword[void] identifier[encodeThis] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[require] operator[==] operator[-] Other[1] operator[&&] identifier[inhibit] operator[==] operator[-] Other[1] operator[SEP] {
Keyword[this] o... |
private void addMetadataFromIFD(IFD ifd, String key, boolean exif) {
metadata.add(key, ifd);
for (TagValue tag : ifd.getMetadata().getTags()) {
if (tag.getCardinality() == 1) {
abstractTiffType t = tag.getValue().get(0);
if (t.isIFD()) {
addMetadataFromIFD((IFD) t, key, true);
... | class class_name[name] begin[{]
method[addMetadataFromIFD, return_type[void], modifier[private], parameter[ifd, key, exif]] begin[{]
call[metadata.add, parameter[member[.key], member[.ifd]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(o... | Keyword[private] Keyword[void] identifier[addMetadataFromIFD] operator[SEP] identifier[IFD] identifier[ifd] , identifier[String] identifier[key] , Keyword[boolean] identifier[exif] operator[SEP] {
identifier[metadata] operator[SEP] identifier[add] operator[SEP] identifier[key] , identifier[ifd] operator[SEP] ... |
public static void setByte(MemorySegment[] segments, int offset, byte value) {
if (inFirstSegment(segments, offset, 1)) {
segments[0].put(offset, value);
} else {
setByteMultiSegments(segments, offset, value);
}
} | class class_name[name] begin[{]
method[setByte, return_type[void], modifier[public static], parameter[segments, offset, value]] begin[{]
if[call[.inFirstSegment, parameter[member[.segments], member[.offset], literal[1]]]] begin[{]
member[.segments]
else begin[{]
... | Keyword[public] Keyword[static] Keyword[void] identifier[setByte] operator[SEP] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[segments] , Keyword[int] identifier[offset] , Keyword[byte] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[inFirstSegment] operator[SEP] ident... |
public boolean isAssertionInstruction(Instruction ins, ConstantPoolGen cpg) {
if (ins instanceof InvokeInstruction) {
return isAssertionCall((InvokeInstruction) ins);
}
if (ins instanceof GETSTATIC) {
GETSTATIC getStatic = (GETSTATIC) ins;
String className = ... | class class_name[name] begin[{]
method[isAssertionInstruction, return_type[type[boolean]], modifier[public], parameter[ins, cpg]] begin[{]
if[binary_operation[member[.ins], instanceof, type[InvokeInstruction]]] begin[{]
return[call[.isAssertionCall, parameter[Cast(expression=MemberR... | Keyword[public] Keyword[boolean] identifier[isAssertionInstruction] operator[SEP] identifier[Instruction] identifier[ins] , identifier[ConstantPoolGen] identifier[cpg] operator[SEP] {
Keyword[if] operator[SEP] identifier[ins] Keyword[instanceof] identifier[InvokeInstruction] operator[SEP] {
Keyword[r... |
public String signCookie(String str) {
if (str == null || str.isEmpty()) {
throw new IllegalArgumentException("NULL or empty string to sign");
}
String signature = getSignature(str);
if (LOG.isDebugEnabled()) {
LOG.debug("Signature generated for " + str + " is " + signature);
}
retu... | class class_name[name] begin[{]
method[signCookie, return_type[type[String]], modifier[public], parameter[str]] begin[{]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, call[str.isEmpty, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(argume... | Keyword[public] identifier[String] identifier[signCookie] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] identifier[str] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keywo... |
void set_non_auto_polled_attr(final String[] s) {
for (final String value : s) {
ext.non_auto_polled_attr.add(value);
}
} | class class_name[name] begin[{]
method[set_non_auto_polled_attr, return_type[void], modifier[default], parameter[s]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_op... | Keyword[void] identifier[set_non_auto_polled_attr] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[:] identifier[s] operator[SEP] {
identifier[ext] operato... |
protected OutputStream createStagingFileOutputStream()
throws IOException {
OutputStream out = this.fs
.create(this.stagingFile, this.filePermission, true, this.bufferSize, this.replicationFactor, this.blockSize,
null);
// encoders need to be attached to the stream in reverse order si... | class class_name[name] begin[{]
method[createStagingFileOutputStream, return_type[type[OutputStream]], modifier[protected], parameter[]] begin[{]
local_variable[type[OutputStream], out]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expression... | Keyword[protected] identifier[OutputStream] identifier[createStagingFileOutputStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[OutputStream] identifier[out] operator[=] Keyword[this] operator[SEP] identifier[fs] operator[SEP] identifier[create] operator[SEP] Keyword[this] ... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "valuesOfGroup")
public JAXBElement<OperationParameterGroupRefType> createValuesOfGroup(OperationParameterGroupRefType value) {
return new JAXBElement<OperationParameterGroupRefType>(_ValuesOfGroup_QNAME, OperationParameterGroupRefType.class, ... | class class_name[name] begin[{]
method[createValuesOfGroup, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_ValuesOfGroup_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postf... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[OperationParameterGroupRefType] operator[>] identifier[createValuesOfGroup] operator[SEP] ... |
public RouteChunk findOrCreateChild(final String value) {
if (children != null) {
for (RouteChunk child : children) {
if (child.get().equals(value)) {
return child;
}
}
}
return add(value);
} | class class_name[name] begin[{]
method[findOrCreateChild, return_type[type[RouteChunk]], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.children], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Me... | Keyword[public] identifier[RouteChunk] identifier[findOrCreateChild] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[children] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[RouteChunk] identifier[ch... |
protected void printNode(Node n) {
printTabs(n.getDepth());
System.out.println("- \"" + n.getToken() + "\"");
for (Node c : n.getChildren()) {
printNode(c);
}
} | class class_name[name] begin[{]
method[printNode, return_type[void], modifier[protected], parameter[n]] begin[{]
call[.printTabs, parameter[call[n.getDepth, parameter[]]]]
call[System.out.println, parameter[binary_operation[binary_operation[literal["- \""], +, call[n.getToken, p... | Keyword[protected] Keyword[void] identifier[printNode] operator[SEP] identifier[Node] identifier[n] operator[SEP] {
identifier[printTabs] operator[SEP] identifier[n] operator[SEP] identifier[getDepth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operato... |
public static Topup retrieve(String topup) throws StripeException {
return retrieve(topup, (Map<String, Object>) null, (RequestOptions) null);
} | class class_name[name] begin[{]
method[retrieve, return_type[type[Topup]], modifier[public static], parameter[topup]] begin[{]
return[call[.retrieve, parameter[member[.topup], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceTyp... | Keyword[public] Keyword[static] identifier[Topup] identifier[retrieve] operator[SEP] identifier[String] identifier[topup] operator[SEP] Keyword[throws] identifier[StripeException] {
Keyword[return] identifier[retrieve] operator[SEP] identifier[topup] , operator[SEP] identifier[Map] operator[<] identifier[String... |
public DenseMatrix getQ() {
int m = qr.nrows();
int n = qr.ncols();
DenseMatrix Q = Matrix.zeros(m, n);
for (int k = n - 1; k >= 0; k--) {
Q.set(k, k, 1.0);
for (int j = k; j < n; j++) {
if (qr.get(k, k) != 0) {
double s = 0.0;
... | class class_name[name] begin[{]
method[getQ, return_type[type[DenseMatrix]], modifier[public], parameter[]] begin[{]
local_variable[type[int], m]
local_variable[type[int], n]
local_variable[type[DenseMatrix], Q]
ForStatement(body=BlockStatement(label=None, statements=[StatementE... | Keyword[public] identifier[DenseMatrix] identifier[getQ] operator[SEP] operator[SEP] {
Keyword[int] identifier[m] operator[=] identifier[qr] operator[SEP] identifier[nrows] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[qr] operator[SEP] identifier[ncols] operator[SEP... |
public static Promise<ByteBuf> readFile(Executor executor, Path path) {
return openAsync(executor, path, set(READ))
.then(file -> file.read()
.then(buf -> file.close()
.whenException($ -> buf.recycle())
.map($ -> buf)));
} | class class_name[name] begin[{]
method[readFile, return_type[type[Promise]], modifier[public static], parameter[executor, path]] begin[{]
return[call[.openAsync, parameter[member[.executor], member[.path], call[.set, parameter[member[.READ]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Promise] operator[<] identifier[ByteBuf] operator[>] identifier[readFile] operator[SEP] identifier[Executor] identifier[executor] , identifier[Path] identifier[path] operator[SEP] {
Keyword[return] identifier[openAsync] operator[SEP] identifier[executor] , identifier[... |
public Image getIcon(int iconKind) {
switch (iconKind) {
case ICON_COLOR_16x16 :
return iconColor16;
case ICON_COLOR_32x32 :
return iconColor32;
case ICON_MONO_16x16 :
return iconMono16;
case ICON_MONO_32x32 :
return iconMono32;
}
return null;
} | class class_name[name] begin[{]
method[getIcon, return_type[type[Image]], modifier[public], parameter[iconKind]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['ICON_COLOR_16x16'], statements=[ReturnStatement(expression=MemberReference(member=iconColor16, postfix_operators=[], prefix_operato... | Keyword[public] identifier[Image] identifier[getIcon] operator[SEP] Keyword[int] identifier[iconKind] operator[SEP] {
Keyword[switch] operator[SEP] identifier[iconKind] operator[SEP] {
Keyword[case] identifier[ICON_COLOR_16x16] operator[:] Keyword[return] identifier[iconColor16] operator[SEP] Keyword... |
public ResourceChange withScope(String... scope) {
if (this.scope == null) {
setScope(new java.util.ArrayList<String>(scope.length));
}
for (String ele : scope) {
this.scope.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withScope, return_type[type[ResourceChange]], modifier[public], parameter[scope]] begin[{]
if[binary_operation[THIS[member[None.scope]], ==, literal[null]]] begin[{]
call[.setScope, parameter[ClassCreator(arguments=[MemberReference(... | Keyword[public] identifier[ResourceChange] identifier[withScope] operator[SEP] identifier[String] operator[...] identifier[scope] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[scope] operator[==] Other[null] operator[SEP] {
identifier[setScope] operator[SEP] Keyword[... |
@Override
public double computeScore(double fullNetRegTerm, boolean training, LayerWorkspaceMgr workspaceMgr) {
if (input == null || labels == null)
throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());
this.fullNetworkRegularizationScore = full... | class class_name[name] begin[{]
method[computeScore, return_type[type[double]], modifier[public], parameter[fullNetRegTerm, training, workspaceMgr]] begin[{]
if[binary_operation[binary_operation[member[.input], ==, literal[null]], ||, binary_operation[member[.labels], ==, literal[null]]]] begin... | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[computeScore] operator[SEP] Keyword[double] identifier[fullNetRegTerm] , Keyword[boolean] identifier[training] , identifier[LayerWorkspaceMgr] identifier[workspaceMgr] operator[SEP] {
Keyword[if] operator[SEP] identifier[input] opera... |
@Override
public EEnum getIfcTendonAnchorTypeEnum() {
if (ifcTendonAnchorTypeEnumEEnum == null) {
ifcTendonAnchorTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(1085);
}
return ifcTendonAnchorTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcTendonAnchorTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcTendonAnchorTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcTendonAnchorTypeEnumEEnum], Cast... | annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getIfcTendonAnchorTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcTendonAnchorTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcTendonAnchorTypeEnumEEnum] operator[=] ope... |
public static <T> T instantiateUserCode(TaskConfig config, ClassLoader cl, Class<? super T> superClass) {
try {
T stub = config.<T>getStubWrapper(cl).getUserCodeObject(superClass, cl);
// check if the class is a subclass, if the check is required
if (superClass != null && !superClass.isAssignableFrom(stub.ge... | class class_name[name] begin[{]
method[instantiateUserCode, return_type[type[T]], modifier[public static], parameter[config, cl, superClass]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Memb... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[instantiateUserCode] operator[SEP] identifier[TaskConfig] identifier[config] , identifier[ClassLoader] identifier[cl] , identifier[Class] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[superClas... |
private String loadStyle(String styleName) throws IOException {
URL url;
if (styleName.startsWith("http://") || styleName.startsWith("https://")) {
try {
// try to load matching style from classpath
return loadStyle(styleName.substring(styleName.lastIndexOf('/') + 1));
} catch (FileNotFoundException e... | class class_name[name] begin[{]
method[loadStyle, return_type[type[String]], modifier[private], parameter[styleName]] begin[{]
local_variable[type[URL], url]
if[binary_operation[call[styleName.startsWith, parameter[literal["http://"]]], ||, call[styleName.startsWith, parameter[literal["... | Keyword[private] identifier[String] identifier[loadStyle] operator[SEP] identifier[String] identifier[styleName] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[URL] identifier[url] operator[SEP] Keyword[if] operator[SEP] identifier[styleName] operator[SEP] identifier[startsWith] operator[SEP]... |
public static double fBeta(double beta, long tp, long fp, long fn) {
double prec = tp / ((double) tp + fp);
double recall = tp / ((double) tp + fn);
return fBeta(beta, prec, recall);
} | class class_name[name] begin[{]
method[fBeta, return_type[type[double]], modifier[public static], parameter[beta, tp, fp, fn]] begin[{]
local_variable[type[double], prec]
local_variable[type[double], recall]
return[call[.fBeta, parameter[member[.beta], member[.prec], member[.recall]]]]
... | Keyword[public] Keyword[static] Keyword[double] identifier[fBeta] operator[SEP] Keyword[double] identifier[beta] , Keyword[long] identifier[tp] , Keyword[long] identifier[fp] , Keyword[long] identifier[fn] operator[SEP] {
Keyword[double] identifier[prec] operator[=] identifier[tp] operator[/] operator[SEP] op... |
public void delete(DbSession dbSession, String permission, String organizationUuid, @Nullable Integer groupId, @Nullable Long rootComponentId) {
mapper(dbSession).delete(permission, organizationUuid, groupId, rootComponentId);
} | class class_name[name] begin[{]
method[delete, return_type[void], modifier[public], parameter[dbSession, permission, organizationUuid, groupId, rootComponentId]] begin[{]
call[.mapper, parameter[member[.dbSession]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[DbSession] identifier[dbSession] , identifier[String] identifier[permission] , identifier[String] identifier[organizationUuid] , annotation[@] identifier[Nullable] identifier[Integer] identifier[groupId] , annotation[@] identifier[Nullable] i... |
public IDocumentQuery<T> whereLessThan(String fieldName, Object value) {
return whereLessThan(fieldName, value, false);
} | class class_name[name] begin[{]
method[whereLessThan, return_type[type[IDocumentQuery]], modifier[public], parameter[fieldName, value]] begin[{]
return[call[.whereLessThan, parameter[member[.fieldName], member[.value], literal[false]]]]
end[}]
END[}] | Keyword[public] identifier[IDocumentQuery] operator[<] identifier[T] operator[>] identifier[whereLessThan] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] {
Keyword[return] identifier[whereLessThan] operator[SEP] identifier[fieldName] , identifier[val... |
public static JsonObject toJson( Project project)
{
JsonObjectBuilder builder = Json.createObjectBuilder();
Optional.ofNullable( project.getBaseLocation())
.ifPresent( uri -> builder.add( REFBASE_KEY, String.valueOf( uri)));
if( project.getSystemInputLocation() != null)
{
builder.add... | class class_name[name] begin[{]
method[toJson, return_type[type[JsonObject]], modifier[public static], parameter[project]] begin[{]
local_variable[type[JsonObjectBuilder], builder]
call[Optional.ofNullable, parameter[call[project.getBaseLocation, parameter[]]]]
if[binary... | Keyword[public] Keyword[static] identifier[JsonObject] identifier[toJson] operator[SEP] identifier[Project] identifier[project] operator[SEP] {
identifier[JsonObjectBuilder] identifier[builder] operator[=] identifier[Json] operator[SEP] identifier[createObjectBuilder] operator[SEP] operator[SEP] operator[SEP] id... |
public static TicketGrantingTicket getTicketGrantingTicketFromRequest(final CasCookieBuilder ticketGrantingTicketCookieGenerator,
final TicketRegistry ticketRegistry, final HttpServletRequest request) {
val cookieValue = ticketGrantingTic... | class class_name[name] begin[{]
method[getTicketGrantingTicketFromRequest, return_type[type[TicketGrantingTicket]], modifier[public static], parameter[ticketGrantingTicketCookieGenerator, ticketRegistry, request]] begin[{]
local_variable[type[val], cookieValue]
if[call[StringUtils.isNot... | Keyword[public] Keyword[static] identifier[TicketGrantingTicket] identifier[getTicketGrantingTicketFromRequest] operator[SEP] Keyword[final] identifier[CasCookieBuilder] identifier[ticketGrantingTicketCookieGenerator] , Keyword[final] identifier[TicketRegistry] identifier[ticketRegistry] , Keyword[final] identifier[H... |
public AbstractQueue<ID, DATA> init() throws Exception {
if (observer != null) {
observer.preInit(this);
}
try {
return this;
} finally {
if (observer != null) {
observer.postInit(this);
}
}
} | class class_name[name] begin[{]
method[init, return_type[type[AbstractQueue]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.observer], !=, literal[null]]] begin[{]
call[observer.preInit, parameter[THIS[]]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[AbstractQueue] operator[<] identifier[ID] , identifier[DATA] operator[>] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[observer] operator[!=] Other[null] operator[SEP] {
identifier[observer] operato... |
public OvhOption serviceName_option_option_GET(String serviceName, net.minidev.ovh.api.vps.OvhVpsOptionEnum option) throws IOException {
String qPath = "/vps/{serviceName}/option/{option}";
StringBuilder sb = path(qPath, serviceName, option);
String resp = exec(qPath, "GET", sb.toString(), null);
return convert... | class class_name[name] begin[{]
method[serviceName_option_option_GET, return_type[type[OvhOption]], modifier[public], parameter[serviceName, option]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
return[ca... | Keyword[public] identifier[OvhOption] identifier[serviceName_option_option_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[net] operator[SEP] identifier[minidev] operator[SEP] identifier[ovh] operator[SEP] identifier[api] operator[SEP] identifier[vps] operator[SEP] identifier[OvhVpsOptionEnu... |
public static List<Map<String, String>> getDropPartitionsDDLInfo(Partition hivePartition) {
List<Map<String, String>> replacedPartitionsDDLInfo = Lists.newArrayList();
List<FieldSchema> partitionKeys = hivePartition.getTable().getPartitionKeys();
if (StringUtils.isNotBlank(hivePartition.getParameters().get... | class class_name[name] begin[{]
method[getDropPartitionsDDLInfo, return_type[type[List]], modifier[public static], parameter[hivePartition]] begin[{]
local_variable[type[List], replacedPartitionsDDLInfo]
local_variable[type[List], partitionKeys]
if[call[StringUtils.isNotBlank, p... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[getDropPartitionsDDLInfo] operator[SEP] identifier[Partition] identifier[hivePartition] operator[SEP] {
identifier[List] operator[<] identifier[Map]... |
public void deleteShape(Paintable paintable, Object group, MapContext context) {
GfxGeometry gfxGeometry = (GfxGeometry) paintable;
Geometry geom = gfxGeometry.getGeometry();
if (geom instanceof Point || geom instanceof MultiPoint) {
context.getVectorContext().deleteElement(group, gfxGeometry.getId() + ".def")... | class class_name[name] begin[{]
method[deleteShape, return_type[void], modifier[public], parameter[paintable, group, context]] begin[{]
local_variable[type[GfxGeometry], gfxGeometry]
local_variable[type[Geometry], geom]
if[binary_operation[binary_operation[member[.geom], instanc... | Keyword[public] Keyword[void] identifier[deleteShape] operator[SEP] identifier[Paintable] identifier[paintable] , identifier[Object] identifier[group] , identifier[MapContext] identifier[context] operator[SEP] {
identifier[GfxGeometry] identifier[gfxGeometry] operator[=] operator[SEP] identifier[GfxGeometry] o... |
public static synchronized ServiceName getDeploymentServiceName(final String raName, final Activation raxml) {
if (raName == null)
throw ConnectorLogger.ROOT_LOGGER.undefinedVar("RaName");
ServiceName serviceName = null;
ModifiableResourceAdapter ra = (ModifiableResourceAdapter) rax... | class class_name[name] begin[{]
method[getDeploymentServiceName, return_type[type[ServiceName]], modifier[synchronized public static], parameter[raName, raxml]] begin[{]
if[binary_operation[member[.raName], ==, literal[null]]] begin[{]
ThrowStatement(expression=MethodInvocation(arguments=[Liter... | Keyword[public] Keyword[static] Keyword[synchronized] identifier[ServiceName] identifier[getDeploymentServiceName] operator[SEP] Keyword[final] identifier[String] identifier[raName] , Keyword[final] identifier[Activation] identifier[raxml] operator[SEP] {
Keyword[if] operator[SEP] identifier[raName] operator[==... |
public <T> void encodeWithChildContext(final Encoder<T> encoder, final BsonWriter writer, final T value) {
encoder.encode(writer, value, DEFAULT_CONTEXT);
} | class class_name[name] begin[{]
method[encodeWithChildContext, return_type[void], modifier[public], parameter[encoder, writer, value]] begin[{]
call[encoder.encode, parameter[member[.writer], member[.value], member[.DEFAULT_CONTEXT]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[encodeWithChildContext] operator[SEP] Keyword[final] identifier[Encoder] operator[<] identifier[T] operator[>] identifier[encoder] , Keyword[final] identifier[BsonWriter] identifier[writer] , Keyword[final] identifier[T] identifier[value] ... |
public void convertPackage(PackageDoc pd, DocPath outputdir) {
if (pd == null) {
return;
}
ClassDoc[] cds = pd.allClasses();
for (int i = 0; i < cds.length; i++) {
// If -nodeprecated option is set and the class is marked as deprecated,
// do not conve... | class class_name[name] begin[{]
method[convertPackage, return_type[void], modifier[public], parameter[pd, outputdir]] begin[{]
if[binary_operation[member[.pd], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[ClassDoc], ... | Keyword[public] Keyword[void] identifier[convertPackage] operator[SEP] identifier[PackageDoc] identifier[pd] , identifier[DocPath] identifier[outputdir] operator[SEP] {
Keyword[if] operator[SEP] identifier[pd] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
iden... |
private void createContent() {
//if we have a customView use this
if (mCustomView != null) {
LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)... | class class_name[name] begin[{]
method[createContent, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.mCustomView], !=, literal[null]]] begin[{]
local_variable[type[LinearLayout], contentParams]
assign[member[contentPar... | Keyword[private] Keyword[void] identifier[createContent] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[mCustomView] operator[!=] Other[null] operator[SEP] {
identifier[LinearLayout] operator[SEP] identifier[LayoutParams] identifier[contentParams] operator[=] Keyword[new] identifie... |
public UpdatableSketch<U, S> build() {
return new UpdatableSketch<>(nomEntries_, resizeFactor_.lg(), samplingProbability_,
summaryFactory_);
} | class class_name[name] begin[{]
method[build, return_type[type[UpdatableSketch]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=nomEntries_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=lg, po... | Keyword[public] identifier[UpdatableSketch] operator[<] identifier[U] , identifier[S] operator[>] identifier[build] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[UpdatableSketch] operator[<] operator[>] operator[SEP] identifier[nomEntries_] , identifier[resizeFactor_] operator[SEP] iden... |
@SuppressWarnings("unused")
public static Date fromISODateTimeUTC(final String val,
final TimeZone tz) throws BadDateException {
try {
synchronized (isoDateTimeUTCTZFormat) {
isoDateTimeUTCTZFormat.setTimeZone(tz);
return isoDateTimeUTCTZFormat.parse(v... | class class_name[name] begin[{]
method[fromISODateTimeUTC, return_type[type[Date]], modifier[public static], parameter[val, tz]] begin[{]
TryStatement(block=[SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tz, postfix_operators=[], prefix_o... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Date] identifier[fromISODateTimeUTC] operator[SEP] Keyword[final] identifier[String] identifier[val] , Keyword[final] identifier[TimeZone] identifier[tz] operator[SEP] Keyword[throws] ident... |
public final void saveKeyStore(OutputStream output, KeyStore keyStore, char[] password) throws IOException {
logger.entry();
try {
keyStore.store(output, password);
} catch (KeyStoreException | NoSuchAlgorithmException | CertificateException e) {
RuntimeException exc... | class class_name[name] begin[{]
method[saveKeyStore, return_type[void], modifier[final public], parameter[output, keyStore, password]] begin[{]
call[logger.entry, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=output, p... | Keyword[public] Keyword[final] Keyword[void] identifier[saveKeyStore] operator[SEP] identifier[OutputStream] identifier[output] , identifier[KeyStore] identifier[keyStore] , Keyword[char] operator[SEP] operator[SEP] identifier[password] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[logger]... |
public static void configureDefaults(final String ident,
final Level level) {
configureDefaults(ident, level, ReplaceNewLines.OFF);
} | class class_name[name] begin[{]
method[configureDefaults, return_type[void], modifier[public static], parameter[ident, level]] begin[{]
call[.configureDefaults, parameter[member[.ident], member[.level], member[ReplaceNewLines.OFF]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[configureDefaults] operator[SEP] Keyword[final] identifier[String] identifier[ident] , Keyword[final] identifier[Level] identifier[level] operator[SEP] {
identifier[configureDefaults] operator[SEP] identifier[ident] , identifier[level] , identifier[Repl... |
public static HttpURLConnection retrieveMessages(final URI uri, final QueueRequestOptions queueOptions,
final OperationContext opContext, final int numberOfMessages, final int visibilityTimeoutInSeconds)
throws URISyntaxException, IOException, StorageException {
final UriQueryBuilder bu... | class class_name[name] begin[{]
method[retrieveMessages, return_type[type[HttpURLConnection]], modifier[public static], parameter[uri, queueOptions, opContext, numberOfMessages, visibilityTimeoutInSeconds]] begin[{]
local_variable[type[UriQueryBuilder], builder]
if[binary_operation[memb... | Keyword[public] Keyword[static] identifier[HttpURLConnection] identifier[retrieveMessages] operator[SEP] Keyword[final] identifier[URI] identifier[uri] , Keyword[final] identifier[QueueRequestOptions] identifier[queueOptions] , Keyword[final] identifier[OperationContext] identifier[opContext] , Keyword[final] Keywor... |
public static vpnglobal_staserver_binding[] get_filtered(nitro_service service, String filter) throws Exception{
vpnglobal_staserver_binding obj = new vpnglobal_staserver_binding();
options option = new options();
option.set_filter(filter);
vpnglobal_staserver_binding[] response = (vpnglobal_staserver_binding[]... | class class_name[name] begin[{]
method[get_filtered, return_type[type[vpnglobal_staserver_binding]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[vpnglobal_staserver_binding], obj]
local_variable[type[options], option]
call[option.set_filter,... | Keyword[public] Keyword[static] identifier[vpnglobal_staserver_binding] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnglobal_staserver_bi... |
private synchronized void rebuildJournal() throws IOException {
if (journalWriter != null) {
journalWriter.close();
}
Writer writer = new BufferedWriter(
new OutputStreamWriter(new FileOutputStream(journalFileTmp), Util.US_ASCII));
try {
writer.write(MAGIC);
writer.write("\n");
writer.write(VER... | class class_name[name] begin[{]
method[rebuildJournal, return_type[void], modifier[synchronized private], parameter[]] begin[{]
if[binary_operation[member[.journalWriter], !=, literal[null]]] begin[{]
call[journalWriter.close, parameter[]]
else begin[{]
None
... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[rebuildJournal] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[journalWriter] operator[!=] Other[null] operator[SEP] {
identifier[journalWriter] operator[SEP] identifier[close] o... |
public org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement toP2() {
return toRep(Representation.P2);
} | class class_name[name] begin[{]
method[toP2, return_type[type[org]], modifier[public], parameter[]] begin[{]
return[call[.toRep, parameter[member[Representation.P2]]]]
end[}]
END[}] | Keyword[public] identifier[org] operator[SEP] identifier[mariadb] operator[SEP] identifier[jdbc] operator[SEP] identifier[internal] operator[SEP] identifier[com] operator[SEP] identifier[send] operator[SEP] identifier[authentication] operator[SEP] identifier[ed25519] operator[SEP] identifier[math] operator[SEP] identif... |
protected final IPersonAttributes mapPersonAttributes(final IPersonAttributes person) {
final Map<String, List<Object>> personAttributes = person.getAttributes();
final Map<String, List<Object>> mappedAttributes;
//If no mapping just use the attributes as-is
if (this.resultAttributeMapp... | class class_name[name] begin[{]
method[mapPersonAttributes, return_type[type[IPersonAttributes]], modifier[final protected], parameter[person]] begin[{]
local_variable[type[Map], personAttributes]
local_variable[type[Map], mappedAttributes]
if[binary_operation[THIS[member[None.r... | Keyword[protected] Keyword[final] identifier[IPersonAttributes] identifier[mapPersonAttributes] operator[SEP] Keyword[final] identifier[IPersonAttributes] identifier[person] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Object] operator[>... |
public String getURI(String prefix) throws NamespaceException
{
String uri = namespaces.get(prefix);
if (uri == null)
{
throw new NamespaceException("Unknown Prefix " + prefix);
}
return uri;
} | class class_name[name] begin[{]
method[getURI, return_type[type[String]], modifier[public], parameter[prefix]] begin[{]
local_variable[type[String], uri]
if[binary_operation[member[.uri], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOp... | Keyword[public] identifier[String] identifier[getURI] operator[SEP] identifier[String] identifier[prefix] operator[SEP] Keyword[throws] identifier[NamespaceException] {
identifier[String] identifier[uri] operator[=] identifier[namespaces] operator[SEP] identifier[get] operator[SEP] identifier[prefix] operator[SE... |
public BeanDefinition removeBean(final String name) {
BeanDefinition bd = beans.remove(name);
if (bd == null) {
return null;
}
bd.scopeRemove();
return bd;
} | class class_name[name] begin[{]
method[removeBean, return_type[type[BeanDefinition]], modifier[public], parameter[name]] begin[{]
local_variable[type[BeanDefinition], bd]
if[binary_operation[member[.bd], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{... | Keyword[public] identifier[BeanDefinition] identifier[removeBean] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
identifier[BeanDefinition] identifier[bd] operator[=] identifier[beans] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] Ke... |
private void allClustersEqual(final List<String> clusterUrls) {
Validate.notEmpty(clusterUrls, "clusterUrls cannot be null");
// If only one clusterUrl return immediately
if (clusterUrls.size() == 1)
return;
AdminClient adminClientLhs = adminClientPerCluster.get(clusterUrls.g... | class class_name[name] begin[{]
method[allClustersEqual, return_type[void], modifier[private], parameter[clusterUrls]] begin[{]
call[Validate.notEmpty, parameter[member[.clusterUrls], literal["clusterUrls cannot be null"]]]
if[binary_operation[call[clusterUrls.size, parameter[]]... | Keyword[private] Keyword[void] identifier[allClustersEqual] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[clusterUrls] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notEmpty] operator[SEP] identifier[clusterUrls] , literal[String] operator[SE... |
private boolean handleOpenLogSQLException(SQLException sqlex) throws InterruptedException {
if (tc.isEntryEnabled())
Tr.entry(tc, "handleOpenLogSQLException", new java.lang.Object[] { sqlex, this });
boolean retryBatch = true;
boolean failAndReport = false;
int batchRetries ... | class class_name[name] begin[{]
method[handleOpenLogSQLException, return_type[type[boolean]], modifier[private], parameter[sqlex]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["handleOpenLogSQLException"], ArrayCreator(dime... | Keyword[private] Keyword[boolean] identifier[handleOpenLogSQLException] operator[SEP] identifier[SQLException] identifier[sqlex] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[... |
private static RequestBody buildRequestBody(RequestResponse rr) {
return rr.getRequestJson() != null ? RequestBody.create(MEDIA_TYPE_JSON,
SerializationUtils.toJsonString(rr.getRequestJson())) : null;
} | class class_name[name] begin[{]
method[buildRequestBody, return_type[type[RequestBody]], modifier[private static], parameter[rr]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRequestJson, postfix_operators=[], prefix_operators=[], qualifi... | Keyword[private] Keyword[static] identifier[RequestBody] identifier[buildRequestBody] operator[SEP] identifier[RequestResponse] identifier[rr] operator[SEP] {
Keyword[return] identifier[rr] operator[SEP] identifier[getRequestJson] operator[SEP] operator[SEP] operator[!=] Other[null] operator[?] identifier[Reques... |
CmsTreeOpenState getVfsTreeState(String treeToken) {
return (CmsTreeOpenState)(getRequest().getSession().getAttribute(
getTreeOpenStateAttributeName(I_CmsGalleryProviderConstants.TREE_VFS, treeToken)));
} | class class_name[name] begin[{]
method[getVfsTreeState, return_type[type[CmsTreeOpenState]], modifier[default], parameter[treeToken]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[], member=getRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=Non... | identifier[CmsTreeOpenState] identifier[getVfsTreeState] operator[SEP] identifier[String] identifier[treeToken] operator[SEP] {
Keyword[return] operator[SEP] identifier[CmsTreeOpenState] operator[SEP] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getSession] operator[S... |
public static void setElementWiseStride(IntBuffer buffer, int elementWiseStride) {
int length2 = shapeInfoLength(buffer.get(0));
// if (1 > 0) throw new RuntimeException("setElementWiseStride called: [" + elementWiseStride + "], buffer: " + bufferToString(buffer));
buffer.put(length2 - 2,... | class class_name[name] begin[{]
method[setElementWiseStride, return_type[void], modifier[public static], parameter[buffer, elementWiseStride]] begin[{]
local_variable[type[int], length2]
call[buffer.put, parameter[binary_operation[member[.length2], -, literal[2]], member[.elementWiseStr... | Keyword[public] Keyword[static] Keyword[void] identifier[setElementWiseStride] operator[SEP] identifier[IntBuffer] identifier[buffer] , Keyword[int] identifier[elementWiseStride] operator[SEP] {
Keyword[int] identifier[length2] operator[=] identifier[shapeInfoLength] operator[SEP] identifier[buffer] operator[SE... |
@Override
public void process(final Resource resource, final Reader reader, final Writer writer)
throws IOException {
try {
final String content = IOUtils.toString(reader);
final Matcher originalMatcher = PATTERN_COPYRIGHT.matcher(content);
final StringBuffer copyrightBuffer = new Stri... | class class_name[name] begin[{]
method[process, return_type[void], modifier[public], parameter[resource, reader, writer]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=r... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[process] operator[SEP] Keyword[final] identifier[Resource] identifier[resource] , Keyword[final] identifier[Reader] identifier[reader] , Keyword[final] identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException... |
public static int readFully(InputStream in, byte[] buf)
throws IOException
{
return readFully(in, buf, 0, buf.length);
} | class class_name[name] begin[{]
method[readFully, return_type[type[int]], modifier[public static], parameter[in, buf]] begin[{]
return[call[.readFully, parameter[member[.in], member[.buf], literal[0], member[buf.length]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[readFully] operator[SEP] identifier[InputStream] identifier[in] , Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[readFully] operator[SEP] identifier[in] , identi... |
@Override
public IndividualPropertyHelper withIndividual(Name<?> id, String managerId) {
return this.pHelper.withIndividual(id,managerId);
} | class class_name[name] begin[{]
method[withIndividual, return_type[type[IndividualPropertyHelper]], modifier[public], parameter[id, managerId]] begin[{]
return[THIS[member[None.pHelper]call[None.withIndividual, parameter[member[.id], member[.managerId]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[IndividualPropertyHelper] identifier[withIndividual] operator[SEP] identifier[Name] operator[<] operator[?] operator[>] identifier[id] , identifier[String] identifier[managerId] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[p... |
public static BigInteger getBigInteger(
final Properties properties,
final String key)
throws JPropertyNonexistent,
JPropertyIncorrectType
{
Objects.requireNonNull(properties, "Properties");
Objects.requireNonNull(key, "Key");
final String text = getString(properties, key);
return par... | class class_name[name] begin[{]
method[getBigInteger, return_type[type[BigInteger]], modifier[public static], parameter[properties, key]] begin[{]
call[Objects.requireNonNull, parameter[member[.properties], literal["Properties"]]]
call[Objects.requireNonNull, parameter[member[.k... | Keyword[public] Keyword[static] identifier[BigInteger] identifier[getBigInteger] operator[SEP] Keyword[final] identifier[Properties] identifier[properties] , Keyword[final] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[JPropertyNonexistent] , identifier[JPropertyIncorrectType] {
i... |
public Record findA(String key, Object value) {
key = DB.parseKeyParameter(key);
if (value != null) {
return first(key.concat(" = ?"), value);
} else {
return first(key.concat(" is null"));
}
} | class class_name[name] begin[{]
method[findA, return_type[type[Record]], modifier[public], parameter[key, value]] begin[{]
assign[member[.key], call[DB.parseKeyParameter, parameter[member[.key]]]]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
retur... | Keyword[public] identifier[Record] identifier[findA] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] {
identifier[key] operator[=] identifier[DB] operator[SEP] identifier[parseKeyParameter] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if... |
public static String getDescription(char ch)
{
CharInfo info = (CharInfo) fCodeMap.get(Integer.valueOf(ch));
return (info != null) ? info.fDescription : null;
} | class class_name[name] begin[{]
method[getDescription, return_type[type[String]], modifier[public static], parameter[ch]] begin[{]
local_variable[type[CharInfo], info]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=info, postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] identifier[String] identifier[getDescription] operator[SEP] Keyword[char] identifier[ch] operator[SEP] {
identifier[CharInfo] identifier[info] operator[=] operator[SEP] identifier[CharInfo] operator[SEP] identifier[fCodeMap] operator[SEP] identifier[get] operator[SEP] identifier[I... |
public static Boolean[] wrap(boolean... values) {
if (null == values) {
return null;
}
final int length = values.length;
if (0 == length) {
return new Boolean[0];
}
final Boolean[] array = new Boolean[length];
for (int i = 0; i < length; i++) {
array[i] = Boolean.valueOf(values[i]);
... | class class_name[name] begin[{]
method[wrap, return_type[type[Boolean]], modifier[public static], parameter[values]] begin[{]
if[binary_operation[literal[null], ==, member[.values]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type... | Keyword[public] Keyword[static] identifier[Boolean] operator[SEP] operator[SEP] identifier[wrap] operator[SEP] Keyword[boolean] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[values] operator[SEP] {
Keyword[return] Other[null] operator[SE... |
public SDVariable unsortedSegmentSqrtN(String name, SDVariable data, SDVariable segmentIds, int numSegments) {
SDVariable ret = f().unsortedSegmentSqrtN(data, segmentIds, numSegments);
return updateVariableNameAndReference(ret, name);
} | class class_name[name] begin[{]
method[unsortedSegmentSqrtN, return_type[type[SDVariable]], modifier[public], parameter[name, data, segmentIds, numSegments]] begin[{]
local_variable[type[SDVariable], ret]
return[call[.updateVariableNameAndReference, parameter[member[.ret], member[.name]]]]
... | Keyword[public] identifier[SDVariable] identifier[unsortedSegmentSqrtN] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[data] , identifier[SDVariable] identifier[segmentIds] , Keyword[int] identifier[numSegments] operator[SEP] {
identifier[SDVariable] identifier[ret] oper... |
@Path("/{solutionId}/{memberType}/{memberId}")
@ApiOperation(value="Delete a solution or remove a member from a solution",
notes="Supported memberTypes: requests, tasks, processes, solutions.", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<String,String> hea... | class class_name[name] begin[{]
method[delete, return_type[type[JSONObject]], modifier[public], parameter[path, content, headers]] begin[{]
local_variable[type[String], id]
local_variable[type[String], rel]
local_variable[type[SolutionServices], solutionServices]
if[bina... | annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[ApiOperation] operator[SEP] identifier[value] operator[=] literal[String] , identifier[notes] operator[=] literal[String] , identifier[response] operator[=] identifier[StatusMessage] operator[SEP] Keyword[class] operat... |
@Override
public void startPlugins() {
for (PluginWrapper pluginWrapper : resolvedPlugins) {
PluginState pluginState = pluginWrapper.getPluginState();
if ((PluginState.DISABLED != pluginState) && (PluginState.STARTED != pluginState)) {
try {
log.in... | class class_name[name] begin[{]
method[startPlugins, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], mem... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[startPlugins] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[PluginWrapper] identifier[pluginWrapper] operator[:] identifier[resolvedPlugins] operator[SEP] {
identifier[PluginState] identifier[pluginState... |
private ITextEditor getEditor(IWorkbenchPart part)
{
if (part instanceof ITextEditor)
{
ITextEditor editorPart = (ITextEditor) part;
IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
if (resource != null && resource instanceof IFile)
{
return editorPart;
... | class class_name[name] begin[{]
method[getEditor, return_type[type[ITextEditor]], modifier[private], parameter[part]] begin[{]
if[binary_operation[member[.part], instanceof, type[ITextEditor]]] begin[{]
local_variable[type[ITextEditor], editorPart]
local_variable[type[IR... | Keyword[private] identifier[ITextEditor] identifier[getEditor] operator[SEP] identifier[IWorkbenchPart] identifier[part] operator[SEP] {
Keyword[if] operator[SEP] identifier[part] Keyword[instanceof] identifier[ITextEditor] operator[SEP] {
identifier[ITextEditor] identifier[editorPart] operator[=] ope... |
private void reset() throws IOException {
if (streamState == StreamStates.OPEN) {
if (stream.markSupported()) {
stream.reset();
} else {
// In case a inputStream (e.g., fileInputStream) doesn't support
// mark, throw a exception
... | class class_name[name] begin[{]
method[reset, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.streamState], ==, member[StreamStates.OPEN]]] begin[{]
if[call[stream.markSupported, parameter[]]] begin[{]
... | Keyword[private] Keyword[void] identifier[reset] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[streamState] operator[==] identifier[StreamStates] operator[SEP] identifier[OPEN] operator[SEP] {
Keyword[if] operator[SEP] identifier[stream] ope... |
protected DropDownChoice<T> newChildChoice(final String id,
final IModel<TwoDropDownChoicesBean<T>> model)
{
final IModel<T> selectedChildOptionModel = new PropertyModel<>(model,
"selectedChildOption");
final IModel<List<T>> childChoicesModel = PropertyModel.of(model, "childChoices");
final DropDownChoice<T... | class class_name[name] begin[{]
method[newChildChoice, return_type[type[DropDownChoice]], modifier[protected], parameter[id, model]] begin[{]
local_variable[type[IModel], selectedChildOptionModel]
local_variable[type[IModel], childChoicesModel]
local_variable[type[DropDownChoice], cc]
... | Keyword[protected] identifier[DropDownChoice] operator[<] identifier[T] operator[>] identifier[newChildChoice] operator[SEP] Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[IModel] operator[<] identifier[TwoDropDownChoicesBean] operator[<] identifier[T] operator[>] operator[>] identifier[m... |
public void marshall(ImagePermissions imagePermissions, ProtocolMarshaller protocolMarshaller) {
if (imagePermissions == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(imagePermissions.getAllowFleet(... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[imagePermissions, protocolMarshaller]] begin[{]
if[binary_operation[member[.imagePermissions], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ImagePermissions] identifier[imagePermissions] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[imagePermissions] operator[==] Other[null] operator[SEP] {
Ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.