code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public String request(Bundle parameters)
throws MalformedURLException, IOException {
if (!parameters.containsKey("method")) {
throw new IllegalArgumentException("API method must be specified. "
+ "(parameters must contain key \"method\" and value). See"
... | class class_name[name] begin[{]
method[request, return_type[type[String]], modifier[public], parameter[parameters]] begin[{]
if[call[parameters.containsKey, parameter[literal["method"]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOpera... | Keyword[public] identifier[String] identifier[request] operator[SEP] identifier[Bundle] identifier[parameters] operator[SEP] Keyword[throws] identifier[MalformedURLException] , identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[parameters] operator[SEP] identifier[containsKey] operator[S... |
private Set<String> getControllerPaths(Class<?> controllerClass) {
Set<String> parentPaths = Collections.emptySet();
if (controllerClass.getSuperclass() != null) {
parentPaths = getControllerPaths(controllerClass.getSuperclass());
}
Set<String> paths = new LinkedHashSet<>();... | class class_name[name] begin[{]
method[getControllerPaths, return_type[type[Set]], modifier[private], parameter[controllerClass]] begin[{]
local_variable[type[Set], parentPaths]
if[binary_operation[call[controllerClass.getSuperclass, parameter[]], !=, literal[null]]] begin[{]
... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[getControllerPaths] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[controllerClass] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[parentPaths] operator[=]... |
Boolean isStdMapClsSupported() {
// its ok to use Class.forName here instead of nameSpace.classForName,
// because all standard map classes are loaded by the boot loader
boolean isSup = false;
switch (type) {
case Types.SQL_ARRAY : {
try {
... | class class_name[name] begin[{]
method[isStdMapClsSupported, return_type[type[Boolean]], modifier[default], parameter[]] begin[{]
local_variable[type[boolean], isSup]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SQL_ARRAY, postfix_operators=[], prefix_operators=[], qu... | identifier[Boolean] identifier[isStdMapClsSupported] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[isSup] operator[=] literal[boolean] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[Types] operator[SEP] identifier[SQL_ARRAY] operator[:... |
public <DPO> SingleDataProviderContext<DPO> read(DataProvider<DPO> dataProvider) {
List<DataProvider<DPO>> addedDataProviders = new ArrayList<DataProvider<DPO>>();
if (dataProvider != null) {
addedDataProviders.add(dataProvider);
}
// Change context
return new Single... | class class_name[name] begin[{]
method[read, return_type[type[SingleDataProviderContext]], modifier[public], parameter[dataProvider]] begin[{]
local_variable[type[List], addedDataProviders]
if[binary_operation[member[.dataProvider], !=, literal[null]]] begin[{]
c... | Keyword[public] operator[<] identifier[DPO] operator[>] identifier[SingleDataProviderContext] operator[<] identifier[DPO] operator[>] identifier[read] operator[SEP] identifier[DataProvider] operator[<] identifier[DPO] operator[>] identifier[dataProvider] operator[SEP] {
identifier[List] operator[<] identifier[Da... |
@Override
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException
{
checkClosed();
this.sysCatalog.setString(1, "TABLES");
JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery();
VoltTable vtable ... | class class_name[name] begin[{]
method[getTables, return_type[type[ResultSet]], modifier[public], parameter[catalog, schemaPattern, tableNamePattern, types]] begin[{]
call[.checkClosed, parameter[]]
THIS[member[None.sysCatalog]call[None.setString, parameter[literal[1], literal["... | annotation[@] identifier[Override] Keyword[public] identifier[ResultSet] identifier[getTables] operator[SEP] identifier[String] identifier[catalog] , identifier[String] identifier[schemaPattern] , identifier[String] identifier[tableNamePattern] , identifier[String] operator[SEP] operator[SEP] identifier[types] opera... |
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.PPO__RG:
return rg != null && !rg.isEmpty();
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PPO__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Re... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPO__RG] operator... |
public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException,
RepositoryException
{
if (!this.isNodeType(Constants.MIX_VERSIONABLE))
{
throw new UnsupportedRepositoryOperationException("Node is not mix:versionable " + getPath());
}
Prop... | class class_name[name] begin[{]
method[versionHistory, return_type[type[VersionHistoryImpl]], modifier[public], parameter[pool]] begin[{]
if[THIS[call[None.isNodeType, parameter[member[Constants.MIX_VERSIONABLE]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOp... | Keyword[public] identifier[VersionHistoryImpl] identifier[versionHistory] operator[SEP] Keyword[boolean] identifier[pool] operator[SEP] Keyword[throws] identifier[UnsupportedRepositoryOperationException] , identifier[RepositoryException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identi... |
public AttachInstancesToLoadBalancerRequest withInstanceNames(String... instanceNames) {
if (this.instanceNames == null) {
setInstanceNames(new java.util.ArrayList<String>(instanceNames.length));
}
for (String ele : instanceNames) {
this.instanceNames.add(ele);
}
... | class class_name[name] begin[{]
method[withInstanceNames, return_type[type[AttachInstancesToLoadBalancerRequest]], modifier[public], parameter[instanceNames]] begin[{]
if[binary_operation[THIS[member[None.instanceNames]], ==, literal[null]]] begin[{]
call[.setInstanceNam... | Keyword[public] identifier[AttachInstancesToLoadBalancerRequest] identifier[withInstanceNames] operator[SEP] identifier[String] operator[...] identifier[instanceNames] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[instanceNames] operator[==] Other[null] operator[SEP] {
... |
public void applySettings(@NotNull SocketChannel channel) throws IOException {
if (sendBufferSize != 0) {
channel.setOption(SO_SNDBUF, sendBufferSize);
}
if (receiveBufferSize != 0) {
channel.setOption(SO_RCVBUF, receiveBufferSize);
}
if (keepAlive != DEF_BOOL) {
channel.setOption(SO_KEEPALIVE, keepA... | class class_name[name] begin[{]
method[applySettings, return_type[void], modifier[public], parameter[channel]] begin[{]
if[binary_operation[member[.sendBufferSize], !=, literal[0]]] begin[{]
call[channel.setOption, parameter[member[.SO_SNDBUF], member[.sendBufferSize]]]
... | Keyword[public] Keyword[void] identifier[applySettings] operator[SEP] annotation[@] identifier[NotNull] identifier[SocketChannel] identifier[channel] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[sendBufferSize] operator[!=] Other[0] operator[SEP] {
ident... |
public static Optional<TypeElement> maybeAsTypeElement(TypeMirror type) {
Optional<DeclaredType> declaredType = maybeDeclared(type);
if (declaredType.isPresent()) {
return maybeType(declaredType.get().asElement());
} else {
return Optional.empty();
}
} | class class_name[name] begin[{]
method[maybeAsTypeElement, return_type[type[Optional]], modifier[public static], parameter[type]] begin[{]
local_variable[type[Optional], declaredType]
if[call[declaredType.isPresent, parameter[]]] begin[{]
return[call[.maybeType, parameter[ca... | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[TypeElement] operator[>] identifier[maybeAsTypeElement] operator[SEP] identifier[TypeMirror] identifier[type] operator[SEP] {
identifier[Optional] operator[<] identifier[DeclaredType] operator[>] identifier[declaredType] operator[=] iden... |
public static void error(TraceComponent tc, String msgKey) {
if(isTracing()) SibTr.error(tc, msgKey);
} | class class_name[name] begin[{]
method[error, return_type[void], modifier[public static], parameter[tc, msgKey]] begin[{]
if[call[.isTracing, parameter[]]] begin[{]
call[SibTr.error, parameter[member[.tc], member[.msgKey]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[error] operator[SEP] identifier[TraceComponent] identifier[tc] , identifier[String] identifier[msgKey] operator[SEP] {
Keyword[if] operator[SEP] identifier[isTracing] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[err... |
private Format createAppropriateFormat(String type, String style) {
Format newFormat = null;
int subformatType = findKeyword(type, typeList);
switch (subformatType){
case TYPE_NUMBER:
switch (findKeyword(style, modifierList)) {
case MODIFIER_EMPTY:
... | class class_name[name] begin[{]
method[createAppropriateFormat, return_type[type[Format]], modifier[private], parameter[type, style]] begin[{]
local_variable[type[Format], newFormat]
local_variable[type[int], subformatType]
SwitchStatement(cases=[SwitchStatementCase(case=['TYPE_NUMBER']... | Keyword[private] identifier[Format] identifier[createAppropriateFormat] operator[SEP] identifier[String] identifier[type] , identifier[String] identifier[style] operator[SEP] {
identifier[Format] identifier[newFormat] operator[=] Other[null] operator[SEP] Keyword[int] identifier[subformatType] operator[=] ident... |
@SuppressWarnings("fallthrough")
protected DCIdentifier identifier() throws ParseException {
skipWhitespace();
int pos = bp;
if (isJavaIdentifierStart(ch)) {
Name name = readJavaIdentifier();
return m.at(pos).newIdentifierTree(name);
}
throw new Pars... | class class_name[name] begin[{]
method[identifier, return_type[type[DCIdentifier]], modifier[protected], parameter[]] begin[{]
call[.skipWhitespace, parameter[]]
local_variable[type[int], pos]
if[call[.isJavaIdentifierStart, parameter[member[.ch]]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[DCIdentifier] identifier[identifier] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] {
identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[int] iden... |
private synchronized void increaseClientCount(Entry<K, V> entry) {
Preconditions.checkNotNull(entry);
Preconditions.checkState(!entry.isOrphan);
entry.clientCount++;
} | class class_name[name] begin[{]
method[increaseClientCount, return_type[void], modifier[synchronized private], parameter[entry]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.entry]]]
call[Preconditions.checkState, parameter[member[entry.isOrphan]]]
... | Keyword[private] Keyword[synchronized] Keyword[void] identifier[increaseClientCount] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[entry] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[entry] operator[S... |
@Override
public <BD extends BehaviorData, B extends Behavior<BD, ?>> BD getBehaviorData(final Class<B> behaviorClass) {
BD data = null;
final B behavior = getBehavior(behaviorClass);
if (behavior != null) {
data = behavior.data();
}
return data;
} | class class_name[name] begin[{]
method[getBehaviorData, return_type[type[BD]], modifier[public], parameter[behaviorClass]] begin[{]
local_variable[type[BD], data]
local_variable[type[B], behavior]
if[binary_operation[member[.behavior], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[BD] Keyword[extends] identifier[BehaviorData] , identifier[B] Keyword[extends] identifier[Behavior] operator[<] identifier[BD] , operator[?] operator[>] operator[>] identifier[BD] identifier[getBehaviorData] operator[SEP] Keyword[final] identif... |
public static AhcWSClient create(
AhcWSClientConfig config, AhcHttpCache cache, Materializer materializer) {
final StandaloneAhcWSClient client = StandaloneAhcWSClient.create(config, cache, materializer);
return new AhcWSClient(client, materializer);
} | class class_name[name] begin[{]
method[create, return_type[type[AhcWSClient]], modifier[public static], parameter[config, cache, materializer]] begin[{]
local_variable[type[StandaloneAhcWSClient], client]
return[ClassCreator(arguments=[MemberReference(member=client, postfix_operators=[], prefix... | Keyword[public] Keyword[static] identifier[AhcWSClient] identifier[create] operator[SEP] identifier[AhcWSClientConfig] identifier[config] , identifier[AhcHttpCache] identifier[cache] , identifier[Materializer] identifier[materializer] operator[SEP] {
Keyword[final] identifier[StandaloneAhcWSClient] identifier[... |
public List<Long> getProcessInstancesWaitingForEvent(String type) {
EntityManager entityManager = getEntityManager();
if (entityManager != null) {
Query processInstancesForEvent = getEntityManager().createNamedQuery( "ProcessInstancesWaitingForEvent" );
processInstancesForEvent.setParameter(... | class class_name[name] begin[{]
method[getProcessInstancesWaitingForEvent, return_type[type[List]], modifier[public], parameter[type]] begin[{]
local_variable[type[EntityManager], entityManager]
if[binary_operation[member[.entityManager], !=, literal[null]]] begin[{]
local_v... | Keyword[public] identifier[List] operator[<] identifier[Long] operator[>] identifier[getProcessInstancesWaitingForEvent] operator[SEP] identifier[String] identifier[type] operator[SEP] {
identifier[EntityManager] identifier[entityManager] operator[=] identifier[getEntityManager] operator[SEP] operator[SEP] opera... |
public int findHeaderPositionUnder(int x, int y) {
for (int i = 0; i < mHeaderRects.size(); i++) {
Rect rect = mHeaderRects.get(mHeaderRects.keyAt(i));
if (rect.contains(x, y)) {
int position = mHeaderRects.keyAt(i);
if (mVisibilityAdapter == null || mVisibilityAdapter.isPositionVisible(... | class class_name[name] begin[{]
method[findHeaderPositionUnder, return_type[type[int]], modifier[public], parameter[x, y]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati... | Keyword[public] Keyword[int] identifier[findHeaderPositionUnder] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[mHeaderRects] operator[SEP] identif... |
public Observable<VirtualNetworkTapInner> beginCreateOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).map(new Func1<ServiceResponse<VirtualNetworkTapInner>, VirtualNetworkTapInn... | class class_name[name] begin[{]
method[beginCreateOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, tapName, parameters]] begin[{]
return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.tapName], member[.paramet... | Keyword[public] identifier[Observable] operator[<] identifier[VirtualNetworkTapInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[tapName] , identifier[VirtualNetworkTapInner] identifier[parameters] operator[SEP] {
... |
public Document createRaw(@NonNull String content) {
return createRaw(StringUtils.EMPTY, content, defaultLanguage, Collections.emptyMap());
} | class class_name[name] begin[{]
method[createRaw, return_type[type[Document]], modifier[public], parameter[content]] begin[{]
return[call[.createRaw, parameter[member[StringUtils.EMPTY], member[.content], member[.defaultLanguage], call[Collections.emptyMap, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[Document] identifier[createRaw] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[content] operator[SEP] {
Keyword[return] identifier[createRaw] operator[SEP] identifier[StringUtils] operator[SEP] identifier[EMPTY] , identifier[content] , identifier[defaul... |
private Identity getIdentityFromResultSet()
{
try
{
// 1. get an empty instance of the target class
Constructor con = classDescriptor.getZeroArgumentConstructor();
Object obj = ConstructorHelper.instantiate(con);
// 2. fill only primary key ... | class class_name[name] begin[{]
method[getIdentityFromResultSet, return_type[type[Identity]], modifier[private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getZeroArg... | Keyword[private] identifier[Identity] identifier[getIdentityFromResultSet] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[Constructor] identifier[con] operator[=] identifier[classDescriptor] operator[SEP] identifier[getZeroArgumentConstructor] operator[SEP] operator[SEP] operator[SEP] identif... |
public Object getAttributeWithoutCache(String name) {
if (activity.getRequestAdapter() != null) {
return activity.getRequestAdapter().getAttribute(name);
} else {
return null;
}
} | class class_name[name] begin[{]
method[getAttributeWithoutCache, return_type[type[Object]], modifier[public], parameter[name]] begin[{]
if[binary_operation[call[activity.getRequestAdapter, parameter[]], !=, literal[null]]] begin[{]
return[call[activity.getRequestAdapter, parameter[]... | Keyword[public] identifier[Object] identifier[getAttributeWithoutCache] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[activity] operator[SEP] identifier[getRequestAdapter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyw... |
public static void fullViewLeft(CameraPinholeBrown paramLeft,
DMatrixRMaj rectifyLeft, DMatrixRMaj rectifyRight,
DMatrixRMaj rectifyK)
{
ImplRectifyImageOps_F64.fullViewLeft(paramLeft, rectifyLeft, rectifyRight, rectifyK);
} | class class_name[name] begin[{]
method[fullViewLeft, return_type[void], modifier[public static], parameter[paramLeft, rectifyLeft, rectifyRight, rectifyK]] begin[{]
call[ImplRectifyImageOps_F64.fullViewLeft, parameter[member[.paramLeft], member[.rectifyLeft], member[.rectifyRight], member[.rect... | Keyword[public] Keyword[static] Keyword[void] identifier[fullViewLeft] operator[SEP] identifier[CameraPinholeBrown] identifier[paramLeft] , identifier[DMatrixRMaj] identifier[rectifyLeft] , identifier[DMatrixRMaj] identifier[rectifyRight] , identifier[DMatrixRMaj] identifier[rectifyK] operator[SEP] {
identifi... |
public void setType(JvmType newType)
{
JvmType oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, XtypePackage.XFUNCTION_TYPE_REF__TYPE, oldType, type));
} | class class_name[name] begin[{]
method[setType, return_type[void], modifier[public], parameter[newType]] begin[{]
local_variable[type[JvmType], oldType]
assign[member[.type], member[.newType]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
call[.eNoti... | Keyword[public] Keyword[void] identifier[setType] operator[SEP] identifier[JvmType] identifier[newType] operator[SEP] {
identifier[JvmType] identifier[oldType] operator[=] identifier[type] operator[SEP] identifier[type] operator[=] identifier[newType] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificat... |
public void setFloatAttribute(String name, Float value) {
Attribute attribute = getAttributes().get(name);
if (!(attribute instanceof FloatAttribute)) {
throw new IllegalStateException("Cannot set float value on attribute with different type, " +
attribute.getClass().getName() + " setting value " + value);
... | class class_name[name] begin[{]
method[setFloatAttribute, return_type[void], modifier[public], parameter[name, value]] begin[{]
local_variable[type[Attribute], attribute]
if[binary_operation[member[.attribute], instanceof, type[FloatAttribute]]] begin[{]
ThrowStatement(expre... | Keyword[public] Keyword[void] identifier[setFloatAttribute] operator[SEP] identifier[String] identifier[name] , identifier[Float] identifier[value] operator[SEP] {
identifier[Attribute] identifier[attribute] operator[=] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator... |
protected IntHashSet findBorderEdgeIds(SpatialRuleLookup ruleLookup) {
AllEdgesIterator allEdgesIterator = graph.getAllEdges();
NodeAccess nodeAccess = graph.getNodeAccess();
IntHashSet inaccessible = new IntHashSet();
while (allEdgesIterator.next()) {
int adjNode = allEdgesI... | class class_name[name] begin[{]
method[findBorderEdgeIds, return_type[type[IntHashSet]], modifier[protected], parameter[ruleLookup]] begin[{]
local_variable[type[AllEdgesIterator], allEdgesIterator]
local_variable[type[NodeAccess], nodeAccess]
local_variable[type[IntHashSet], inaccessib... | Keyword[protected] identifier[IntHashSet] identifier[findBorderEdgeIds] operator[SEP] identifier[SpatialRuleLookup] identifier[ruleLookup] operator[SEP] {
identifier[AllEdgesIterator] identifier[allEdgesIterator] operator[=] identifier[graph] operator[SEP] identifier[getAllEdges] operator[SEP] operator[SEP] oper... |
public LineString getLineString(Geometry geometry) {
if (geometry instanceof MultiLineString) {
if (geometryIndex >= 0 && geometryIndex < geometry.getNumGeometries()) {
return getLinearRing(geometry.getGeometryN(geometryIndex));
}
} else if (geometry instanceof LineString) {
return (LineString) geometr... | class class_name[name] begin[{]
method[getLineString, return_type[type[LineString]], modifier[public], parameter[geometry]] begin[{]
if[binary_operation[member[.geometry], instanceof, type[MultiLineString]]] begin[{]
if[binary_operation[binary_operation[member[.geometryI... | Keyword[public] identifier[LineString] identifier[getLineString] operator[SEP] identifier[Geometry] identifier[geometry] operator[SEP] {
Keyword[if] operator[SEP] identifier[geometry] Keyword[instanceof] identifier[MultiLineString] operator[SEP] {
Keyword[if] operator[SEP] identifier[geometryIndex] op... |
@Override
public void actionCommit() {
List<Throwable> errors = new ArrayList<Throwable>();
try {
// if new create it first
if (!m_searchManager.getSearchIndexSources().keySet().contains(m_indexsource.getName())) {
m_searchManager.addSearchIndexSource(m_ind... | class class_name[name] begin[{]
method[actionCommit, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[List], errors]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getSearchIndexSources, postfix_operators=[], prefix_operators=['!'],... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[actionCommit] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Throwable] operator[>] identifier[errors] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Throwable] operator[>] operator[SEP] oper... |
public boolean isEmpty() {
for (Node p = head; p != null; p = succ(p)) {
if (!p.isMatched())
return !p.isData;
}
return true;
} | class class_name[name] begin[{]
method[isEmpty, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isMatched, postfix_operators=[], prefix_operators=['!'], qualifier=p, ... | Keyword[public] Keyword[boolean] identifier[isEmpty] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Node] identifier[p] operator[=] identifier[head] operator[SEP] identifier[p] operator[!=] Other[null] operator[SEP] identifier[p] operator[=] identifier[succ] operator[SEP] identifier[p] opera... |
public static double polygonSimple( Polygon2D_F64 poly ) {
double total = 0;
Point2D_F64 v0 = poly.get(0);
Point2D_F64 v1 = poly.get(1);
for (int i = 2; i < poly.size(); i++) {
Point2D_F64 v2 = poly.get(i);
total += v1.x*( v2.y - v0.y);
v0 = v1; v1 = v2;
}
Point2D_F64 v2 = poly.get(0);
total ... | class class_name[name] begin[{]
method[polygonSimple, return_type[type[double]], modifier[public static], parameter[poly]] begin[{]
local_variable[type[double], total]
local_variable[type[Point2D_F64], v0]
local_variable[type[Point2D_F64], v1]
ForStatement(body=BlockStatement(la... | Keyword[public] Keyword[static] Keyword[double] identifier[polygonSimple] operator[SEP] identifier[Polygon2D_F64] identifier[poly] operator[SEP] {
Keyword[double] identifier[total] operator[=] Other[0] operator[SEP] identifier[Point2D_F64] identifier[v0] operator[=] identifier[poly] operator[SEP] identifier[get]... |
@Override
public JapaneseDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
if (era instanceof JapaneseEra == false) {
throw new ClassCastException("Era must be JapaneseEra");
}
return JapaneseDate.ofYearDay((JapaneseEra) era, yearOfEra, dayOfYear);
} | class class_name[name] begin[{]
method[dateYearDay, return_type[type[JapaneseDate]], modifier[public], parameter[era, yearOfEra, dayOfYear]] begin[{]
if[binary_operation[binary_operation[member[.era], instanceof, type[JapaneseEra]], ==, literal[false]]] begin[{]
ThrowStatement(expre... | annotation[@] identifier[Override] Keyword[public] identifier[JapaneseDate] identifier[dateYearDay] operator[SEP] identifier[Era] identifier[era] , Keyword[int] identifier[yearOfEra] , Keyword[int] identifier[dayOfYear] operator[SEP] {
Keyword[if] operator[SEP] identifier[era] Keyword[instanceof] identifier[Ja... |
protected final String prepareUri(final URI uri) {
if (compareRelative) {
final String path = uri.getRawPath();
final String query = uri.getRawQuery();
final String fragment = uri.getRawFragment();
if (query != null && fragment != null) {
return pa... | class class_name[name] begin[{]
method[prepareUri, return_type[type[String]], modifier[final protected], parameter[uri]] begin[{]
if[member[.compareRelative]] begin[{]
local_variable[type[String], path]
local_variable[type[String], query]
local_variable[type[... | Keyword[protected] Keyword[final] identifier[String] identifier[prepareUri] operator[SEP] Keyword[final] identifier[URI] identifier[uri] operator[SEP] {
Keyword[if] operator[SEP] identifier[compareRelative] operator[SEP] {
Keyword[final] identifier[String] identifier[path] operator[=] identifier[uri] ... |
@GwtIncompatible // Array.newInstance(Class, int)
public static <T> T[] concat(T[] first, T[] second, Class<T> type) {
T[] result = newArray(type, first.length + second.length);
System.arraycopy(first, 0, result, 0, first.length);
System.arraycopy(second, 0, result, first.length, second.length);
retur... | class class_name[name] begin[{]
method[concat, return_type[type[T]], modifier[public static], parameter[first, second, type]] begin[{]
local_variable[type[T], result]
call[System.arraycopy, parameter[member[.first], literal[0], member[.result], literal[0], member[first.length]]]
... | annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] operator[SEP] operator[SEP] identifier[concat] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[first] , identifier[T] operator[SEP] operator[SEP] identifier[second] , identi... |
@Override
public boolean contains(Object e) {
if (N.isNullOrEmpty(coll)) {
return false;
}
return coll.contains(e);
} | class class_name[name] begin[{]
method[contains, return_type[type[boolean]], modifier[public], parameter[e]] begin[{]
if[call[N.isNullOrEmpty, parameter[member[.coll]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
return[call[coll.contains, para... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] identifier[Object] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[coll] operator[SEP] operator[SEP] {
Keyword[r... |
public Map<String,Object> getRowData() {
if (resultSet == null) {
return (null);
} else if (!isRowAvailable()) {
throw new NoRowAvailableException();
}
try {
getMetaData();
return (new ResultSetMap(this, String.CASE_INSENSITIVE_ORDER));
}... | class class_name[name] begin[{]
method[getRowData, return_type[type[Map]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.resultSet], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
if[call[.isRowAvailable, parameter[]]] begi... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getRowData] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[resultSet] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP] Other[null] operator[SEP] operato... |
public static void setServletContext(ServletContext servletContext) {
if (servletContext == null) {
Mvcs.servletContext.remove();
}
if (def_servletContext == null)
def_servletContext = servletContext;
Mvcs.servletContext.set(servletContext);
} | class class_name[name] begin[{]
method[setServletContext, return_type[void], modifier[public static], parameter[servletContext]] begin[{]
if[binary_operation[member[.servletContext], ==, literal[null]]] begin[{]
call[Mvcs.servletContext.remove, parameter[]]
else ... | Keyword[public] Keyword[static] Keyword[void] identifier[setServletContext] operator[SEP] identifier[ServletContext] identifier[servletContext] operator[SEP] {
Keyword[if] operator[SEP] identifier[servletContext] operator[==] Other[null] operator[SEP] {
identifier[Mvcs] operator[SEP] identifier[servle... |
public java.util.List<DistributionSummary> getItems() {
if (items == null) {
items = new com.amazonaws.internal.SdkInternalList<DistributionSummary>();
}
return items;
} | class class_name[name] begin[{]
method[getItems, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.items], ==, literal[null]]] begin[{]
assign[member[.items], ClassCreator(arguments=[], body=None, constructor_type_arguments=None... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[DistributionSummary] operator[>] identifier[getItems] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[items] operator[==] Other[null] operator[SEP] {
identifier[item... |
public void pushHistory(String strHistory, boolean bPushToBrowser)
{
if (m_vHistory == null)
m_vHistory = new Vector<String>();
m_vHistory.addElement(strHistory);
String strHelp = Utility.fixDisplayURL(strHistory, true, true, true, this);
if (this.getAppletScreen() != nul... | class class_name[name] begin[{]
method[pushHistory, return_type[void], modifier[public], parameter[strHistory, bPushToBrowser]] begin[{]
if[binary_operation[member[.m_vHistory], ==, literal[null]]] begin[{]
assign[member[.m_vHistory], ClassCreator(arguments=[], body=None, constructo... | Keyword[public] Keyword[void] identifier[pushHistory] operator[SEP] identifier[String] identifier[strHistory] , Keyword[boolean] identifier[bPushToBrowser] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_vHistory] operator[==] Other[null] operator[SEP] identifier[m_vHistory] operator[=] Keyword[new] iden... |
@Override
public List<String> getDelcaredDependencies(String mid) throws ProcessingDependenciesException {
List<String> result = null;
try {
getReadLock();
try {
DepTreeNode.DependencyInfo depInfo = depMap.get(mid);
if (depInfo != null) {
result = depInfo.getDeclaredDependencies();
... | class class_name[name] begin[{]
method[getDelcaredDependencies, return_type[type[List]], modifier[public], parameter[mid]] begin[{]
local_variable[type[List], result]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getReadLock, postfix_operators=[], pref... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getDelcaredDependencies] operator[SEP] identifier[String] identifier[mid] operator[SEP] Keyword[throws] identifier[ProcessingDependenciesException] {
identifier[List] operator[<] identifier[S... |
public static Geometry addZ(Geometry geometry, double z) throws SQLException {
if(geometry == null){
return null;
}
geometry.apply(new AddZCoordinateSequenceFilter(z));
return geometry;
} | class class_name[name] begin[{]
method[addZ, return_type[type[Geometry]], modifier[public static], parameter[geometry, z]] begin[{]
if[binary_operation[member[.geometry], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
cal... | Keyword[public] Keyword[static] identifier[Geometry] identifier[addZ] operator[SEP] identifier[Geometry] identifier[geometry] , Keyword[double] identifier[z] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[geometry] operator[==] Other[null] operator[SEP] {
... |
public static int lastIndexOfIgnoreCase(String pString, int pChar, int pPos) {
if ((pString == null)) {
return -1;
}
// Get first char
char lower = Character.toLowerCase((char) pChar);
char upper = Character.toUpperCase((char) pChar);
int indexLower;
... | class class_name[name] begin[{]
method[lastIndexOfIgnoreCase, return_type[type[int]], modifier[public static], parameter[pString, pChar, pPos]] begin[{]
if[binary_operation[member[.pString], ==, literal[null]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[int] identifier[lastIndexOfIgnoreCase] operator[SEP] identifier[String] identifier[pString] , Keyword[int] identifier[pChar] , Keyword[int] identifier[pPos] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[pString] operator[==] Other[null] operator[SEP]... |
public static BitMatrix encode(String content, int width, int height) {
return encode(content, BarcodeFormat.QR_CODE, width, height);
} | class class_name[name] begin[{]
method[encode, return_type[type[BitMatrix]], modifier[public static], parameter[content, width, height]] begin[{]
return[call[.encode, parameter[member[.content], member[BarcodeFormat.QR_CODE], member[.width], member[.height]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[BitMatrix] identifier[encode] operator[SEP] identifier[String] identifier[content] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
Keyword[return] identifier[encode] operator[SEP] identifier[content] , identifier[BarcodeFormat] oper... |
@Override
protected final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (!support.isLegal(request)) {
return;
}
//设置响应编码格式
response.setCharacterEncoding("UTF-8");
String resp = support.processReques... | class class_name[name] begin[{]
method[doPost, return_type[void], modifier[final protected], parameter[request, response]] begin[{]
if[call[support.isLegal, parameter[member[.request]]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[response.se... | annotation[@] identifier[Override] Keyword[protected] Keyword[final] Keyword[void] identifier[doPost] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] {
Ke... |
@Override
public UpdateAgentResult updateAgent(UpdateAgentRequest request) {
request = beforeClientExecution(request);
return executeUpdateAgent(request);
} | class class_name[name] begin[{]
method[updateAgent, return_type[type[UpdateAgentResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateAgent, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateAgentResult] identifier[updateAgent] operator[SEP] identifier[UpdateAgentRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP]... |
private Message receive(TestContext context) {
Endpoint messageEndpoint = getOrCreateEndpoint(context);
return receiveTimeout > 0 ? messageEndpoint.createConsumer().receive(context, receiveTimeout) :
messageEndpoint.createConsumer().receive(context, messageEndpoint.getEndpointConfigurati... | class class_name[name] begin[{]
method[receive, return_type[type[Message]], modifier[private], parameter[context]] begin[{]
local_variable[type[Endpoint], messageEndpoint]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=receiveTimeout, postfix_operators=[], pr... | Keyword[private] identifier[Message] identifier[receive] operator[SEP] identifier[TestContext] identifier[context] operator[SEP] {
identifier[Endpoint] identifier[messageEndpoint] operator[=] identifier[getOrCreateEndpoint] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] identifier[... |
public IfcBSplineCurveForm createIfcBSplineCurveFormFromString(EDataType eDataType, String initialValue) {
IfcBSplineCurveForm result = IfcBSplineCurveForm.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eData... | class class_name[name] begin[{]
method[createIfcBSplineCurveFormFromString, return_type[type[IfcBSplineCurveForm]], modifier[public], parameter[eDataType, initialValue]] begin[{]
local_variable[type[IfcBSplineCurveForm], result]
if[binary_operation[member[.result], ==, literal[null]]] b... | Keyword[public] identifier[IfcBSplineCurveForm] identifier[createIfcBSplineCurveFormFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] {
identifier[IfcBSplineCurveForm] identifier[result] operator[=] identifier[IfcBSplineCurveForm] o... |
private void visit(XmlSchema xmlSchema, XmlSchemaObjectBase element,
final int level, final ArrayNode avroFields) {
if (element instanceof XmlSchemaElement) {
visit(xmlSchema, (XmlSchemaElement) element, level, avroFields);
} else if (element instanceof XmlSchemaGroupRef) {
... | class class_name[name] begin[{]
method[visit, return_type[void], modifier[private], parameter[xmlSchema, element, level, avroFields]] begin[{]
if[binary_operation[member[.element], instanceof, type[XmlSchemaElement]]] begin[{]
call[.visit, parameter[member[.xmlSchema], C... | Keyword[private] Keyword[void] identifier[visit] operator[SEP] identifier[XmlSchema] identifier[xmlSchema] , identifier[XmlSchemaObjectBase] identifier[element] , Keyword[final] Keyword[int] identifier[level] , Keyword[final] identifier[ArrayNode] identifier[avroFields] operator[SEP] {
Keyword[if] operator[SE... |
public static void rank1UpdateMultL(DMatrixRMaj A , double u[] ,
double gamma ,
int colA0,
int w0 , int w1 )
{
for( int i = colA0; i < A.numRows; i++ ) {
int startIndex = i*A.n... | class class_name[name] begin[{]
method[rank1UpdateMultL, return_type[void], modifier[public static], parameter[A, u, gamma, colA0, w0, w1]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializ... | Keyword[public] Keyword[static] Keyword[void] identifier[rank1UpdateMultL] operator[SEP] identifier[DMatrixRMaj] identifier[A] , Keyword[double] identifier[u] operator[SEP] operator[SEP] , Keyword[double] identifier[gamma] , Keyword[int] identifier[colA0] , Keyword[int] identifier[w0] , Keyword[int] identifier[w1]... |
public void write(DataOutput out) throws IOException {
Text.writeString(out, jobFile);
taskId.write(out);
out.writeInt(partition);
out.writeInt(numSlotsRequired);
taskStatus.write(out);
skipRanges.write(out);
out.writeBoolean(skipping);
out.writeBoolean(jobCleanup);
if (jobCleanup) {... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[out]] begin[{]
call[Text.writeString, parameter[member[.out], member[.jobFile]]]
call[taskId.write, parameter[member[.out]]]
call[out.writeInt, parameter[member[.partitio... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[DataOutput] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Text] operator[SEP] identifier[writeString] operator[SEP] identifier[out] , identifier[jobFile] operator[SEP] operator[SEP] identifier[taskId] o... |
public Future<AsperaTransaction> upload(String bucket, File localFileName, String remoteFileName) {
return upload(bucket, localFileName, remoteFileName, asperaConfig, null);
} | class class_name[name] begin[{]
method[upload, return_type[type[Future]], modifier[public], parameter[bucket, localFileName, remoteFileName]] begin[{]
return[call[.upload, parameter[member[.bucket], member[.localFileName], member[.remoteFileName], member[.asperaConfig], literal[null]]]]
end[}]
END[... | Keyword[public] identifier[Future] operator[<] identifier[AsperaTransaction] operator[>] identifier[upload] operator[SEP] identifier[String] identifier[bucket] , identifier[File] identifier[localFileName] , identifier[String] identifier[remoteFileName] operator[SEP] {
Keyword[return] identifier[upload] operato... |
public Observable<Void> createOrUpdateSecuritySettingsAsync(String deviceName, String resourceGroupName, AsymmetricEncryptedSecret deviceAdminPassword) {
return createOrUpdateSecuritySettingsWithServiceResponseAsync(deviceName, resourceGroupName, deviceAdminPassword).map(new Func1<ServiceResponse<Void>, Void>()... | class class_name[name] begin[{]
method[createOrUpdateSecuritySettingsAsync, return_type[type[Observable]], modifier[public], parameter[deviceName, resourceGroupName, deviceAdminPassword]] begin[{]
return[call[.createOrUpdateSecuritySettingsWithServiceResponseAsync, parameter[member[.deviceName], member... | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[createOrUpdateSecuritySettingsAsync] operator[SEP] identifier[String] identifier[deviceName] , identifier[String] identifier[resourceGroupName] , identifier[AsymmetricEncryptedSecret] identifier[deviceAdminPassword] operator[SE... |
public final void setProgressBarType(final ProgressBarType type) {
ProgressBarType currentType = getProgressBarType();
ProgressBarType typeToSet = type == null ? DEFAULT_TYPE : type;
if (typeToSet != currentType) {
getOrCreateComponentModel().barType = typeToSet;
}
} | class class_name[name] begin[{]
method[setProgressBarType, return_type[void], modifier[final public], parameter[type]] begin[{]
local_variable[type[ProgressBarType], currentType]
local_variable[type[ProgressBarType], typeToSet]
if[binary_operation[member[.typeToSet], !=, member[... | Keyword[public] Keyword[final] Keyword[void] identifier[setProgressBarType] operator[SEP] Keyword[final] identifier[ProgressBarType] identifier[type] operator[SEP] {
identifier[ProgressBarType] identifier[currentType] operator[=] identifier[getProgressBarType] operator[SEP] operator[SEP] operator[SEP] identifier... |
public static Object convert(Object maplist, Object model) {
StructureConvert convert = new StructureConvert(model);
return convert.convert(maplist);
} | class class_name[name] begin[{]
method[convert, return_type[type[Object]], modifier[public static], parameter[maplist, model]] begin[{]
local_variable[type[StructureConvert], convert]
return[call[convert.convert, parameter[member[.maplist]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Object] identifier[convert] operator[SEP] identifier[Object] identifier[maplist] , identifier[Object] identifier[model] operator[SEP] {
identifier[StructureConvert] identifier[convert] operator[=] Keyword[new] identifier[StructureConvert] operator[SEP] identifier[model... |
public static boolean hasNavigableWebContent(
Context context, AccessibilityNodeInfoCompat node) {
return (supportsWebActions(node) && isScriptInjectionEnabled(context))
|| hasNativeWebContent(node);
} | class class_name[name] begin[{]
method[hasNavigableWebContent, return_type[type[boolean]], modifier[public static], parameter[context, node]] begin[{]
return[binary_operation[binary_operation[call[.supportsWebActions, parameter[member[.node]]], &&, call[.isScriptInjectionEnabled, parameter[member[.cont... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasNavigableWebContent] operator[SEP] identifier[Context] identifier[context] , identifier[AccessibilityNodeInfoCompat] identifier[node] operator[SEP] {
Keyword[return] operator[SEP] identifier[supportsWebActions] operator[SEP] identifier[node] operato... |
public void normalize() {
for (int i = 0; i < size; i++) {
keys[i] = lowerCase(keys[i]);
}
} | class class_name[name] begin[{]
method[normalize, return_type[void], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[void] identifier[normalize] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[keys] operator[SEP] ... |
public @Nonnull final <T extends Annotation> Optional<AnnotationValue<T>> getAnnotation(String member, Class<T> type) {
return getAnnotations(member, type).stream().findFirst();
} | class class_name[name] begin[{]
method[getAnnotation, return_type[type[Optional]], modifier[final public], parameter[member, type]] begin[{]
return[call[.getAnnotations, parameter[member[.member], member[.type]]]]
end[}]
END[}] | Keyword[public] annotation[@] identifier[Nonnull] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[Annotation] operator[>] identifier[Optional] operator[<] identifier[AnnotationValue] operator[<] identifier[T] operator[>] operator[>] identifier[getAnnotation] operator[SEP] identifier[String] identif... |
public JSONObject simnet(String text1, String text2, HashMap<String, Object> options) {
AipRequest request = new AipRequest();
preOperation(request);
request.addBody("text_1", text1);
request.addBody("text_2", text2);
if (options != null) {
... | class class_name[name] begin[{]
method[simnet, return_type[type[JSONObject]], modifier[public], parameter[text1, text2, options]] begin[{]
local_variable[type[AipRequest], request]
call[.preOperation, parameter[member[.request]]]
call[request.addBody, parameter[literal["... | Keyword[public] identifier[JSONObject] identifier[simnet] operator[SEP] identifier[String] identifier[text1] , identifier[String] identifier[text2] , identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[options] operator[SEP] {
identifier[AipRequest] identifier[reques... |
public static boolean alg_24(int[] blz, int[] number) {
int[] weights = {1, 2, 3, 1, 2, 3, 1, 2, 3};
int crc = 0;
int idx = 0;
switch (number[0]) {
case 3:
case 4:
case 5:
case 6:
number[0] = 0;
break;
... | class class_name[name] begin[{]
method[alg_24, return_type[type[boolean]], modifier[public static], parameter[blz, number]] begin[{]
local_variable[type[int], weights]
local_variable[type[int], crc]
local_variable[type[int], idx]
SwitchStatement(cases=[SwitchStatementCase(case=[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[alg_24] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[blz] , Keyword[int] operator[SEP] operator[SEP] identifier[number] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[weights] operator[=] {
Other[1] ... |
public B preflightResponseHeader(CharSequence name, Iterable<?> values) {
requireNonNull(name, "name");
requireNonNull(values, "values");
checkArgument(!Iterables.isEmpty(values), "values should not be empty.");
final ImmutableList.Builder builder = new Builder();
int i = 0;
... | class class_name[name] begin[{]
method[preflightResponseHeader, return_type[type[B]], modifier[public], parameter[name, values]] begin[{]
call[.requireNonNull, parameter[member[.name], literal["name"]]]
call[.requireNonNull, parameter[member[.values], literal["values"]]]
... | Keyword[public] identifier[B] identifier[preflightResponseHeader] operator[SEP] identifier[CharSequence] identifier[name] , identifier[Iterable] operator[<] operator[?] operator[>] identifier[values] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[name] , literal[String] operator[SEP] opera... |
public EClass getImageResolution() {
if (imageResolutionEClass == null) {
imageResolutionEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(518);
}
return imageResolutionEClass;
} | class class_name[name] begin[{]
method[getImageResolution, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.imageResolutionEClass], ==, literal[null]]] begin[{]
assign[member[.imageResolutionEClass], Cast(expression=MethodInv... | Keyword[public] identifier[EClass] identifier[getImageResolution] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[imageResolutionEClass] operator[==] Other[null] operator[SEP] {
identifier[imageResolutionEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[E... |
public List<EmbedApp> getEmbedApps(String token, String email) throws URISyntaxException, ClientProtocolException, IOException, ParserConfigurationException, SAXException, XPathExpressionException {
cleanError();
URIBuilder url = new URIBuilder(Constants.EMBED_APP_URL);
url.addParameter("token", token);
url.add... | class class_name[name] begin[{]
method[getEmbedApps, return_type[type[List]], modifier[public], parameter[token, email]] begin[{]
call[.cleanError, parameter[]]
local_variable[type[URIBuilder], url]
call[url.addParameter, parameter[literal["token"], member[.token]]]
... | Keyword[public] identifier[List] operator[<] identifier[EmbedApp] operator[>] identifier[getEmbedApps] operator[SEP] identifier[String] identifier[token] , identifier[String] identifier[email] operator[SEP] Keyword[throws] identifier[URISyntaxException] , identifier[ClientProtocolException] , identifier[IOException]... |
public static WebApp get(ServletContext context) {
Object o = context.getAttribute(WebApp.class.getName());
if(o==null) {
synchronized (WebApp.class) {
o = context.getAttribute(WebApp.class.getName());
if(o==null) {
o = new WebApp(context);... | class class_name[name] begin[{]
method[get, return_type[type[WebApp]], modifier[public static], parameter[context]] begin[{]
local_variable[type[Object], o]
if[binary_operation[member[.o], ==, literal[null]]] begin[{]
SYNCHRONIZED[ClassReference(postfix_operators... | Keyword[public] Keyword[static] identifier[WebApp] identifier[get] operator[SEP] identifier[ServletContext] identifier[context] operator[SEP] {
identifier[Object] identifier[o] operator[=] identifier[context] operator[SEP] identifier[getAttribute] operator[SEP] identifier[WebApp] operator[SEP] Keyword[class] ope... |
private void obtainDialogPadding(@NonNull final TypedArray typedArray) {
int defaultLeftPadding =
getContext().getResources().getDimensionPixelSize(R.dimen.dialog_left_padding);
int defaultTopPadding =
getContext().getResources().getDimensionPixelSize(R.dimen.dialog_top_p... | class class_name[name] begin[{]
method[obtainDialogPadding, return_type[void], modifier[private], parameter[typedArray]] begin[{]
local_variable[type[int], defaultLeftPadding]
local_variable[type[int], defaultTopPadding]
local_variable[type[int], defaultRightPadding]
local_varia... | Keyword[private] Keyword[void] identifier[obtainDialogPadding] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[TypedArray] identifier[typedArray] operator[SEP] {
Keyword[int] identifier[defaultLeftPadding] operator[=] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] iden... |
public static InputStream getClassAsStream(final String className, final ClassLoader classLoader) throws IOException {
return getResourceAsStream(ClassUtil.convertClassNameToFileName(className), classLoader);
} | class class_name[name] begin[{]
method[getClassAsStream, return_type[type[InputStream]], modifier[public static], parameter[className, classLoader]] begin[{]
return[call[.getResourceAsStream, parameter[call[ClassUtil.convertClassNameToFileName, parameter[member[.className]]], member[.classLoader]]]]
... | Keyword[public] Keyword[static] identifier[InputStream] identifier[getClassAsStream] operator[SEP] Keyword[final] identifier[String] identifier[className] , Keyword[final] identifier[ClassLoader] identifier[classLoader] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[getResour... |
public String readProperty(String propertyName) {
String propVal = null;
try {
propVal = getCms().readPropertyObject(getParamResource(), propertyName, false).getValue();
} catch (CmsException e) {
if (LOG.isInfoEnabled()) {
LOG.info(e.getLocalizedMessage(... | class class_name[name] begin[{]
method[readProperty, return_type[type[String]], modifier[public], parameter[propertyName]] begin[{]
local_variable[type[String], propVal]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=propVal, postfix_operators=[... | Keyword[public] identifier[String] identifier[readProperty] operator[SEP] identifier[String] identifier[propertyName] operator[SEP] {
identifier[String] identifier[propVal] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[propVal] operator[=] identifier[getCms] operator[SEP] operator[SE... |
public Observable<Page<JobResourceInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<JobResourceInner>>, Page<JobResourceInner>>() {
@Override
public Page<JobResourceInner> call(... | class class_name[name] begin[{]
method[listNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{]
return[call[.listNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[JobResourceInner] operator[>] operator[>] identifier[listNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] {
Keyword[return] identifier[listNextWithServiceResponseAsync] oper... |
public HistoricalData getHistoricalData(Date from, Date to, String token, String interval, boolean continuous) throws KiteException, IOException, JSONException {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Map<String, Object> params = new HashMap<>();
params.put("from"... | class class_name[name] begin[{]
method[getHistoricalData, return_type[type[HistoricalData]], modifier[public], parameter[from, to, token, interval, continuous]] begin[{]
local_variable[type[SimpleDateFormat], format]
local_variable[type[Map], params]
call[params.put, parameter[l... | Keyword[public] identifier[HistoricalData] identifier[getHistoricalData] operator[SEP] identifier[Date] identifier[from] , identifier[Date] identifier[to] , identifier[String] identifier[token] , identifier[String] identifier[interval] , Keyword[boolean] identifier[continuous] operator[SEP] Keyword[throws] identifi... |
@Override
public void indicateProgress(int number, int total) {
progressIndicatorActive = true;
String currMsg = lastMessage;
try {
updateStatus(currMsg + ' ' + number + " of " + total);
} finally {
lastMessage = currMsg;
}
} | class class_name[name] begin[{]
method[indicateProgress, return_type[void], modifier[public], parameter[number, total]] begin[{]
assign[member[.progressIndicatorActive], literal[true]]
local_variable[type[String], currMsg]
TryStatement(block=[StatementExpression(expression=Metho... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[indicateProgress] operator[SEP] Keyword[int] identifier[number] , Keyword[int] identifier[total] operator[SEP] {
identifier[progressIndicatorActive] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[currMsg] opera... |
public boolean touches(IndexRange other) {
checkArgNotNull(other, "other");
return other.end == start || end == other.start;
} | class class_name[name] begin[{]
method[touches, return_type[type[boolean]], modifier[public], parameter[other]] begin[{]
call[.checkArgNotNull, parameter[member[.other], literal["other"]]]
return[binary_operation[binary_operation[member[other.end], ==, member[.start]], ||, binary_operat... | Keyword[public] Keyword[boolean] identifier[touches] operator[SEP] identifier[IndexRange] identifier[other] operator[SEP] {
identifier[checkArgNotNull] operator[SEP] identifier[other] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[other] operator[SEP] identifier[end] operator[==] ident... |
private static Schema getSchema(String schemaPublicId)
throws SAXException {
Schema schema = schemaCache.get(schemaPublicId);
if (schema == null) {
synchronized (schemaCache) {
schema = schemaCache.get(schemaPublicId);
if (schema == null) {
... | class class_name[name] begin[{]
method[getSchema, return_type[type[Schema]], modifier[private static], parameter[schemaPublicId]] begin[{]
local_variable[type[Schema], schema]
if[binary_operation[member[.schema], ==, literal[null]]] begin[{]
SYNCHRONIZED[member[.... | Keyword[private] Keyword[static] identifier[Schema] identifier[getSchema] operator[SEP] identifier[String] identifier[schemaPublicId] operator[SEP] Keyword[throws] identifier[SAXException] {
identifier[Schema] identifier[schema] operator[=] identifier[schemaCache] operator[SEP] identifier[get] operator[SEP] iden... |
@Override
public DeleteHsmResult deleteHsm(DeleteHsmRequest request) {
request = beforeClientExecution(request);
return executeDeleteHsm(request);
} | class class_name[name] begin[{]
method[deleteHsm, return_type[type[DeleteHsmResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeleteHsm, parameter[member[.request]]]]
end[}... | annotation[@] identifier[Override] Keyword[public] identifier[DeleteHsmResult] identifier[deleteHsm] operator[SEP] identifier[DeleteHsmRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keywo... |
public List<SecurityRoleType<WebAppDescriptor>> getAllSecurityRole()
{
List<SecurityRoleType<WebAppDescriptor>> list = new ArrayList<SecurityRoleType<WebAppDescriptor>>();
List<Node> nodeList = model.get("security-role");
for(Node node: nodeList)
{
SecurityRoleType<WebAppDescriptor> ... | class class_name[name] begin[{]
method[getAllSecurityRole, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], list]
local_variable[type[List], nodeList]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations... | Keyword[public] identifier[List] operator[<] identifier[SecurityRoleType] operator[<] identifier[WebAppDescriptor] operator[>] operator[>] identifier[getAllSecurityRole] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[SecurityRoleType] operator[<] identifier[WebAppDescriptor] operator[>] op... |
private void constructPropertiesString(String propertyName, Object property) throws IOException {
getWriter().write(propertyName + String.valueOf(property) + "\n");
} | class class_name[name] begin[{]
method[constructPropertiesString, return_type[void], modifier[private], parameter[propertyName, property]] begin[{]
call[.getWriter, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[constructPropertiesString] operator[SEP] identifier[String] identifier[propertyName] , identifier[Object] identifier[property] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] identifier[write] opera... |
protected LightweightTypeReference getSarlCapacityFieldType(IResolvedTypes resolvedTypes, JvmField field) {
// For capacity call redirection
LightweightTypeReference fieldType = resolvedTypes.getActualType(field);
final JvmAnnotationReference capacityAnnotation = this.annotationLookup.findAnnotation(field,
Im... | class class_name[name] begin[{]
method[getSarlCapacityFieldType, return_type[type[LightweightTypeReference]], modifier[protected], parameter[resolvedTypes, field]] begin[{]
local_variable[type[LightweightTypeReference], fieldType]
local_variable[type[JvmAnnotationReference], capacityAnnotation]... | Keyword[protected] identifier[LightweightTypeReference] identifier[getSarlCapacityFieldType] operator[SEP] identifier[IResolvedTypes] identifier[resolvedTypes] , identifier[JvmField] identifier[field] operator[SEP] {
identifier[LightweightTypeReference] identifier[fieldType] operator[=] identifier[resolvedTypes... |
public Observable<ServiceResponse<List<EntityExtractor>>> listEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is re... | class class_name[name] begin[{]
method[listEntitiesWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, listEntitiesOptionalParameter]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.endpoint, parameter[]]], ==, literal[null]]] b... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[EntityExtractor] operator[>] operator[>] operator[>] identifier[listEntitiesWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versi... |
public void writeEndCode(boolean bJavaFile)
{
m_StreamOut.setTabs(-1);
if (bJavaFile)
m_StreamOut.writeit("\n}");
m_StreamOut.writeit("\n");
m_StreamOut.free();
m_StreamOut = null;
m_IncludeNameList.free();
m_IncludeNameList = null;
} | class class_name[name] begin[{]
method[writeEndCode, return_type[void], modifier[public], parameter[bJavaFile]] begin[{]
call[m_StreamOut.setTabs, parameter[literal[1]]]
if[member[.bJavaFile]] begin[{]
call[m_StreamOut.writeit, parameter[literal["\n}"]]]
else... | Keyword[public] Keyword[void] identifier[writeEndCode] operator[SEP] Keyword[boolean] identifier[bJavaFile] operator[SEP] {
identifier[m_StreamOut] operator[SEP] identifier[setTabs] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bJavaFile] operator[SEP] identi... |
public static List<AvPair> decode ( byte[] data ) throws CIFSException {
List<AvPair> pairs = new LinkedList<>();
int pos = 0;
boolean foundEnd = false;
while ( pos + 4 <= data.length ) {
int avId = SMBUtil.readInt2(data, pos);
int avLen = SMBUtil.readInt2(data, p... | class class_name[name] begin[{]
method[decode, return_type[type[List]], modifier[public static], parameter[data]] begin[{]
local_variable[type[List], pairs]
local_variable[type[int], pos]
local_variable[type[boolean], foundEnd]
while[binary_operation[binary_operation[mem... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[AvPair] operator[>] identifier[decode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] Keyword[throws] identifier[CIFSException] {
identifier[List] operator[<] identifier[AvPair] operator[>] identifier[... |
public static FormElement generateForm(I_CmsEditableData editableData, boolean isNew, String target, String mode) {
// create a form to submit a post request to the editor JSP
Map<String, String> formValues = new HashMap<String, String>();
if (editableData.getSitePath() != null) {
f... | class class_name[name] begin[{]
method[generateForm, return_type[type[FormElement]], modifier[public static], parameter[editableData, isNew, target, mode]] begin[{]
local_variable[type[Map], formValues]
if[binary_operation[call[editableData.getSitePath, parameter[]], !=, literal[null]]]... | Keyword[public] Keyword[static] identifier[FormElement] identifier[generateForm] operator[SEP] identifier[I_CmsEditableData] identifier[editableData] , Keyword[boolean] identifier[isNew] , identifier[String] identifier[target] , identifier[String] identifier[mode] operator[SEP] {
identifier[Map] operator[<] i... |
public IntersectionClassType makeIntersectionType(List<Type> bounds, boolean allInterfaces) {
Assert.check(bounds.nonEmpty());
Type firstExplicitBound = bounds.head;
if (allInterfaces) {
bounds = bounds.prepend(syms.objectType);
}
ClassSymbol bc =
new Clas... | class class_name[name] begin[{]
method[makeIntersectionType, return_type[type[IntersectionClassType]], modifier[public], parameter[bounds, allInterfaces]] begin[{]
call[Assert.check, parameter[call[bounds.nonEmpty, parameter[]]]]
local_variable[type[Type], firstExplicitBound]
... | Keyword[public] identifier[IntersectionClassType] identifier[makeIntersectionType] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[bounds] , Keyword[boolean] identifier[allInterfaces] operator[SEP] {
identifier[Assert] operator[SEP] identifier[check] operator[SEP] identifier[b... |
public static JinxConstants.GroupPrivacy privacyIdToGroupPrivacyEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.GroupPrivacy privacy;
switch (id) {
case 1:
privacy = JinxConstants.GroupPrivacy.group_private;
break;... | class class_name[name] begin[{]
method[privacyIdToGroupPrivacyEnum, return_type[type[JinxConstants]], modifier[public static], parameter[id]] begin[{]
if[binary_operation[member[.id], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[JinxConstants] operator[SEP] identifier[GroupPrivacy] identifier[privacyIdToGroupPrivacyEnum] operator[SEP] identifier[Integer] identifier[id] operator[SEP] {
Keyword[if] operator[SEP] identifier[id] operator[==] Other[null] operator[SEP] {
Keyword[return] Ot... |
public static Double negativeDouble(String value) {
Double doubleValue = Validate.isDouble(value);
negative(doubleValue);
return doubleValue;
} | class class_name[name] begin[{]
method[negativeDouble, return_type[type[Double]], modifier[public static], parameter[value]] begin[{]
local_variable[type[Double], doubleValue]
call[.negative, parameter[member[.doubleValue]]]
return[member[.doubleValue]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Double] identifier[negativeDouble] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[Double] identifier[doubleValue] operator[=] identifier[Validate] operator[SEP] identifier[isDouble] operator[SEP] identifier[value] operator[SEP] operator[SE... |
private void initializePrefixes()
{
if (namespaceMap == null) {
// TODO use logger
System.err
.println("Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia language version. DISABLING FILTER.");
}
else {
prefixesToAllow = new HashSet<String>();
pr... | class class_name[name] begin[{]
method[initializePrefixes, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.namespaceMap], ==, literal[null]]] begin[{]
call[System.err.println, parameter[literal["Cannot use whitespace filter without... | Keyword[private] Keyword[void] identifier[initializePrefixes] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[namespaceMap] operator[==] Other[null] operator[SEP] {
identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] opera... |
public static List<String> childrenText(Element parentElement, String tagname) {
final Iterable<Element> children = children(parentElement, tagname);
List<String> result = new ArrayList<String>();
for (Element element : children) {
result.add(elementText(element));
}
... | class class_name[name] begin[{]
method[childrenText, return_type[type[List]], modifier[public static], parameter[parentElement, tagname]] begin[{]
local_variable[type[Iterable], children]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[Stateme... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[childrenText] operator[SEP] identifier[Element] identifier[parentElement] , identifier[String] identifier[tagname] operator[SEP] {
Keyword[final] identifier[Iterable] operator[<] identifier[Element] operator[>... |
public static boolean reflectionIsEmpty(final Object obj, final String... excludedFields) {
return reflectionIsEmpty(obj, IsEmptyConfig.create(), Arrays.asList(excludedFields));
} | class class_name[name] begin[{]
method[reflectionIsEmpty, return_type[type[boolean]], modifier[public static], parameter[obj, excludedFields]] begin[{]
return[call[.reflectionIsEmpty, parameter[member[.obj], call[IsEmptyConfig.create, parameter[]], call[Arrays.asList, parameter[member[.excludedFields]]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[reflectionIsEmpty] operator[SEP] Keyword[final] identifier[Object] identifier[obj] , Keyword[final] identifier[String] operator[...] identifier[excludedFields] operator[SEP] {
Keyword[return] identifier[reflectionIsEmpty] operator[SEP] identifier[obj] ... |
public Object invokeSetter(final Object instance, final Object value)
throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
final Class<?> valueClass = value.getClass();
final Method method = getInvokableMethodForClass(valueClass);
if (method == null) {... | class class_name[name] begin[{]
method[invokeSetter, return_type[type[Object]], modifier[public], parameter[instance, value]] begin[{]
local_variable[type[Class], valueClass]
local_variable[type[Method], method]
if[binary_operation[member[.method], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Object] identifier[invokeSetter] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[IllegalAccessException] , identifier[InvocationTargetE... |
@Override
public ExplodedPlugin explode(PluginInfo pluginInfo) {
File toDir = new File(fs.getDeployedPluginsDir(), pluginInfo.getKey());
try {
forceMkdir(toDir);
org.sonar.core.util.FileUtils.cleanDirectory(toDir);
File jarSource = pluginInfo.getNonNullJarFile();
File jarTarget = new ... | class class_name[name] begin[{]
method[explode, return_type[type[ExplodedPlugin]], modifier[public], parameter[pluginInfo]] begin[{]
local_variable[type[File], toDir]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=toDir, postfix_operators=[... | annotation[@] identifier[Override] Keyword[public] identifier[ExplodedPlugin] identifier[explode] operator[SEP] identifier[PluginInfo] identifier[pluginInfo] operator[SEP] {
identifier[File] identifier[toDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[fs] operator[SEP] identifier[getDeplo... |
public <C> C id(final Class<C> configInterface, final Optional<String> scopeNameOpt)
{
return MethodIdProxyFactory.getProxy(configInterface, scopeNameOpt);
} | class class_name[name] begin[{]
method[id, return_type[type[C]], modifier[public], parameter[configInterface, scopeNameOpt]] begin[{]
return[call[MethodIdProxyFactory.getProxy, parameter[member[.configInterface], member[.scopeNameOpt]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[C] operator[>] identifier[C] identifier[id] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[C] operator[>] identifier[configInterface] , Keyword[final] identifier[Optional] operator[<] identifier[String] operator[>] identifier[scopeNameOpt] operator[SEP] {
... |
public SparqlResult runQuery(String endpoint, String query) {
return SparqlClient.execute(endpoint, query, username, password);
} | class class_name[name] begin[{]
method[runQuery, return_type[type[SparqlResult]], modifier[public], parameter[endpoint, query]] begin[{]
return[call[SparqlClient.execute, parameter[member[.endpoint], member[.query], member[.username], member[.password]]]]
end[}]
END[}] | Keyword[public] identifier[SparqlResult] identifier[runQuery] operator[SEP] identifier[String] identifier[endpoint] , identifier[String] identifier[query] operator[SEP] {
Keyword[return] identifier[SparqlClient] operator[SEP] identifier[execute] operator[SEP] identifier[endpoint] , identifier[query] , identif... |
private boolean validPath(final Path path) {
Path relativePath = relativePath(path);
if (relativePath.equals(path)) {
return true;
}
String d = relativePath.getName(0).toString().toLowerCase();
// loadPathの直下が現在のdialect以外と一致する場合は無効なパスと判定する
return !dialects.contains(d) || this.dialect.getDatabaseType().e... | class class_name[name] begin[{]
method[validPath, return_type[type[boolean]], modifier[private], parameter[path]] begin[{]
local_variable[type[Path], relativePath]
if[call[relativePath.equals, parameter[member[.path]]]] begin[{]
return[literal[true]]
else begin[{]
No... | Keyword[private] Keyword[boolean] identifier[validPath] operator[SEP] Keyword[final] identifier[Path] identifier[path] operator[SEP] {
identifier[Path] identifier[relativePath] operator[=] identifier[relativePath] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rel... |
public static String jsonJoin(String[] array) {
int arraySize = array.length;
int bufSize = arraySize * (array[0].length() + 3);
StringBuilder buf = new StringBuilder(bufSize);
for (int i = 0; i < arraySize; i++) {
if (i > 0) {
buf.append(',');
}
... | class class_name[name] begin[{]
method[jsonJoin, return_type[type[String]], modifier[public static], parameter[array]] begin[{]
local_variable[type[int], arraySize]
local_variable[type[int], bufSize]
local_variable[type[StringBuilder], buf]
ForStatement(body=BlockStatement(label... | Keyword[public] Keyword[static] identifier[String] identifier[jsonJoin] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[array] operator[SEP] {
Keyword[int] identifier[arraySize] operator[=] identifier[array] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[bufSize] o... |
protected boolean handleUnmatchedRoute(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse, HttpMethod httpMethod, String requestPath) {
// If this resource matches a different method[s], error out specially
List<HttpMethod> otherHttpMethods = new ArrayList<>(HttpMethod.values()... | class class_name[name] begin[{]
method[handleUnmatchedRoute, return_type[type[boolean]], modifier[protected], parameter[httpServletRequest, httpServletResponse, httpMethod, requestPath]] begin[{]
local_variable[type[List], otherHttpMethods]
ForStatement(body=IfStatement(condition=BinaryOperatio... | Keyword[protected] Keyword[boolean] identifier[handleUnmatchedRoute] operator[SEP] identifier[HttpServletRequest] identifier[httpServletRequest] , identifier[HttpServletResponse] identifier[httpServletResponse] , identifier[HttpMethod] identifier[httpMethod] , identifier[String] identifier[requestPath] operator[SEP]... |
public static String get(String key, Object... args) {
return get(BUNDLE_NAME, key, args);
} | class class_name[name] begin[{]
method[get, return_type[type[String]], modifier[public static], parameter[key, args]] begin[{]
return[call[.get, parameter[member[.BUNDLE_NAME], member[.key], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[key] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[get] operator[SEP] identifier[BUNDLE_NAME] , identifier[key] , identifier[args] operator[SEP] opera... |
public String obtainLoopbackIp4Address() {
final NetworkInterface networkInterface = getLoopBackAndIp4Only();
if (networkInterface != null) {
return networkInterface.getIp4LoopbackOnly().getHostName();
}
final String ipOfIp4LoopBack = getIpOfLoopBackIp4();
if (ipOfIp4LoopBack != null) {
... | class class_name[name] begin[{]
method[obtainLoopbackIp4Address, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[NetworkInterface], networkInterface]
if[binary_operation[member[.networkInterface], !=, literal[null]]] begin[{]
return[cal... | Keyword[public] identifier[String] identifier[obtainLoopbackIp4Address] operator[SEP] operator[SEP] {
Keyword[final] identifier[NetworkInterface] identifier[networkInterface] operator[=] identifier[getLoopBackAndIp4Only] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[networkInterf... |
public static boolean startsWith(String string, String prefix) {
return string.regionMatches(true, 0, prefix, 0, prefix.length());
} | class class_name[name] begin[{]
method[startsWith, return_type[type[boolean]], modifier[public static], parameter[string, prefix]] begin[{]
return[call[string.regionMatches, parameter[literal[true], literal[0], member[.prefix], literal[0], call[prefix.length, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[startsWith] operator[SEP] identifier[String] identifier[string] , identifier[String] identifier[prefix] operator[SEP] {
Keyword[return] identifier[string] operator[SEP] identifier[regionMatches] operator[SEP] literal[boolean] , Other[0] , identifier[... |
public Observable<Page<AppServiceEnvironmentResourceInner>> listByResourceGroupAsync(final String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
.map(new Func1<ServiceResponse<Page<AppServiceEnvironmentResourceInner>>, Page<AppServiceEnvironmentResourceInn... | class class_name[name] begin[{]
method[listByResourceGroupAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName]] begin[{]
return[call[.listByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[AppServiceEnvironmentResourceInner] operator[>] operator[>] identifier[listByResourceGroupAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] operator[SEP] {
Keyword[return] identifier[list... |
protected Object getValue(Object value, ComparisonType type) {
return type == ComparisonType.NODE_TYPE ? nodeType((Short) value) : value;
} | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[protected], parameter[value, type]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Membe... | Keyword[protected] identifier[Object] identifier[getValue] operator[SEP] identifier[Object] identifier[value] , identifier[ComparisonType] identifier[type] operator[SEP] {
Keyword[return] identifier[type] operator[==] identifier[ComparisonType] operator[SEP] identifier[NODE_TYPE] operator[?] identifier[nodeType... |
public static DataSource initializeTxSimple(DataSource dataSource) {
TxTransactionManager txManager = new TxTransactionManager(dataSource);
return initializeTxCustom(txManager.getTxDataSource(), txManager, txManager);
} | class class_name[name] begin[{]
method[initializeTxSimple, return_type[type[DataSource]], modifier[public static], parameter[dataSource]] begin[{]
local_variable[type[TxTransactionManager], txManager]
return[call[.initializeTxCustom, parameter[call[txManager.getTxDataSource, parameter[]], membe... | Keyword[public] Keyword[static] identifier[DataSource] identifier[initializeTxSimple] operator[SEP] identifier[DataSource] identifier[dataSource] operator[SEP] {
identifier[TxTransactionManager] identifier[txManager] operator[=] Keyword[new] identifier[TxTransactionManager] operator[SEP] identifier[dataSource] o... |
private void computeTags() {
if (tag_uids != null && aggregated_tag_uids != null) {
return;
}
if (spans.isEmpty()) {
tag_uids = new ByteMap<byte[]>();
aggregated_tag_uids = new HashSet<byte[]>();
return;
}
// local tag uids
final ByteMap<byte[]> tag_set = new ByteMap... | class class_name[name] begin[{]
method[computeTags, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.tag_uids], !=, literal[null]], &&, binary_operation[member[.aggregated_tag_uids], !=, literal[null]]]] begin[{]
return[None]
... | Keyword[private] Keyword[void] identifier[computeTags] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tag_uids] operator[!=] Other[null] operator[&&] identifier[aggregated_tag_uids] operator[!=] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] o... |
public void floodFill(int xx, int yy, Rectangle clip, int replacement)
{
floodFill(xx, yy, clip, (c)->c!=replacement, replacement);
} | class class_name[name] begin[{]
method[floodFill, return_type[void], modifier[public], parameter[xx, yy, clip, replacement]] begin[{]
call[.floodFill, parameter[member[.xx], member[.yy], member[.clip], LambdaExpression(body=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[]... | Keyword[public] Keyword[void] identifier[floodFill] operator[SEP] Keyword[int] identifier[xx] , Keyword[int] identifier[yy] , identifier[Rectangle] identifier[clip] , Keyword[int] identifier[replacement] operator[SEP] {
identifier[floodFill] operator[SEP] identifier[xx] , identifier[yy] , identifier[clip] ,... |
@Conditioned
@Et("Je prends une capture d'écran[\\.|\\?]")
@And("I take a screenshot[\\.|\\?]")
public void takeScreenshot(List<GherkinStepCondition> conditions) {
logger.debug("I take a screenshot for [{}] scenario.", Context.getCurrentScenario());
screenService.takeScreenshot(Context.getCu... | class class_name[name] begin[{]
method[takeScreenshot, return_type[void], modifier[public], parameter[conditions]] begin[{]
call[logger.debug, parameter[literal["I take a screenshot for [{}] scenario."], call[Context.getCurrentScenario, parameter[]]]]
call[screenService.takeScre... | annotation[@] identifier[Conditioned] annotation[@] identifier[Et] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[And] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[takeScreenshot] operator[SEP] identifier[List] operator[<] identifier[GherkinStepCondition] op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.