code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
protected double distance(DBIDRef a, DBIDRef b) {
++distComputations;
return distanceQuery.distance(a, b);
} | class class_name[name] begin[{]
method[distance, return_type[type[double]], modifier[protected], parameter[a, b]] begin[{]
member[.distComputations]
return[call[distanceQuery.distance, parameter[member[.a], member[.b]]]]
end[}]
END[}] | Keyword[protected] Keyword[double] identifier[distance] operator[SEP] identifier[DBIDRef] identifier[a] , identifier[DBIDRef] identifier[b] operator[SEP] {
operator[++] identifier[distComputations] operator[SEP] Keyword[return] identifier[distanceQuery] operator[SEP] identifier[distance] operator[SEP] identifie... |
private void finishValue()
{
final ContainerInfo current = currentContainer();
if (current != null && current.type == ContainerType.ANNOTATION)
{
// close out and patch the length
popContainer();
}
hasWrittenValuesSinceFinished = true;
hasWritt... | class class_name[name] begin[{]
method[finishValue, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[ContainerInfo], current]
if[binary_operation[binary_operation[member[.current], !=, literal[null]], &&, binary_operation[member[current.type], ==, member[C... | Keyword[private] Keyword[void] identifier[finishValue] operator[SEP] operator[SEP] {
Keyword[final] identifier[ContainerInfo] identifier[current] operator[=] identifier[currentContainer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[current] operator[!=] Other[null] operator[&&] ... |
protected boolean isListsStenoEvent(@Nullable final Marker marker) {
return marker != null && marker.contains(StenoMarker.LISTS_MARKER);
} | class class_name[name] begin[{]
method[isListsStenoEvent, return_type[type[boolean]], modifier[protected], parameter[marker]] begin[{]
return[binary_operation[binary_operation[member[.marker], !=, literal[null]], &&, call[marker.contains, parameter[member[StenoMarker.LISTS_MARKER]]]]]
end[}]
END[}] | Keyword[protected] Keyword[boolean] identifier[isListsStenoEvent] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[Marker] identifier[marker] operator[SEP] {
Keyword[return] identifier[marker] operator[!=] Other[null] operator[&&] identifier[marker] operator[SEP] identifier[contains] op... |
@Deprecated
public static List<Footer> readFooters(Configuration configuration, FileStatus pathStatus, boolean skipRowGroups) throws IOException {
List<FileStatus> files = listFiles(configuration, pathStatus);
return readAllFootersInParallelUsingSummaryFiles(configuration, files, skipRowGroups);
} | class class_name[name] begin[{]
method[readFooters, return_type[type[List]], modifier[public static], parameter[configuration, pathStatus, skipRowGroups]] begin[{]
local_variable[type[List], files]
return[call[.readAllFootersInParallelUsingSummaryFiles, parameter[member[.configuration], member[... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Footer] operator[>] identifier[readFooters] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[FileStatus] identifier[pathStatus] , Keyword[boolean] identifier[skipRowGroups] operat... |
public Observable<Page<RunCommandDocumentBaseInner>> listAsync(final String location) {
return listWithServiceResponseAsync(location)
.map(new Func1<ServiceResponse<Page<RunCommandDocumentBaseInner>>, Page<RunCommandDocumentBaseInner>>() {
@Override
public Page<RunCom... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[location]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.location]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[RunCommandDocumentBaseInner] operator[>] operator[>] identifier[listAsync] operator[SEP] Keyword[final] identifier[String] identifier[location] operator[SEP] {
Keyword[return] identifier[listWithServiceResponseAsync] opera... |
private JButton getBtnCancel() {
if (btnCancel == null) {
btnCancel = new JButton();
btnCancel.setText(Constant.messages.getString("edit.find.button.cancel"));
btnCancel.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e... | class class_name[name] begin[{]
method[getBtnCancel, return_type[type[JButton]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.btnCancel], ==, literal[null]]] begin[{]
assign[member[.btnCancel], ClassCreator(arguments=[], body=None, constructor_typ... | Keyword[private] identifier[JButton] identifier[getBtnCancel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[btnCancel] operator[==] Other[null] operator[SEP] {
identifier[btnCancel] operator[=] Keyword[new] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[b... |
public void assertEqual(Description description, Float actual, Float expected, Offset<Float> offset) {
checkOffsetIsNotNull(offset);
checkNumberIsNotNull(expected);
assertNotNull(description, actual);
if (!isEqualTo(actual, expected, offset)) {
throw failures.failure(description,
s... | class class_name[name] begin[{]
method[assertEqual, return_type[void], modifier[public], parameter[description, actual, expected, offset]] begin[{]
call[.checkOffsetIsNotNull, parameter[member[.offset]]]
call[.checkNumberIsNotNull, parameter[member[.expected]]]
c... | Keyword[public] Keyword[void] identifier[assertEqual] operator[SEP] identifier[Description] identifier[description] , identifier[Float] identifier[actual] , identifier[Float] identifier[expected] , identifier[Offset] operator[<] identifier[Float] operator[>] identifier[offset] operator[SEP] {
identifier[check... |
@Override
public Mono<Void> deleteById(String id) {
return findSession(id)
.flatMap(document -> this.mongoOperations.remove(document, this.collectionName).then(Mono.just(document)))
.map(document -> convertToSession(this.mongoSessionConverter, document))
.doOnSuccess(mongoSession -> publishEvent(new Ses... | class class_name[name] begin[{]
method[deleteById, return_type[type[Mono]], modifier[public], parameter[id]] begin[{]
return[call[.findSession, parameter[member[.id]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[Void] operator[>] identifier[deleteById] operator[SEP] identifier[String] identifier[id] operator[SEP] {
Keyword[return] identifier[findSession] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[flatMap] ... |
public Observable<AvailableProvidersListInner> beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) {
return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceR... | class class_name[name] begin[{]
method[beginListAvailableProvidersAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, networkWatcherName, parameters]] begin[{]
return[call[.beginListAvailableProvidersWithServiceResponseAsync, parameter[member[.resourceGroupName], member... | Keyword[public] identifier[Observable] operator[<] identifier[AvailableProvidersListInner] operator[>] identifier[beginListAvailableProvidersAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[AvailableProvidersListParameters] identifi... |
public static Supplier<Type> receiverType() {
return new Supplier<Type>() {
@Override
public Type get(VisitorState state) {
MethodInvocationTree methodInvocation = (MethodInvocationTree) state.getPath().getLeaf();
return ASTHelpers.getReceiverType(methodInvocation.getMethodSelect());
... | class class_name[name] begin[{]
method[receiverType, return_type[type[Supplier]], modifier[public static], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[V... | Keyword[public] Keyword[static] identifier[Supplier] operator[<] identifier[Type] operator[>] identifier[receiverType] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Supplier] operator[<] identifier[Type] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Overrid... |
public void setValue (int value)
{
_slider.setValue(value);
_value.setText(Integer.toString(value));
} | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[value]] begin[{]
call[_slider.setValue, parameter[member[.value]]]
call[_value.setText, parameter[call[Integer.toString, parameter[member[.value]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setValue] operator[SEP] Keyword[int] identifier[value] operator[SEP] {
identifier[_slider] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[_value] operator[SEP] identifier[setText] operator[SEP] identifier[Integer]... |
private void initHasMasterMode() throws CmsException {
if (hasDescriptor()
&& m_cms.hasPermissions(m_desc, CmsPermissionSet.ACCESS_WRITE, false, CmsResourceFilter.ALL)) {
m_hasMasterMode = true;
} else {
m_hasMasterMode = false;
}
} | class class_name[name] begin[{]
method[initHasMasterMode, return_type[void], modifier[private], parameter[]] begin[{]
if[binary_operation[call[.hasDescriptor, parameter[]], &&, call[m_cms.hasPermissions, parameter[member[.m_desc], member[CmsPermissionSet.ACCESS_WRITE], literal[false], member[Cm... | Keyword[private] Keyword[void] identifier[initHasMasterMode] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] {
Keyword[if] operator[SEP] identifier[hasDescriptor] operator[SEP] operator[SEP] operator[&&] identifier[m_cms] operator[SEP] identifier[hasPermissions] operator[SEP] identifier[m_de... |
private static AdGroup createAdGroup(
AdWordsServicesInterface adWordsServices, AdWordsSession session, Campaign campaign)
throws ApiException, RemoteException {
// Get the AdGroupService.
AdGroupServiceInterface adGroupService =
adWordsServices.get(session, AdGroupServiceInterface.class);
... | class class_name[name] begin[{]
method[createAdGroup, return_type[type[AdGroup]], modifier[private static], parameter[adWordsServices, session, campaign]] begin[{]
local_variable[type[AdGroupServiceInterface], adGroupService]
local_variable[type[AdGroup], adGroup]
call[adGroup.s... | Keyword[private] Keyword[static] identifier[AdGroup] identifier[createAdGroup] operator[SEP] identifier[AdWordsServicesInterface] identifier[adWordsServices] , identifier[AdWordsSession] identifier[session] , identifier[Campaign] identifier[campaign] operator[SEP] Keyword[throws] identifier[ApiException] , identifie... |
public static boolean transactionIsTerminated(TerminationGuard db) {
try {
db.check();
return false;
} catch (TransactionGuardException | TransactionTerminatedException | NotInTransactionException tge) {
return true;
}
} | class class_name[name] begin[{]
method[transactionIsTerminated, return_type[type[boolean]], modifier[public static], parameter[db]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=check, postfix_operators=[], prefix_operators=[], qualifier=db, selectors... | Keyword[public] Keyword[static] Keyword[boolean] identifier[transactionIsTerminated] operator[SEP] identifier[TerminationGuard] identifier[db] operator[SEP] {
Keyword[try] {
identifier[db] operator[SEP] identifier[check] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operat... |
public boolean addVerb(String action, Date dateStart, Date dateEnd, String[] description, String comment)
{
Map<String, Object> container = new HashMap<String, Object>();
if (action != null)
{
container.put("action", action);
}
else
{
... | class class_name[name] begin[{]
method[addVerb, return_type[type[boolean]], modifier[public], parameter[action, dateStart, dateEnd, description, comment]] begin[{]
local_variable[type[Map], container]
if[binary_operation[member[.action], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[boolean] identifier[addVerb] operator[SEP] identifier[String] identifier[action] , identifier[Date] identifier[dateStart] , identifier[Date] identifier[dateEnd] , identifier[String] operator[SEP] operator[SEP] identifier[description] , identifier[String] identifier[comment] operator[SEP] {
... |
@Override
public void perform() throws PortalException {
// push the change into the PLF
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) {
// we are dealing with an incorporated node, so get a plf ghost
// node, set its attribute, then add a directive indicating the... | class class_name[name] begin[{]
method[perform, return_type[void], modifier[public], parameter[]] begin[{]
if[call[nodeId.startsWith, parameter[member[Constants.FRAGMENT_ID_USER_PREFIX]]]] begin[{]
local_variable[type[Element], plfNode]
call[plfNode.setAttrib... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[perform] operator[SEP] operator[SEP] Keyword[throws] identifier[PortalException] {
Keyword[if] operator[SEP] identifier[nodeId] operator[SEP] identifier[startsWith] operator[SEP] identifier[Constants] operator[SEP] identifier[FRAGMENT_ID... |
public static boolean verify(EventModel eventModel, Capabilities capabilities, Identifiable player, List<Identifiable> activators) {
if (!eventModel.containsDescriptor(StartMusicRequest.ID))
return false;
if (!capabilities.handlesPlayRequestFromOutside()) {
if (activators.stream(... | class class_name[name] begin[{]
method[verify, return_type[type[boolean]], modifier[public static], parameter[eventModel, capabilities, player, activators]] begin[{]
if[call[eventModel.containsDescriptor, parameter[member[StartMusicRequest.ID]]]] begin[{]
return[literal[false]]
else beg... | Keyword[public] Keyword[static] Keyword[boolean] identifier[verify] operator[SEP] identifier[EventModel] identifier[eventModel] , identifier[Capabilities] identifier[capabilities] , identifier[Identifiable] identifier[player] , identifier[List] operator[<] identifier[Identifiable] operator[>] identifier[activators] ... |
public Matrix4f perspectiveRect(float width, float height, float zNear, float zFar, boolean zZeroToOne) {
return perspectiveRect(width, height, zNear, zFar, zZeroToOne, thisOrNew());
} | class class_name[name] begin[{]
method[perspectiveRect, return_type[type[Matrix4f]], modifier[public], parameter[width, height, zNear, zFar, zZeroToOne]] begin[{]
return[call[.perspectiveRect, parameter[member[.width], member[.height], member[.zNear], member[.zFar], member[.zZeroToOne], call[.thisOrNew... | Keyword[public] identifier[Matrix4f] identifier[perspectiveRect] operator[SEP] Keyword[float] identifier[width] , Keyword[float] identifier[height] , Keyword[float] identifier[zNear] , Keyword[float] identifier[zFar] , Keyword[boolean] identifier[zZeroToOne] operator[SEP] {
Keyword[return] identifier[perspec... |
private TransactionReceipt send(String toAddress, BigDecimal value, Convert.Unit unit)
throws IOException, InterruptedException,
TransactionException {
BigInteger gasPrice = requestCurrentGasPrice();
return send(toAddress, value, unit, gasPrice, GAS_LIMIT);
} | class class_name[name] begin[{]
method[send, return_type[type[TransactionReceipt]], modifier[private], parameter[toAddress, value, unit]] begin[{]
local_variable[type[BigInteger], gasPrice]
return[call[.send, parameter[member[.toAddress], member[.value], member[.unit], member[.gasPrice], member... | Keyword[private] identifier[TransactionReceipt] identifier[send] operator[SEP] identifier[String] identifier[toAddress] , identifier[BigDecimal] identifier[value] , identifier[Convert] operator[SEP] identifier[Unit] identifier[unit] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedExcept... |
protected static CmsTreeItem getLastOpenedItem(CmsTreeItem item, int stopLevel, boolean requiresDropEnabled) {
if (stopLevel != -1) {
// stop level is set
int currentLevel = getPathLevel(item.getPath());
if (currentLevel > stopLevel) {
// we are past the stop... | class class_name[name] begin[{]
method[getLastOpenedItem, return_type[type[CmsTreeItem]], modifier[static protected], parameter[item, stopLevel, requiresDropEnabled]] begin[{]
if[binary_operation[member[.stopLevel], !=, literal[1]]] begin[{]
local_variable[type[int], currentLevel]
... | Keyword[protected] Keyword[static] identifier[CmsTreeItem] identifier[getLastOpenedItem] operator[SEP] identifier[CmsTreeItem] identifier[item] , Keyword[int] identifier[stopLevel] , Keyword[boolean] identifier[requiresDropEnabled] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopLevel] operator[!=] op... |
public static String getClassName(Descriptor descriptor, ProtoFlavor flavor) {
return getClassName(classNameWithoutPackage(descriptor, flavor), descriptor.getFile(), flavor);
} | class class_name[name] begin[{]
method[getClassName, return_type[type[String]], modifier[public static], parameter[descriptor, flavor]] begin[{]
return[call[.getClassName, parameter[call[.classNameWithoutPackage, parameter[member[.descriptor], member[.flavor]]], call[descriptor.getFile, parameter[]], m... | Keyword[public] Keyword[static] identifier[String] identifier[getClassName] operator[SEP] identifier[Descriptor] identifier[descriptor] , identifier[ProtoFlavor] identifier[flavor] operator[SEP] {
Keyword[return] identifier[getClassName] operator[SEP] identifier[classNameWithoutPackage] operator[SEP] identifier... |
public void marshall(DocumentParameter documentParameter, ProtocolMarshaller protocolMarshaller) {
if (documentParameter == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(documentParameter.getName(),... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[documentParameter, protocolMarshaller]] begin[{]
if[binary_operation[member[.documentParameter], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DocumentParameter] identifier[documentParameter] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[documentParameter] operator[==] Other[null] operator[SEP] {
... |
@SafeVarargs
public static <T> CloseableIterable<T> chain(CloseableIterable<? extends T>... iterables) {
return chain(asList(iterables));
} | class class_name[name] begin[{]
method[chain, return_type[type[CloseableIterable]], modifier[public static], parameter[iterables]] begin[{]
return[call[.chain, parameter[call[.asList, parameter[member[.iterables]]]]]]
end[}]
END[}] | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CloseableIterable] operator[<] identifier[T] operator[>] identifier[chain] operator[SEP] identifier[CloseableIterable] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[...] i... |
public RequestSpecBuilder addQueryParam(String parameterName, Object... parameterValues) {
spec.queryParam(parameterName, parameterValues);
return this;
} | class class_name[name] begin[{]
method[addQueryParam, return_type[type[RequestSpecBuilder]], modifier[public], parameter[parameterName, parameterValues]] begin[{]
call[spec.queryParam, parameter[member[.parameterName], member[.parameterValues]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[RequestSpecBuilder] identifier[addQueryParam] operator[SEP] identifier[String] identifier[parameterName] , identifier[Object] operator[...] identifier[parameterValues] operator[SEP] {
identifier[spec] operator[SEP] identifier[queryParam] operator[SEP] identifier[parameterName] , iden... |
public void set(boolean index, double x, double y) {
this.MODE = LINES;
if (index == true) {
this.x1 = x;
this.y1 = y;
} else {
this.x2 = x;
this.y2 = y;
}
calcG();
dx[0] = x1 - this.x;
dx[1] = x2 - this.x;
... | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[index, x, y]] begin[{]
assign[THIS[member[None.MODE]], member[.LINES]]
if[binary_operation[member[.index], ==, literal[true]]] begin[{]
assign[THIS[member[None.x1]]... | Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[boolean] identifier[index] , Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] {
Keyword[this] operator[SEP] identifier[MODE] operator[=] identifier[LINES] operator[SEP] Keyword[if] operator[SEP] identifier[index] ope... |
public static Concatenator holdsTrue(IPredicateFunction I) {
Concatenator ret = P.holdsTrue(I);
ASTNode an = APIObjectAccess.getAstNode(ret);
an.setClauseType(ClauseType.WHERE);
return ret;
} | class class_name[name] begin[{]
method[holdsTrue, return_type[type[Concatenator]], modifier[public static], parameter[I]] begin[{]
local_variable[type[Concatenator], ret]
local_variable[type[ASTNode], an]
call[an.setClauseType, parameter[member[ClauseType.WHERE]]]
return... | Keyword[public] Keyword[static] identifier[Concatenator] identifier[holdsTrue] operator[SEP] identifier[IPredicateFunction] identifier[I] operator[SEP] {
identifier[Concatenator] identifier[ret] operator[=] identifier[P] operator[SEP] identifier[holdsTrue] operator[SEP] identifier[I] operator[SEP] operator[SEP] ... |
public ListenableFuture<SegmentsAndMetadata> publish(
final TransactionalSegmentPublisher publisher,
final Committer committer,
final Collection<String> sequenceNames
)
{
final List<SegmentIdWithShardSpec> theSegments = getSegmentWithStates(sequenceNames)
.map(SegmentWithState::getSegm... | class class_name[name] begin[{]
method[publish, return_type[type[ListenableFuture]], modifier[public], parameter[publisher, committer, sequenceNames]] begin[{]
local_variable[type[List], theSegments]
local_variable[type[ListenableFuture], publishFuture]
return[call[Futures.transform, pa... | Keyword[public] identifier[ListenableFuture] operator[<] identifier[SegmentsAndMetadata] operator[>] identifier[publish] operator[SEP] Keyword[final] identifier[TransactionalSegmentPublisher] identifier[publisher] , Keyword[final] identifier[Committer] identifier[committer] , Keyword[final] identifier[Collection] ope... |
public int binarySearchFromTo(Object key, int from, int to) {
int low = from;
int high = to;
while (low <= high) {
int mid =(low + high)/2;
Object midVal = elements[mid];
int cmp = ((Comparable)midVal).compareTo(key);
if (cmp < 0) low = mid + 1;
else if (cmp > 0) high = mid - 1;
else return ... | class class_name[name] begin[{]
method[binarySearchFromTo, return_type[type[int]], modifier[public], parameter[key, from, to]] begin[{]
local_variable[type[int], low]
local_variable[type[int], high]
while[binary_operation[member[.low], <=, member[.high]]] begin[{]
lo... | Keyword[public] Keyword[int] identifier[binarySearchFromTo] operator[SEP] identifier[Object] identifier[key] , Keyword[int] identifier[from] , Keyword[int] identifier[to] operator[SEP] {
Keyword[int] identifier[low] operator[=] identifier[from] operator[SEP] Keyword[int] identifier[high] operator[=] identifier... |
private Graphics2D getGraphics(int layer) {
Graphics2D graphics = layeredGraphics[layer];
if (graphics == null) {
createImageAndGraphics(layer);
graphics = layeredGraphics[layer];
}
return graphics;
} | class class_name[name] begin[{]
method[getGraphics, return_type[type[Graphics2D]], modifier[private], parameter[layer]] begin[{]
local_variable[type[Graphics2D], graphics]
if[binary_operation[member[.graphics], ==, literal[null]]] begin[{]
call[.createImageAndGra... | Keyword[private] identifier[Graphics2D] identifier[getGraphics] operator[SEP] Keyword[int] identifier[layer] operator[SEP] {
identifier[Graphics2D] identifier[graphics] operator[=] identifier[layeredGraphics] operator[SEP] identifier[layer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[graphic... |
private static ListenerAdapter createListenerAdapter(EntryEventType eventType, EntryListener listener) {
final ConstructorFunction<EntryListener, ListenerAdapter> constructorFunction = CONSTRUCTORS.get(eventType);
if (constructorFunction == null) {
throw new IllegalArgumentException("First, ... | class class_name[name] begin[{]
method[createListenerAdapter, return_type[type[ListenerAdapter]], modifier[private static], parameter[eventType, listener]] begin[{]
local_variable[type[ConstructorFunction], constructorFunction]
if[binary_operation[member[.constructorFunction], ==, liter... | Keyword[private] Keyword[static] identifier[ListenerAdapter] identifier[createListenerAdapter] operator[SEP] identifier[EntryEventType] identifier[eventType] , identifier[EntryListener] identifier[listener] operator[SEP] {
Keyword[final] identifier[ConstructorFunction] operator[<] identifier[EntryListener] , i... |
public Nfs3CreateRequest makeCreateRequest(NfsCreateMode createMode, byte[] parentDirectoryFileHandle, String name,
NfsSetAttributes attributes, byte[] verifier) throws FileNotFoundException {
return new Nfs3CreateRequest(createMode, parentDirectoryFileHandle, name, attributes, verifier, _credential... | class class_name[name] begin[{]
method[makeCreateRequest, return_type[type[Nfs3CreateRequest]], modifier[public], parameter[createMode, parentDirectoryFileHandle, name, attributes, verifier]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=createMode, postfix_operators=[], prefix_operato... | Keyword[public] identifier[Nfs3CreateRequest] identifier[makeCreateRequest] operator[SEP] identifier[NfsCreateMode] identifier[createMode] , Keyword[byte] operator[SEP] operator[SEP] identifier[parentDirectoryFileHandle] , identifier[String] identifier[name] , identifier[NfsSetAttributes] identifier[attributes] , K... |
public SourceBuilder addLine(String fmt, Object... args) {
add(fmt, args);
source.append(LINE_SEPARATOR);
return this;
} | class class_name[name] begin[{]
method[addLine, return_type[type[SourceBuilder]], modifier[public], parameter[fmt, args]] begin[{]
call[.add, parameter[member[.fmt], member[.args]]]
call[source.append, parameter[member[.LINE_SEPARATOR]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[SourceBuilder] identifier[addLine] operator[SEP] identifier[String] identifier[fmt] , identifier[Object] operator[...] identifier[args] operator[SEP] {
identifier[add] operator[SEP] identifier[fmt] , identifier[args] operator[SEP] operator[SEP] identifier[source] operator[SEP] identi... |
public void beginRestart(String resourceGroupName, String containerGroupName) {
beginRestartWithServiceResponseAsync(resourceGroupName, containerGroupName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginRestart, return_type[void], modifier[public], parameter[resourceGroupName, containerGroupName]] begin[{]
call[.beginRestartWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.containerGroupName]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[beginRestart] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[containerGroupName] operator[SEP] {
identifier[beginRestartWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[containerGroupName]... |
public int[] enumerateColorIds (String className)
{
// make sure the class exists
ClassRecord record = getClassRecord(className);
if (record == null) {
return null;
}
int[] cids = new int[record.colors.size()];
Iterator<ColorRecord> crecs = record.colors.... | class class_name[name] begin[{]
method[enumerateColorIds, return_type[type[int]], modifier[public], parameter[className]] begin[{]
local_variable[type[ClassRecord], record]
if[binary_operation[member[.record], ==, literal[null]]] begin[{]
return[literal[null]]
else b... | Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[enumerateColorIds] operator[SEP] identifier[String] identifier[className] operator[SEP] {
identifier[ClassRecord] identifier[record] operator[=] identifier[getClassRecord] operator[SEP] identifier[className] operator[SEP] operator[SEP] Keyword[i... |
protected static SubstitutedLine doParse(String str, ParsingStateCallbackHandler callbackHandler, ParsingState initialState,
boolean strict, boolean disableResolutionException, CommandContext cmdCtx) throws CommandFormatException {
if (str == null || str.isEmpty()) {
return new Substitu... | class class_name[name] begin[{]
method[doParse, return_type[type[SubstitutedLine]], modifier[static protected], parameter[str, callbackHandler, initialState, strict, disableResolutionException, cmdCtx]] begin[{]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, call[str... | Keyword[protected] Keyword[static] identifier[SubstitutedLine] identifier[doParse] operator[SEP] identifier[String] identifier[str] , identifier[ParsingStateCallbackHandler] identifier[callbackHandler] , identifier[ParsingState] identifier[initialState] , Keyword[boolean] identifier[strict] , Keyword[boolean] ident... |
public void beginDelete(String resourceGroupName, String domainName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginDelete, return_type[void], modifier[public], parameter[resourceGroupName, domainName]] begin[{]
call[.beginDeleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.domainName]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[beginDelete] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] operator[SEP] {
identifier[beginDeleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[domainName] operator[SEP] ope... |
private void cascadeMarkedForDeletion()
{
List alreadyPrepared = new ArrayList();
for(int i = 0; i < markedForDeletionList.size(); i++)
{
ObjectEnvelope mod = (ObjectEnvelope) markedForDeletionList.get(i);
// if the object wasn't associated with another object, ... | class class_name[name] begin[{]
method[cascadeMarkedForDeletion, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[List], alreadyPrepared]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclara... | Keyword[private] Keyword[void] identifier[cascadeMarkedForDeletion] operator[SEP] operator[SEP] {
identifier[List] identifier[alreadyPrepared] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operat... |
static public String
nullify(String path)
{
return (path != null && path.length() == 0 ? null : path);
} | class class_name[name] begin[{]
method[nullify, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[static] Keyword[public] identifier[String] identifier[nullify] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[return] operator[SEP] identifier[path] operator[!=] Other[null] operator[&&] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] ... |
public CoinbaseUser createCoinbaseUser(CoinbaseUser user, final String oAuthClientId)
throws IOException {
final CoinbaseUser createdUser = coinbase.createUser(user.withoAuthClientId(oAuthClientId));
return handleResponse(createdUser);
} | class class_name[name] begin[{]
method[createCoinbaseUser, return_type[type[CoinbaseUser]], modifier[public], parameter[user, oAuthClientId]] begin[{]
local_variable[type[CoinbaseUser], createdUser]
return[call[.handleResponse, parameter[member[.createdUser]]]]
end[}]
END[}] | Keyword[public] identifier[CoinbaseUser] identifier[createCoinbaseUser] operator[SEP] identifier[CoinbaseUser] identifier[user] , Keyword[final] identifier[String] identifier[oAuthClientId] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] identifier[CoinbaseUser] identifier[createdUser] op... |
public String convertIfcSpaceTypeEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcSpaceTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[],... | Keyword[public] identifier[String] identifier[convertIfcSpaceTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifi... |
@Override
public void setRow (final RowVector rv, final int r) throws MatrixException
{
super.setRow (rv, r);
reset ();
} | class class_name[name] begin[{]
method[setRow, return_type[void], modifier[public], parameter[rv, r]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=rv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=r, postfix_operators=[], prefix... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setRow] operator[SEP] Keyword[final] identifier[RowVector] identifier[rv] , Keyword[final] Keyword[int] identifier[r] operator[SEP] Keyword[throws] identifier[MatrixException] {
Keyword[super] operator[SEP] identifier[setRow] operator[S... |
public static ContentType parse(
final String s) throws ParseException, UnsupportedCharsetException {
if (s == null) {
throw new IllegalArgumentException("Content type may not be null");
}
HeaderElement[] elements = BasicHeaderValueParser.parseElements(s, null);
i... | class class_name[name] begin[{]
method[parse, return_type[type[ContentType]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators... | Keyword[public] Keyword[static] identifier[ContentType] identifier[parse] operator[SEP] Keyword[final] identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[ParseException] , identifier[UnsupportedCharsetException] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[S... |
private static <S extends Storable> Map<String, StorableProperty<S>>
examineProperties(Class<S> type,
List<NameAndDirection> primaryKeyProps,
List<List<NameAndDirection>> alternateKeyProps,
List<NameAndDirection> partitionKeyProps... | class class_name[name] begin[{]
method[examineProperties, return_type[type[Map]], modifier[private static], parameter[type, primaryKeyProps, alternateKeyProps, partitionKeyProps]] begin[{]
if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(argum... | Keyword[private] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Storable] operator[>] identifier[Map] operator[<] identifier[String] , identifier[StorableProperty] operator[<] identifier[S] operator[>] operator[>] identifier[examineProperties] operator[SEP] identifier[Class] operator[<] identifi... |
public static String getDate(Date date, Format format) {
DateTimeFormat df;
switch (format) {
case FULL:
df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_FULL);
break;
case LONG:
df = DateTimeFormat.getFormat(Date... | class class_name[name] begin[{]
method[getDate, return_type[type[String]], modifier[public static], parameter[date, format]] begin[{]
local_variable[type[DateTimeFormat], df]
SwitchStatement(cases=[SwitchStatementCase(case=['FULL'], statements=[StatementExpression(expression=Assignment(expressi... | Keyword[public] Keyword[static] identifier[String] identifier[getDate] operator[SEP] identifier[Date] identifier[date] , identifier[Format] identifier[format] operator[SEP] {
identifier[DateTimeFormat] identifier[df] operator[SEP] Keyword[switch] operator[SEP] identifier[format] operator[SEP] {
Keywo... |
public Reflect create(Class[] types, Object... args) throws ReflectionException {
try {
return on(clazz.getConstructor(types), accessAll, args);
} catch (NoSuchMethodException e) {
for (Constructor constructor : getConstructors()) {
if (ReflectionUtils.typesMatch(constructor.ge... | class class_name[name] begin[{]
method[create, return_type[type[Reflect]], modifier[public], parameter[types, args]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=types, postfix_operators=[], prefix_operators=[], q... | Keyword[public] identifier[Reflect] identifier[create] operator[SEP] identifier[Class] operator[SEP] operator[SEP] identifier[types] , identifier[Object] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[ReflectionException] {
Keyword[try] {
Keyword[return] identifier[on] operat... |
public static TrustingNullnessAnalysis instance(Context context) {
TrustingNullnessAnalysis instance = context.get(TRUSTING_NULLNESS_KEY);
if (instance == null) {
instance = new TrustingNullnessAnalysis();
context.put(TRUSTING_NULLNESS_KEY, instance);
}
return instance;
} | class class_name[name] begin[{]
method[instance, return_type[type[TrustingNullnessAnalysis]], modifier[public static], parameter[context]] begin[{]
local_variable[type[TrustingNullnessAnalysis], instance]
if[binary_operation[member[.instance], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[static] identifier[TrustingNullnessAnalysis] identifier[instance] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
identifier[TrustingNullnessAnalysis] identifier[instance] operator[=] identifier[context] operator[SEP] identifier[get] operator[SEP] identifier[TRUSTING... |
public void hmget(final String key, final String... fields) {
final byte[][] bfields = new byte[fields.length][];
for (int i = 0; i < bfields.length; i++) {
bfields[i] = SafeEncoder.encode(fields[i]);
}
hmget(SafeEncoder.encode(key), bfields);
} | class class_name[name] begin[{]
method[hmget, return_type[void], modifier[public], parameter[key, fields]] begin[{]
local_variable[type[byte], bfields]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bfields, ... | Keyword[public] Keyword[void] identifier[hmget] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] operator[...] identifier[fields] operator[SEP] {
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bfields] operator[=... |
private static CommunicationHandler newHandlerPreference(String handlerProp,
String url, String user, String pass,
SSLSocketFactory sslSocketFactory, HostnameVerifier verifier, int initialConnectionTimeout)
throws InitializationException {
if (handlerProp == null) {
throw new NullPointerException();
}... | class class_name[name] begin[{]
method[newHandlerPreference, return_type[type[CommunicationHandler]], modifier[private static], parameter[handlerProp, url, user, pass, sslSocketFactory, verifier, initialConnectionTimeout]] begin[{]
if[binary_operation[member[.handlerProp], ==, literal[null]]] b... | Keyword[private] Keyword[static] identifier[CommunicationHandler] identifier[newHandlerPreference] operator[SEP] identifier[String] identifier[handlerProp] , identifier[String] identifier[url] , identifier[String] identifier[user] , identifier[String] identifier[pass] , identifier[SSLSocketFactory] identifier[sslSo... |
CRC32 fixErasedBlock(
FileSystem srcFs, FileStatus srcStat, FileSystem parityFs, Path parityFile,
boolean fixSource,
long blockSize, long errorOffset, long limit, boolean partial,
OutputStream out, StripeInfo si, Context context,
boolean skipVerify) throws IOException, InterruptedException... | class class_name[name] begin[{]
method[fixErasedBlock, return_type[type[CRC32]], modifier[default], parameter[srcFs, srcStat, parityFs, parityFile, fixSource, blockSize, errorOffset, limit, partial, out, si, context, skipVerify]] begin[{]
call[.configureBuffers, parameter[member[.blockSize]]]
... | identifier[CRC32] identifier[fixErasedBlock] operator[SEP] identifier[FileSystem] identifier[srcFs] , identifier[FileStatus] identifier[srcStat] , identifier[FileSystem] identifier[parityFs] , identifier[Path] identifier[parityFile] , Keyword[boolean] identifier[fixSource] , Keyword[long] identifier[blockSize] , ... |
public static String buildTimeDifference(final Calendar pStartCalendar, final Calendar pEndCalendar) {
if (pStartCalendar == null) {
return CALENDAR_IS_NULL_ERROR_MESSAGE;
}
if (pEndCalendar == null) {
return CALENDAR_IS_NULL_ERROR_MESSAGE;
}
if (pEndCalendar.before(pStartCalend... | class class_name[name] begin[{]
method[buildTimeDifference, return_type[type[String]], modifier[public static], parameter[pStartCalendar, pEndCalendar]] begin[{]
if[binary_operation[member[.pStartCalendar], ==, literal[null]]] begin[{]
return[member[.CALENDAR_IS_NULL_ERROR_MESSAGE]]... | Keyword[public] Keyword[static] identifier[String] identifier[buildTimeDifference] operator[SEP] Keyword[final] identifier[Calendar] identifier[pStartCalendar] , Keyword[final] identifier[Calendar] identifier[pEndCalendar] operator[SEP] {
Keyword[if] operator[SEP] identifier[pStartCalendar] operator[==] Other[n... |
public static NbtAddress[] getAllByAddress( String host,
int type,
String scope )
throws UnknownHostException {
return getAllByAddress( getByName( host, type, scope ));
} | class class_name[name] begin[{]
method[getAllByAddress, return_type[type[NbtAddress]], modifier[public static], parameter[host, type, scope]] begin[{]
return[call[.getAllByAddress, parameter[call[.getByName, parameter[member[.host], member[.type], member[.scope]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[NbtAddress] operator[SEP] operator[SEP] identifier[getAllByAddress] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[type] , identifier[String] identifier[scope] operator[SEP] Keyword[throws] identifier[UnknownHostException] {
Keyword[return... |
public DescribeConfigurationRecorderStatusResult withConfigurationRecordersStatus(ConfigurationRecorderStatus... configurationRecordersStatus) {
if (this.configurationRecordersStatus == null) {
setConfigurationRecordersStatus(new com.amazonaws.internal.SdkInternalList<ConfigurationRecorderStatus>(co... | class class_name[name] begin[{]
method[withConfigurationRecordersStatus, return_type[type[DescribeConfigurationRecorderStatusResult]], modifier[public], parameter[configurationRecordersStatus]] begin[{]
if[binary_operation[THIS[member[None.configurationRecordersStatus]], ==, literal[null]]] beg... | Keyword[public] identifier[DescribeConfigurationRecorderStatusResult] identifier[withConfigurationRecordersStatus] operator[SEP] identifier[ConfigurationRecorderStatus] operator[...] identifier[configurationRecordersStatus] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[configur... |
public String decrypt(String encrypted) throws Exception {
byte[] decodedValue = Base64Coder.decode(encrypted.toCharArray());
Cipher c = getCipher(Cipher.DECRYPT_MODE);
byte[] decValue = c.doFinal(decodedValue);
return new String(decValue);
} | class class_name[name] begin[{]
method[decrypt, return_type[type[String]], modifier[public], parameter[encrypted]] begin[{]
local_variable[type[byte], decodedValue]
local_variable[type[Cipher], c]
local_variable[type[byte], decValue]
return[ClassCreator(arguments=[MemberReferenc... | Keyword[public] identifier[String] identifier[decrypt] operator[SEP] identifier[String] identifier[encrypted] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[byte] operator[SEP] operator[SEP] identifier[decodedValue] operator[=] identifier[Base64Coder] operator[SEP] identifier[decode] operator[SEP]... |
public static Vector<Object> toXmlRpcRunnersParameters(Collection<Runner> runners)
{
Vector<Object> runnersParams = new Vector<Object>();
for(Runner runner : runners)
{
runnersParams.add(runner.marshallize());
}
return runnersParams;
} | class class_name[name] begin[{]
method[toXmlRpcRunnersParameters, return_type[type[Vector]], modifier[public static], parameter[runners]] begin[{]
local_variable[type[Vector], runnersParams]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation... | Keyword[public] Keyword[static] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[toXmlRpcRunnersParameters] operator[SEP] identifier[Collection] operator[<] identifier[Runner] operator[>] identifier[runners] operator[SEP] {
identifier[Vector] operator[<] identifier[Object] operator[>] ide... |
@Override
public CommerceNotificationTemplate findByUUID_G(String uuid, long groupId)
throws NoSuchNotificationTemplateException {
CommerceNotificationTemplate commerceNotificationTemplate = fetchByUUID_G(uuid,
groupId);
if (commerceNotificationTemplate == null) {
StringBundler msg = new StringBundler(6)... | class class_name[name] begin[{]
method[findByUUID_G, return_type[type[CommerceNotificationTemplate]], modifier[public], parameter[uuid, groupId]] begin[{]
local_variable[type[CommerceNotificationTemplate], commerceNotificationTemplate]
if[binary_operation[member[.commerceNotificationTem... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceNotificationTemplate] identifier[findByUUID_G] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] Keyword[throws] identifier[NoSuchNotificationTemplateException] {
identifier[CommerceNotificati... |
public <T> T doReadEntity(Class<T> cls, Type t, Annotation[] anns) throws ProcessingException, IllegalStateException {
return doReadEntity(cls, t, anns, false);
} | class class_name[name] begin[{]
method[doReadEntity, return_type[type[T]], modifier[public], parameter[cls, t, anns]] begin[{]
return[call[.doReadEntity, parameter[member[.cls], member[.t], member[.anns], literal[false]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[doReadEntity] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] , identifier[Type] identifier[t] , identifier[Annotation] operator[SEP] operator[SEP] identifier[anns] operator[SEP] Keyword[throws] identi... |
public MultimapJoiner useForNull(final String nullText) {
return new MultimapJoiner(entryJoiner.useForNull(nullText), separator, keyValueSeparator) {
@Override
protected CharSequence toString(Object part) {
return (part == null) ? nullText : MultimapJoiner.this.toString(part);
}
@Override
public M... | class class_name[name] begin[{]
method[useForNull, return_type[type[MultimapJoiner]], modifier[public], parameter[nullText]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=nullText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member... | Keyword[public] identifier[MultimapJoiner] identifier[useForNull] operator[SEP] Keyword[final] identifier[String] identifier[nullText] operator[SEP] {
Keyword[return] Keyword[new] identifier[MultimapJoiner] operator[SEP] identifier[entryJoiner] operator[SEP] identifier[useForNull] operator[SEP] identifier[nullTe... |
public void single(EtlEventData data) {
Assert.notNull(data);
String path = StagePathUtils.getExtractStage(data.getPipelineId(), data.getProcessId());
data.setCurrNid(ArbitrateConfigUtils.getCurrentNid());
// 序列化
byte[] bytes = JsonUtils.marshalToByte(data, SerializerFeature.Writ... | class class_name[name] begin[{]
method[single, return_type[void], modifier[public], parameter[data]] begin[{]
call[Assert.notNull, parameter[member[.data]]]
local_variable[type[String], path]
call[data.setCurrNid, parameter[call[ArbitrateConfigUtils.getCurrentNid, parame... | Keyword[public] Keyword[void] identifier[single] operator[SEP] identifier[EtlEventData] identifier[data] operator[SEP] {
identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] identifier[StagePathUtils] opera... |
@Override
protected boolean initiateClient()
{
for (String host : hosts)
{
if (host == null)
{
LOGGER.error("Host Name should not be null.");
throw new IllegalArgumentException("Host Name should not be null.");
}
}
... | class class_name[name] begin[{]
method[initiateClient, return_type[type[boolean]], modifier[protected], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=host, postfix_operators=[], prefix_operators=[], q... | annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[initiateClient] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[host] operator[:] identifier[hosts] operator[SEP] {
Keyword[if] operator[SEP] identifier[host] operator[==] Other[nu... |
@Override
public final Optional<C> getCredentials(final WebContext context) {
init();
final Optional<C> optCredentials = retrieveCredentials(context);
// no credentials -> save this authentication has already been tried and failed
if (!optCredentials.isPresent()) {
contex... | class class_name[name] begin[{]
method[getCredentials, return_type[type[Optional]], modifier[final public], parameter[context]] begin[{]
call[.init, parameter[]]
local_variable[type[Optional], optCredentials]
if[call[optCredentials.isPresent, parameter[]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Optional] operator[<] identifier[C] operator[>] identifier[getCredentials] operator[SEP] Keyword[final] identifier[WebContext] identifier[context] operator[SEP] {
identifier[init] operator[SEP] operator[SEP] operator[SEP] Keyword[final]... |
@Pure
public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Map<? extends K, ? extends V> right) {
return Maps.filterEntries(left, new Predicate<Entry<K, V>>() {
@Override
public boolean apply(Entry<K, V> input) {
final V value = right.get(input.getKey());
if (value == null) {
return... | class class_name[name] begin[{]
method[operator_minus, return_type[type[Map]], modifier[public static], parameter[left, right]] begin[{]
return[call[Maps.filterEntries, parameter[member[.left], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], bod... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[operator_minus] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[left] , ... |
public TransformInner createOrUpdate(String resourceGroupName, String accountName, String transformName, TransformInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, transformName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[createOrUpdate, return_type[type[TransformInner]], modifier[public], parameter[resourceGroupName, accountName, transformName, parameters]] begin[{]
return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.accountName], mem... | Keyword[public] identifier[TransformInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[transformName] , identifier[TransformInner] identifier[parameters] operator[SEP] {
Keyword[return] i... |
public static String formatDate(final Date value, final String pattern)
{
return new SimpleDateFormat(pattern, currentLocale()).format(value);
} | class class_name[name] begin[{]
method[formatDate, return_type[type[String]], modifier[public static], parameter[value, pattern]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], ... | Keyword[public] Keyword[static] identifier[String] identifier[formatDate] operator[SEP] Keyword[final] identifier[Date] identifier[value] , Keyword[final] identifier[String] identifier[pattern] operator[SEP] {
Keyword[return] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[pattern] , identif... |
public void addReading(AnalyzedToken token) {
List<AnalyzedToken> l = new ArrayList<>(Arrays.asList(anTokReadings).subList(0, anTokReadings.length - 1));
if (anTokReadings[anTokReadings.length - 1].getPOSTag() != null) {
l.add(anTokReadings[anTokReadings.length - 1]);
}
token.setWhitespaceBefore(i... | class class_name[name] begin[{]
method[addReading, return_type[void], modifier[public], parameter[token]] begin[{]
local_variable[type[List], l]
if[binary_operation[member[.anTokReadings], !=, literal[null]]] begin[{]
call[l.add, parameter[member[.anTokReadings]]... | Keyword[public] Keyword[void] identifier[addReading] operator[SEP] identifier[AnalyzedToken] identifier[token] operator[SEP] {
identifier[List] operator[<] identifier[AnalyzedToken] operator[>] identifier[l] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[Arrays] o... |
public static Image newImage (AbstractImagePrototype image, String... styles)
{
return setStyleNames(image.createImage(), styles);
} | class class_name[name] begin[{]
method[newImage, return_type[type[Image]], modifier[public static], parameter[image, styles]] begin[{]
return[call[.setStyleNames, parameter[call[image.createImage, parameter[]], member[.styles]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Image] identifier[newImage] operator[SEP] identifier[AbstractImagePrototype] identifier[image] , identifier[String] operator[...] identifier[styles] operator[SEP] {
Keyword[return] identifier[setStyleNames] operator[SEP] identifier[image] operator[SEP] identifier[creat... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Empty, DiagnoseClusterResults> diagnoseClusterAsync(
String projectId, String region, String clusterName) {
DiagnoseClusterRequest request =
DiagnoseClusterRequest... | class class_name[name] begin[{]
method[diagnoseClusterAsync, return_type[type[OperationFuture]], modifier[final public], parameter[projectId, region, clusterName]] begin[{]
local_variable[type[DiagnoseClusterRequest], request]
return[call[.diagnoseClusterAsync, parameter[member[.request]]]]
... | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[DiagnoseClusterResults] operator[>] identifier[diagnoseClusterAsync] operator[SEP] identifier[String] identifier[projectId] , identifier[S... |
public final static ExtendedBoolean getExtendedBooleanByName(String name) throws NullPointerException, IllegalArgumentException {
if (tc.isDebugEnabled())
SibTr.info(tc, "Name = " + name);
if (name == null) {
throw new NullPointerException();
}
/* Look for the n... | class class_name[name] begin[{]
method[getExtendedBooleanByName, return_type[type[ExtendedBoolean]], modifier[final public static], parameter[name]] begin[{]
if[call[tc.isDebugEnabled, parameter[]]] begin[{]
call[SibTr.info, parameter[member[.tc], binary_operation[literal["Name = "]... | Keyword[public] Keyword[final] Keyword[static] identifier[ExtendedBoolean] identifier[getExtendedBooleanByName] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[NullPointerException] , identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[tc] opera... |
public static String getName(GuacamoleConfiguration config)
throws GuacamoleException {
if (config == null)
return null;
String protocol = config.getProtocol();
String host = config.getParameter("hostname");
String port = config.getParameter("port");
Str... | class class_name[name] begin[{]
method[getName, return_type[type[String]], modifier[public static], parameter[config]] begin[{]
if[binary_operation[member[.config], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[String], ... | Keyword[public] Keyword[static] identifier[String] identifier[getName] operator[SEP] identifier[GuacamoleConfiguration] identifier[config] operator[SEP] Keyword[throws] identifier[GuacamoleException] {
Keyword[if] operator[SEP] identifier[config] operator[==] Other[null] operator[SEP] Keyword[return] Other[null]... |
public Observable<Page<JobInner>> listByResourceGroupAsync(final String resourceGroupName, final JobsListByResourceGroupOptions jobsListByResourceGroupOptions) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName, jobsListByResourceGroupOptions)
.map(new Func1<ServiceResponse<Page<... | class class_name[name] begin[{]
method[listByResourceGroupAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, jobsListByResourceGroupOptions]] begin[{]
return[call[.listByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.jobsListByReso... | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[JobInner] operator[>] operator[>] identifier[listByResourceGroupAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[JobsListByResourceGroupOptions] identifier[jobsList... |
private boolean validateAtlasRelationshipType(AtlasRelationshipType type) {
boolean isValid = false;
try {
validateAtlasRelationshipDef(type.getRelationshipDef());
isValid = true;
} catch (AtlasBaseException abe) {
LOG.error("Validation error for AtlasRelation... | class class_name[name] begin[{]
method[validateAtlasRelationshipType, return_type[type[boolean]], modifier[private], parameter[type]] begin[{]
local_variable[type[boolean], isValid]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], mem... | Keyword[private] Keyword[boolean] identifier[validateAtlasRelationshipType] operator[SEP] identifier[AtlasRelationshipType] identifier[type] operator[SEP] {
Keyword[boolean] identifier[isValid] operator[=] literal[boolean] operator[SEP] Keyword[try] {
identifier[validateAtlasRelationshipDef] operator[... |
public char[] retrieveSecuredAttribute(String vaultBlock, String attributeName) throws Exception {
return vault.retrieve(vaultBlock, attributeName, null);
} | class class_name[name] begin[{]
method[retrieveSecuredAttribute, return_type[type[char]], modifier[public], parameter[vaultBlock, attributeName]] begin[{]
return[call[vault.retrieve, parameter[member[.vaultBlock], member[.attributeName], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[char] operator[SEP] operator[SEP] identifier[retrieveSecuredAttribute] operator[SEP] identifier[String] identifier[vaultBlock] , identifier[String] identifier[attributeName] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[vault] operator[SEP] identifier[r... |
public JsonObject getJsonObject() {
JsonObject obj = new JsonObject();
obj.add("field", this.field);
obj.add("value", this.value);
return obj;
} | class class_name[name] begin[{]
method[getJsonObject, return_type[type[JsonObject]], modifier[public], parameter[]] begin[{]
local_variable[type[JsonObject], obj]
call[obj.add, parameter[literal["field"], THIS[member[None.field]]]]
call[obj.add, parameter[literal["value"... | Keyword[public] identifier[JsonObject] identifier[getJsonObject] operator[SEP] operator[SEP] {
identifier[JsonObject] identifier[obj] operator[=] Keyword[new] identifier[JsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[add] operator[SEP] literal[String] , Keyword[th... |
public void runPipelineWithHashtag() throws Exception {
DynoJedisPipeline pipeline = client.pipelined();
try {
pipeline.set("pipeline-hashtag1-{bar}", "value-1");
pipeline.set("pipeline-hashtag2-{bar}", "value-2");
pipeline.set("pipeline-hashtag3-{bar}", "value-3");
pipeline.set("pipeline-hashtag4-{ba... | class class_name[name] begin[{]
method[runPipelineWithHashtag, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[DynoJedisPipeline], pipeline]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operato... | Keyword[public] Keyword[void] identifier[runPipelineWithHashtag] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[DynoJedisPipeline] identifier[pipeline] operator[=] identifier[client] operator[SEP] identifier[pipelined] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
... |
public static EObject findActualSemanticObjectFor(/* @Nullable */ INode node) {
if (node == null)
return null;
if (node.hasDirectSemanticElement())
return node.getSemanticElement();
EObject grammarElement = node.getGrammarElement();
ICompositeNode parent = node.getParent();
if (grammarElement == null)
... | class class_name[name] begin[{]
method[findActualSemanticObjectFor, return_type[type[EObject]], modifier[public static], parameter[node]] begin[{]
if[binary_operation[member[.node], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[c... | Keyword[public] Keyword[static] identifier[EObject] identifier[findActualSemanticObjectFor] operator[SEP] identifier[INode] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identi... |
public void marshall(DescribeContainerRequest describeContainerRequest, ProtocolMarshaller protocolMarshaller) {
if (describeContainerRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(describ... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[describeContainerRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeContainerRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeContainerRequest] identifier[describeContainerRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeContainerRequest] operator[==] Other[null] opera... |
private static SecretKeySpec keySpecFromSecretKey(String secretKey) {
if (!keySpecs.containsKey(secretKey)) {
byte[] ivraw = secretKey.getBytes();
SecretKeySpec skeySpec = new SecretKeySpec(ivraw, "AES"); //$NON-NLS-1$
keySpecs.put(secretKey, skeySpec);
}
retu... | class class_name[name] begin[{]
method[keySpecFromSecretKey, return_type[type[SecretKeySpec]], modifier[private static], parameter[secretKey]] begin[{]
if[call[keySpecs.containsKey, parameter[member[.secretKey]]]] begin[{]
local_variable[type[byte], ivraw]
local_variable... | Keyword[private] Keyword[static] identifier[SecretKeySpec] identifier[keySpecFromSecretKey] operator[SEP] identifier[String] identifier[secretKey] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[keySpecs] operator[SEP] identifier[containsKey] operator[SEP] identifier[secretKey] operator[SEP] ope... |
private Parser getSyntaxParser(Syntax syntax) throws MacroExecutionException
{
try {
return this.componentManager.getInstance(Parser.class, syntax.toIdString());
} catch (ComponentLookupException e) {
throw new MacroExecutionException("Failed to find source parser for syntax ... | class class_name[name] begin[{]
method[getSyntaxParser, return_type[type[Parser]], modifier[private], parameter[syntax]] begin[{]
TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=componentManager, postfix_op... | Keyword[private] identifier[Parser] identifier[getSyntaxParser] operator[SEP] identifier[Syntax] identifier[syntax] operator[SEP] Keyword[throws] identifier[MacroExecutionException] {
Keyword[try] {
Keyword[return] Keyword[this] operator[SEP] identifier[componentManager] operator[SEP] identifier[getIn... |
@Override
protected void unserializeFrom(RawDataBuffer in)
{
super.unserializeFrom(in);
byte[] data = in.readByteArray();
error = (JMSException)SerializationTools.fromByteArray(data);
} | class class_name[name] begin[{]
method[unserializeFrom, return_type[void], modifier[protected], parameter[in]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unserializeFrom, postfix_operators=[]... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[unserializeFrom] operator[SEP] identifier[RawDataBuffer] identifier[in] operator[SEP] {
Keyword[super] operator[SEP] identifier[unserializeFrom] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] oper... |
public void billingAccount_rsva_serviceName_PUT(String billingAccount, String serviceName, OvhRsva body) throws IOException {
String qPath = "/telephony/{billingAccount}/rsva/{serviceName}";
StringBuilder sb = path(qPath, billingAccount, serviceName);
exec(qPath, "PUT", sb.toString(), body);
} | class class_name[name] begin[{]
method[billingAccount_rsva_serviceName_PUT, return_type[void], modifier[public], parameter[billingAccount, serviceName, body]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, parameter[member[.qPath... | Keyword[public] Keyword[void] identifier[billingAccount_rsva_serviceName_PUT] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[OvhRsva] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPa... |
@Override
public GetMergeConflictsResult getMergeConflicts(GetMergeConflictsRequest request) {
request = beforeClientExecution(request);
return executeGetMergeConflicts(request);
} | class class_name[name] begin[{]
method[getMergeConflicts, return_type[type[GetMergeConflictsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetMergeConflicts, parameter[membe... | annotation[@] identifier[Override] Keyword[public] identifier[GetMergeConflictsResult] identifier[getMergeConflicts] operator[SEP] identifier[GetMergeConflictsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[... |
public static <K, V, M extends Map<K, V>> void ifExist(M map,
Consumer<M> consumer) {
getOptional(map).ifPresent(consumer);
} | class class_name[name] begin[{]
method[ifExist, return_type[void], modifier[public static], parameter[map, consumer]] begin[{]
call[.getOptional, parameter[member[.map]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] , identifier[M] Keyword[extends] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] operator[>] Keyword[void] identifier[ifExist] operator[SEP] identifier[M] identifier[map] , identifier[Consumer] operator[<] identifier[M] ... |
protected ListCellRenderer<? super EnumerationValue> getComboBoxRenderer(final InputColumn<?> inputColumn,
final Map<InputColumn<?>, DCComboBox<EnumerationValue>> mappedEnumComboBoxes,
final EnumerationValue[] enumConstants) {
return new EnumComboBoxListRenderer();
} | class class_name[name] begin[{]
method[getComboBoxRenderer, return_type[type[ListCellRenderer]], modifier[protected], parameter[inputColumn, mappedEnumComboBoxes, enumConstants]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operator... | Keyword[protected] identifier[ListCellRenderer] operator[<] operator[?] Keyword[super] identifier[EnumerationValue] operator[>] identifier[getComboBoxRenderer] operator[SEP] Keyword[final] identifier[InputColumn] operator[<] operator[?] operator[>] identifier[inputColumn] , Keyword[final] identifier[Map] operator[<] i... |
public static AjaxOperation registerComponent(final String targetId, final String triggerId) {
AjaxOperation operation = new AjaxOperation(triggerId, targetId);
registerAjaxOperation(operation);
return operation;
} | class class_name[name] begin[{]
method[registerComponent, return_type[type[AjaxOperation]], modifier[public static], parameter[targetId, triggerId]] begin[{]
local_variable[type[AjaxOperation], operation]
call[.registerAjaxOperation, parameter[member[.operation]]]
return[member[... | Keyword[public] Keyword[static] identifier[AjaxOperation] identifier[registerComponent] operator[SEP] Keyword[final] identifier[String] identifier[targetId] , Keyword[final] identifier[String] identifier[triggerId] operator[SEP] {
identifier[AjaxOperation] identifier[operation] operator[=] Keyword[new] identifi... |
public java.util.List<String> getPreferredCacheClusterAZs() {
if (preferredCacheClusterAZs == null) {
preferredCacheClusterAZs = new com.amazonaws.internal.SdkInternalList<String>();
}
return preferredCacheClusterAZs;
} | class class_name[name] begin[{]
method[getPreferredCacheClusterAZs, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.preferredCacheClusterAZs], ==, literal[null]]] begin[{]
assign[member[.preferredCacheClusterAZs], ClassCreator... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getPreferredCacheClusterAZs] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[preferredCacheClusterAZs] operator[==] Other[null] operator[SEP] {
... |
public static Tag uri(HttpRequest request) {
return Tag.of("uri", ensureLeadingSlash(stripUri(request.getURI().toString())));
} | class class_name[name] begin[{]
method[uri, return_type[type[Tag]], modifier[public static], parameter[request]] begin[{]
return[call[Tag.of, parameter[literal["uri"], call[.ensureLeadingSlash, parameter[call[.stripUri, parameter[call[request.getURI, parameter[]]]]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Tag] identifier[uri] operator[SEP] identifier[HttpRequest] identifier[request] operator[SEP] {
Keyword[return] identifier[Tag] operator[SEP] identifier[of] operator[SEP] literal[String] , identifier[ensureLeadingSlash] operator[SEP] identifier[stripUri] operator[SEP] i... |
public static Variation attemptToGetAsVariant(String part, ItemStack is)
{
if (is.getItem() instanceof ItemBlock)
{
// Unlocalised name doesn't always match the names we use in types.xsd
// (which are the names displayed by Minecraft when using the F3 debug etc.)
... | class class_name[name] begin[{]
method[attemptToGetAsVariant, return_type[type[Variation]], modifier[public static], parameter[part, is]] begin[{]
if[binary_operation[call[is.getItem, parameter[]], instanceof, type[ItemBlock]]] begin[{]
local_variable[type[ItemBlock], ib]
... | Keyword[public] Keyword[static] identifier[Variation] identifier[attemptToGetAsVariant] operator[SEP] identifier[String] identifier[part] , identifier[ItemStack] identifier[is] operator[SEP] {
Keyword[if] operator[SEP] identifier[is] operator[SEP] identifier[getItem] operator[SEP] operator[SEP] Keyword[instance... |
public static String[] getBeanInfoSearchPath() {
String[] path = new String[searchPath.length];
System.arraycopy(searchPath, 0, path, 0, searchPath.length);
return path;
} | class class_name[name] begin[{]
method[getBeanInfoSearchPath, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], path]
call[System.arraycopy, parameter[member[.searchPath], literal[0], member[.path], literal[0], member[searchPath.lengt... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getBeanInfoSearchPath] operator[SEP] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[path] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[searchPath] operator[SEP] identifier[... |
public void setHeight(int height) {
if (m_isFrame) {
setParentHeight(height);
} else {
m_popup.setHeight(height);
if (m_popup.isShowing()) {
m_popup.center();
}
}
} | class class_name[name] begin[{]
method[setHeight, return_type[void], modifier[public], parameter[height]] begin[{]
if[member[.m_isFrame]] begin[{]
call[.setParentHeight, parameter[member[.height]]]
else begin[{]
call[m_popup.setHeight, par... | Keyword[public] Keyword[void] identifier[setHeight] operator[SEP] Keyword[int] identifier[height] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_isFrame] operator[SEP] {
identifier[setParentHeight] operator[SEP] identifier[height] operator[SEP] operator[SEP]
}
Keyword[else] {
... |
synchronized void removeServerProcess() {
this.requiredState = InternalState.STOPPED;
internalSetState(new ProcessRemoveTask(), InternalState.STOPPED, InternalState.PROCESS_REMOVING);
} | class class_name[name] begin[{]
method[removeServerProcess, return_type[void], modifier[synchronized], parameter[]] begin[{]
assign[THIS[member[None.requiredState]], member[InternalState.STOPPED]]
call[.internalSetState, parameter[ClassCreator(arguments=[], body=None, constructo... | Keyword[synchronized] Keyword[void] identifier[removeServerProcess] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[requiredState] operator[=] identifier[InternalState] operator[SEP] identifier[STOPPED] operator[SEP] identifier[internalSetState] operator[SEP] Keyword[new] identifier[ProcessR... |
public static SetAttributeHandler setAttribute(final HttpHandler next, final String attribute, final String value, final ClassLoader classLoader) {
return new SetAttributeHandler(next, attribute, value, classLoader);
} | class class_name[name] begin[{]
method[setAttribute, return_type[type[SetAttributeHandler]], modifier[public static], parameter[next, attribute, value, classLoader]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])... | Keyword[public] Keyword[static] identifier[SetAttributeHandler] identifier[setAttribute] operator[SEP] Keyword[final] identifier[HttpHandler] identifier[next] , Keyword[final] identifier[String] identifier[attribute] , Keyword[final] identifier[String] identifier[value] , Keyword[final] identifier[ClassLoader] ident... |
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
// /home/victor/srec/core/src/main/antlr/srec.g:142:2: ( '\"' ( . )* '\"' | '\\'' ( . )* '\\'' )
int alt6=2;
int LA6_0 = input.LA(... | class class_name[name] begin[{]
method[mSTRING, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=STRING, postfix_operators=[], prefix_operators=... | Keyword[public] Keyword[final] Keyword[void] identifier[mSTRING] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[STRING] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TO... |
public void registerProfileReportObserver(IProfileReportObserver observer) {
KernelProfile profile = KernelManager.instance().getProfile(getClass());
synchronized (profile) {
profile.setReportObserver(observer);
}
} | class class_name[name] begin[{]
method[registerProfileReportObserver, return_type[void], modifier[public], parameter[observer]] begin[{]
local_variable[type[KernelProfile], profile]
SYNCHRONIZED[member[.profile]] BEGIN[{]
call[profile.setReportObserver, parameter... | Keyword[public] Keyword[void] identifier[registerProfileReportObserver] operator[SEP] identifier[IProfileReportObserver] identifier[observer] operator[SEP] {
identifier[KernelProfile] identifier[profile] operator[=] identifier[KernelManager] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator... |
public <T extends WeChatBot> void call(T bot, WeChatMessage message) {
if (INVOKED_MSG.contains(message.getId())) {
return;
}
try {
// 自动同意添加好友
if (message.getMsgType() == MsgType.ADD_FRIEND && bot.config().autoAddFriend()) {
bot.api().verify(m... | class class_name[name] begin[{]
method[call, return_type[void], modifier[public], parameter[bot, message]] begin[{]
if[call[INVOKED_MSG.contains, parameter[call[message.getId, parameter[]]]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[WeChatBot] operator[>] Keyword[void] identifier[call] operator[SEP] identifier[T] identifier[bot] , identifier[WeChatMessage] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[INVOKED_MSG] operator[SEP] identifier[conta... |
public static ClassificationDataSet readC(int classification_target, Path path, int lines_to_skip, Set<Integer> cat_cols) throws IOException
{
return readC(classification_target, path, DEFAULT_DELIMITER, lines_to_skip, DEFAULT_COMMENT, cat_cols);
} | class class_name[name] begin[{]
method[readC, return_type[type[ClassificationDataSet]], modifier[public static], parameter[classification_target, path, lines_to_skip, cat_cols]] begin[{]
return[call[.readC, parameter[member[.classification_target], member[.path], member[.DEFAULT_DELIMITER], member[.lin... | Keyword[public] Keyword[static] identifier[ClassificationDataSet] identifier[readC] operator[SEP] Keyword[int] identifier[classification_target] , identifier[Path] identifier[path] , Keyword[int] identifier[lines_to_skip] , identifier[Set] operator[<] identifier[Integer] operator[>] identifier[cat_cols] operator[SEP... |
public BufferedImage getImage (String rset, String path, Colorization[] zations)
{
if (StringUtil.isBlank(path)) {
String errmsg = "Invalid image path [rset=" + rset + ", path=" + path + "]";
throw new IllegalArgumentException(errmsg);
}
return getImage(getImageKey(rs... | class class_name[name] begin[{]
method[getImage, return_type[type[BufferedImage]], modifier[public], parameter[rset, path, zations]] begin[{]
if[call[StringUtil.isBlank, parameter[member[.path]]]] begin[{]
local_variable[type[String], errmsg]
ThrowStatement(expression=Cl... | Keyword[public] identifier[BufferedImage] identifier[getImage] operator[SEP] identifier[String] identifier[rset] , identifier[String] identifier[path] , identifier[Colorization] operator[SEP] operator[SEP] identifier[zations] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identi... |
@Override
public void removeByGroupId(long groupId) {
for (CPDefinitionOptionRel cpDefinitionOptionRel : findByGroupId(
groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(cpDefinitionOptionRel);
}
} | class class_name[name] begin[{]
method[removeByGroupId, return_type[void], modifier[public], parameter[groupId]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cpDefinitionOptionRel, postfix_operators=[... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByGroupId] operator[SEP] Keyword[long] identifier[groupId] operator[SEP] {
Keyword[for] operator[SEP] identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[:] identifier[findByGroupId] operator[SEP] identifi... |
@SuppressWarnings("unchecked")
public static void validate_ids(StormTopology topology, String topologyId) throws InvalidTopologyException {
String topologyName = topologyIdToName(topologyId);
if (!charValidate(topologyName)) {
throw new InvalidTopologyException(topologyName + " is not a ... | class class_name[name] begin[{]
method[validate_ids, return_type[void], modifier[public static], parameter[topology, topologyId]] begin[{]
local_variable[type[String], topologyName]
if[call[.charValidate, parameter[member[.topologyName]]]] begin[{]
ThrowStatement(expression=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[validate_ids] operator[SEP] identifier[StormTopology] identifier[topology] , identifier[String] identifier[topologyId] operator[SEP] Keyword[throws] identifier[InvalidTopology... |
public void registerAppRoot(String configureFileName) throws Exception {
try {
AppConfigureCollection existedAppConfigureFiles = (AppConfigureCollection) containerWrapper.lookup(AppConfigureCollection.NAME);
if (existedAppConfigureFiles == null) {
xmlcontainerRegistry.registerAppRoot();
existedAppC... | class class_name[name] begin[{]
method[registerAppRoot, return_type[void], modifier[public], parameter[configureFileName]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberR... | Keyword[public] Keyword[void] identifier[registerAppRoot] operator[SEP] identifier[String] identifier[configureFileName] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[try] {
identifier[AppConfigureCollection] identifier[existedAppConfigureFiles] operator[=] operator[SEP] identifier[App... |
public void saveAs(final File file) throws IOException {
try {
final FileOutputStream out = new FileOutputStream(file);
try {
this.save(out);
} finally {
out.flush();
out.close();
}
} catch (final Fi... | class class_name[name] begin[{]
method[saveAs, return_type[void], modifier[public], parameter[file]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[]... | Keyword[public] Keyword[void] identifier[saveAs] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[final] identifier[FileOutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutputStream] opera... |
public OvhMailDomain2Service fax_customDomains_POST(String domain) throws IOException {
String qPath = "/me/fax/customDomains";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "domain", domain);
String resp = exec(qPath, "POST", sb.toString(), o);
return ... | class class_name[name] begin[{]
method[fax_customDomains_POST, return_type[type[OvhMailDomain2Service]], modifier[public], parameter[domain]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[HashMap], o]
call[.addBo... | Keyword[public] identifier[OvhMailDomain2Service] identifier[fax_customDomains_POST] operator[SEP] identifier[String] identifier[domain] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.