code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Nonnull
public static FileIOError copyDirRecursive (@Nonnull final File aSourceDir, @Nonnull final File aTargetDir)
{
ValueEnforcer.notNull (aSourceDir, "SourceDirectory");
ValueEnforcer.notNull (aTargetDir, "TargetDirectory");
// Does the source directory exist?
if (!FileHelper.existsDir (aSource... | class class_name[name] begin[{]
method[copyDirRecursive, return_type[type[FileIOError]], modifier[public static], parameter[aSourceDir, aTargetDir]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aSourceDir], literal["SourceDirectory"]]]
call[ValueEnforcer.notNull, param... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[FileIOError] identifier[copyDirRecursive] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[File] identifier[aSourceDir] , annotation[@] identifier[Nonnull] Keyword[final] identifier[File] identifier[aTargetDir] operat... |
public String restart(ZMsg hot)
{
ZMsg msg = new ZMsg();
msg.add(RESTART);
final boolean cold = hot == null;
if (cold) {
msg.add(Boolean.toString(false));
}
else {
msg.add(Boolean.toString(true));
msg.append(hot);
}
... | class class_name[name] begin[{]
method[restart, return_type[type[String]], modifier[public], parameter[hot]] begin[{]
local_variable[type[ZMsg], msg]
call[msg.add, parameter[member[.RESTART]]]
local_variable[type[boolean], cold]
if[member[.cold]] begin[{]
... | Keyword[public] identifier[String] identifier[restart] operator[SEP] identifier[ZMsg] identifier[hot] operator[SEP] {
identifier[ZMsg] identifier[msg] operator[=] Keyword[new] identifier[ZMsg] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[add] operator[SEP] identifier[RESTART... |
public static boolean isAdmin(IPerson p) {
IAuthorizationPrincipal iap =
AuthorizationServiceFacade.instance()
.newPrincipal(
p.getEntityIdentifier().getKey(),
p.getEntityIdentifier().getType());
ret... | class class_name[name] begin[{]
method[isAdmin, return_type[type[boolean]], modifier[public static], parameter[p]] begin[{]
local_variable[type[IAuthorizationPrincipal], iap]
return[call[.isAdmin, parameter[member[.iap]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isAdmin] operator[SEP] identifier[IPerson] identifier[p] operator[SEP] {
identifier[IAuthorizationPrincipal] identifier[iap] operator[=] identifier[AuthorizationServiceFacade] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] ... |
private void deleteInternal(List<FileInfo> itemsToDelete, List<FileInfo> bucketsToDelete)
throws IOException {
// TODO(user): We might need to separate out children into separate batches from parents to
// avoid deleting a parent before somehow failing to delete a child.
// Delete children before the... | class class_name[name] begin[{]
method[deleteInternal, return_type[void], modifier[private], parameter[itemsToDelete, bucketsToDelete]] begin[{]
call[itemsToDelete.sort, parameter[call[FILE_INFO_PATH_COMPARATOR.reversed, parameter[]]]]
if[call[itemsToDelete.isEmpty, parameter[]]... | Keyword[private] Keyword[void] identifier[deleteInternal] operator[SEP] identifier[List] operator[<] identifier[FileInfo] operator[>] identifier[itemsToDelete] , identifier[List] operator[<] identifier[FileInfo] operator[>] identifier[bucketsToDelete] operator[SEP] Keyword[throws] identifier[IOException] {
iden... |
public void update(final double datum) {
final double d = (datum == 0.0) ? 0.0 : datum; // canonicalize -0.0, 0.0
final long[] data = { Double.doubleToLongBits(d) };// canonicalize all NaN forms
final long[] arr = hash(data, seed);
hashUpdate(arr[0], arr[1]);
} | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[datum]] begin[{]
local_variable[type[double], d]
local_variable[type[long], data]
local_variable[type[long], arr]
call[.hashUpdate, parameter[member[.arr], member[.arr]]]
en... | Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[final] Keyword[double] identifier[datum] operator[SEP] {
Keyword[final] Keyword[double] identifier[d] operator[=] operator[SEP] identifier[datum] operator[==] literal[Float] operator[SEP] operator[?] literal[Float] operator[:] identifier[dat... |
@JsonValue
public CharSequence render()
{
if (statement == null)
{
statement = new StringBuilder();
statement.append("function(");
statement.append(scopeContext.scopeDeclaration());
statement.append(") {\n");
execute(scopeContext);
statement.append(scopeContext.render());
closeScope();
}
... | class class_name[name] begin[{]
method[render, return_type[type[CharSequence]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.statement], ==, literal[null]]] begin[{]
assign[member[.statement], ClassCreator(arguments=[], body=None, constructor_type_... | annotation[@] identifier[JsonValue] Keyword[public] identifier[CharSequence] identifier[render] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[statement] operator[==] Other[null] operator[SEP] {
identifier[statement] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] ... |
public DescribeAutoScalingGroupsRequest withAutoScalingGroupNames(String... autoScalingGroupNames) {
if (this.autoScalingGroupNames == null) {
setAutoScalingGroupNames(new com.amazonaws.internal.SdkInternalList<String>(autoScalingGroupNames.length));
}
for (String ele : autoScalingGr... | class class_name[name] begin[{]
method[withAutoScalingGroupNames, return_type[type[DescribeAutoScalingGroupsRequest]], modifier[public], parameter[autoScalingGroupNames]] begin[{]
if[binary_operation[THIS[member[None.autoScalingGroupNames]], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[DescribeAutoScalingGroupsRequest] identifier[withAutoScalingGroupNames] operator[SEP] identifier[String] operator[...] identifier[autoScalingGroupNames] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[autoScalingGroupNames] operator[==] Other[null] oper... |
public void setRuntimeInfoFactory(String className) {
Object objectInstance;
try {
objectInstance = Class.forName(className).newInstance();
} catch (Throwable t) {
LOG.error(Messages.get().getBundle().key(Messages.LOG_CLASS_INIT_FAILURE_1, className), t);
re... | class class_name[name] begin[{]
method[setRuntimeInfoFactory, return_type[void], modifier[public], parameter[className]] begin[{]
local_variable[type[Object], objectInstance]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectInstance, postfix... | Keyword[public] Keyword[void] identifier[setRuntimeInfoFactory] operator[SEP] identifier[String] identifier[className] operator[SEP] {
identifier[Object] identifier[objectInstance] operator[SEP] Keyword[try] {
identifier[objectInstance] operator[=] identifier[Class] operator[SEP] identifier[forName] o... |
public void marshall(CreateGameSessionRequest createGameSessionRequest, ProtocolMarshaller protocolMarshaller) {
if (createGameSessionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createG... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createGameSessionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createGameSessionRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateGameSessionRequest] identifier[createGameSessionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createGameSessionRequest] operator[==] Other[null] opera... |
private void getDirPropsMemory(boolean mayAllocate, int len)
{
Object array = getMemory("DirProps", dirPropsMemory, Byte.TYPE, mayAllocate, len);
dirPropsMemory = (byte[]) array;
} | class class_name[name] begin[{]
method[getDirPropsMemory, return_type[void], modifier[private], parameter[mayAllocate, len]] begin[{]
local_variable[type[Object], array]
assign[member[.dirPropsMemory], Cast(expression=MemberReference(member=array, postfix_operators=[], prefix_operators=... | Keyword[private] Keyword[void] identifier[getDirPropsMemory] operator[SEP] Keyword[boolean] identifier[mayAllocate] , Keyword[int] identifier[len] operator[SEP] {
identifier[Object] identifier[array] operator[=] identifier[getMemory] operator[SEP] literal[String] , identifier[dirPropsMemory] , identifier[Byte... |
public static void pack(ZipEntrySource[] entries, OutputStream os) {
if (log.isDebugEnabled()) {
log.debug("Creating stream from {}.", Arrays.asList(entries));
}
pack(entries, os, false);
} | class class_name[name] begin[{]
method[pack, return_type[void], modifier[public static], parameter[entries, os]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[literal["Creating stream from {}."], call[Arrays.asList, parameter[membe... | Keyword[public] Keyword[static] Keyword[void] identifier[pack] operator[SEP] identifier[ZipEntrySource] operator[SEP] operator[SEP] identifier[entries] , identifier[OutputStream] identifier[os] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] opera... |
public void startMcGregorIteration(int largestMappingSize, List<Integer> cliqueVector,
List<Integer> compGraphNodes) throws IOException {
this.globalMCSSize = (largestMappingSize / 2);
List<String> cTab1Copy = McGregorChecks.generateCTabCopy(source);
List<String> cTab2Copy = McGrego... | class class_name[name] begin[{]
method[startMcGregorIteration, return_type[void], modifier[public], parameter[largestMappingSize, cliqueVector, compGraphNodes]] begin[{]
assign[THIS[member[None.globalMCSSize]], binary_operation[member[.largestMappingSize], /, literal[2]]]
local_variable... | Keyword[public] Keyword[void] identifier[startMcGregorIteration] operator[SEP] Keyword[int] identifier[largestMappingSize] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[cliqueVector] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[compGraphNodes] operator[SEP] Key... |
public Bits concatenate(final Bits right) {
final int newBitLength = this.bitLength + right.bitLength;
final int newByteLength = (int) Math.ceil(newBitLength / 8.);
final Bits result = new Bits(new byte[newByteLength], newBitLength);
shiftLeft(this.bytes, 0, result.bytes);
shiftRight(right.bytes, th... | class class_name[name] begin[{]
method[concatenate, return_type[type[Bits]], modifier[public], parameter[right]] begin[{]
local_variable[type[int], newBitLength]
local_variable[type[int], newByteLength]
local_variable[type[Bits], result]
call[.shiftLeft, parameter[THIS[m... | Keyword[public] identifier[Bits] identifier[concatenate] operator[SEP] Keyword[final] identifier[Bits] identifier[right] operator[SEP] {
Keyword[final] Keyword[int] identifier[newBitLength] operator[=] Keyword[this] operator[SEP] identifier[bitLength] operator[+] identifier[right] operator[SEP] identifier[bitLen... |
public WorkUnit createWorkUnit(SubTask execUnit) {
WorkUnit wu = new WorkUnit(this, execUnit);
workUnits.add(wu);
return wu;
} | class class_name[name] begin[{]
method[createWorkUnit, return_type[type[WorkUnit]], modifier[public], parameter[execUnit]] begin[{]
local_variable[type[WorkUnit], wu]
call[workUnits.add, parameter[member[.wu]]]
return[member[.wu]]
end[}]
END[}] | Keyword[public] identifier[WorkUnit] identifier[createWorkUnit] operator[SEP] identifier[SubTask] identifier[execUnit] operator[SEP] {
identifier[WorkUnit] identifier[wu] operator[=] Keyword[new] identifier[WorkUnit] operator[SEP] Keyword[this] , identifier[execUnit] operator[SEP] operator[SEP] identifier[workU... |
public T parse(
CharSequence text,
ParseLog status
) {
int start = status.getPosition();
for (int i = 0; i < this.parsers.length; i++) {
status.reset(); // initialization
status.setPosition(start);
// use the default global attributes of every s... | class class_name[name] begin[{]
method[parse, return_type[type[T]], modifier[public], parameter[text, status]] begin[{]
local_variable[type[int], start]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_o... | Keyword[public] identifier[T] identifier[parse] operator[SEP] identifier[CharSequence] identifier[text] , identifier[ParseLog] identifier[status] operator[SEP] {
Keyword[int] identifier[start] operator[=] identifier[status] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[... |
private Object syncPutIntoBucket(FastSyncHashBucket hb, FastSyncHashEntry newEntry) {
FastSyncHashEntry e = null;
FastSyncHashEntry last = null;
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "syncPutIntoBucket");
}
synchronized (hb) {... | class class_name[name] begin[{]
method[syncPutIntoBucket, return_type[type[Object]], modifier[private], parameter[hb, newEntry]] begin[{]
local_variable[type[FastSyncHashEntry], e]
local_variable[type[FastSyncHashEntry], last]
if[binary_operation[call[TraceComponent.isAnyTracing... | Keyword[private] identifier[Object] identifier[syncPutIntoBucket] operator[SEP] identifier[FastSyncHashBucket] identifier[hb] , identifier[FastSyncHashEntry] identifier[newEntry] operator[SEP] {
identifier[FastSyncHashEntry] identifier[e] operator[=] Other[null] operator[SEP] identifier[FastSyncHashEntry] ident... |
public int prepare() throws ProtocolException, RollbackException, SeverePersistenceException, TransactionException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "prepare");
// Check the current transaction state (use state lock to ensure we see the latest ... | class class_name[name] begin[{]
method[prepare, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], member[.... | Keyword[public] Keyword[int] identifier[prepare] operator[SEP] operator[SEP] Keyword[throws] identifier[ProtocolException] , identifier[RollbackException] , identifier[SeverePersistenceException] , identifier[TransactionException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier... |
public StreamPlan transferRanges(InetAddress to, InetAddress connecting, String keyspace, Collection<Range<Token>> ranges, String... columnFamilies)
{
StreamSession session = coordinator.getOrCreateNextSession(to, connecting);
session.addTransferRanges(keyspace, ranges, Arrays.asList(columnFamilies)... | class class_name[name] begin[{]
method[transferRanges, return_type[type[StreamPlan]], modifier[public], parameter[to, connecting, keyspace, ranges, columnFamilies]] begin[{]
local_variable[type[StreamSession], session]
call[session.addTransferRanges, parameter[member[.keyspace], member[... | Keyword[public] identifier[StreamPlan] identifier[transferRanges] operator[SEP] identifier[InetAddress] identifier[to] , identifier[InetAddress] identifier[connecting] , identifier[String] identifier[keyspace] , identifier[Collection] operator[<] identifier[Range] operator[<] identifier[Token] operator[>] operator[>... |
public S findScript(String name) throws E {
if (MetaClass.NO_CACHE)
return loadScript(name);
else
return scripts.getUnchecked(name).get();
} | class class_name[name] begin[{]
method[findScript, return_type[type[S]], modifier[public], parameter[name]] begin[{]
if[member[MetaClass.NO_CACHE]] begin[{]
return[call[.loadScript, parameter[member[.name]]]]
else begin[{]
return[call[scripts.getUnchecked, parameter[member[.name]]]]
... | Keyword[public] identifier[S] identifier[findScript] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[E] {
Keyword[if] operator[SEP] identifier[MetaClass] operator[SEP] identifier[NO_CACHE] operator[SEP] Keyword[return] identifier[loadScript] operator[SEP] identifier[nam... |
public void markAsVisited(final Field field) {
final OneOf oneOfAnnotation = field.getAnnotation(OneOf.class);
if (oneOfAnnotation != null) {
final OneOfGroup oneOfGroup = this.mapping.get(oneOfAnnotation.value());
oneOfGroup.satisfiedBy.add(new OneOfSatisfier(field, false));
... | class class_name[name] begin[{]
method[markAsVisited, return_type[void], modifier[public], parameter[field]] begin[{]
local_variable[type[OneOf], oneOfAnnotation]
if[binary_operation[member[.oneOfAnnotation], !=, literal[null]]] begin[{]
local_variable[type[OneOfGroup], oneO... | Keyword[public] Keyword[void] identifier[markAsVisited] operator[SEP] Keyword[final] identifier[Field] identifier[field] operator[SEP] {
Keyword[final] identifier[OneOf] identifier[oneOfAnnotation] operator[=] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[OneOf] operator[SEP]... |
public static <T extends Extendable> List<T> group(final List<T> values, final Group[] groups) {
final SortableList<T> list = getSortableList(values);
final GroupStrategy strategy = new GroupStrategy();
for (int i = groups.length - 1; i >= 0; i--) {
list.sortOnProperty(groups[i], tru... | class class_name[name] begin[{]
method[group, return_type[type[List]], modifier[public static], parameter[values, groups]] begin[{]
local_variable[type[SortableList], list]
local_variable[type[GroupStrategy], strategy]
ForStatement(body=BlockStatement(label=None, statements=[StatementEx... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Extendable] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[group] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[T] operator[>] identifier[values] , Keyword[final] identifier[Group... |
private String destroyAs(String[] args) throws Exception {
if (args.length < 4) {
return M3UAOAMMessages.INVALID_COMMAND;
}
String asName = args[3];
if (asName == null) {
return M3UAOAMMessages.INVALID_COMMAND;
}
String m3uaStackName = null;
... | class class_name[name] begin[{]
method[destroyAs, return_type[type[String]], modifier[private], parameter[args]] begin[{]
if[binary_operation[member[args.length], <, literal[4]]] begin[{]
return[member[M3UAOAMMessages.INVALID_COMMAND]]
else begin[{]
None
end[}]
... | Keyword[private] identifier[String] identifier[destroyAs] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[<] Other[4] operator[SEP] {
... |
public Object encode(Object object) throws EncoderException {
try {
byte[] byteArray = object instanceof String ? ((String) object).getBytes() : (byte[]) object;
return encodeHex(byteArray);
} catch (ClassCastException e) {
throw new EncoderException(e.getMessage());
}
} | class class_name[name] begin[{]
method[encode, return_type[type[Object]], modifier[public], parameter[object]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberRefe... | Keyword[public] identifier[Object] identifier[encode] operator[SEP] identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[EncoderException] {
Keyword[try] {
Keyword[byte] operator[SEP] operator[SEP] identifier[byteArray] operator[=] identifier[object] Keyword[instanceof] ident... |
public ConstantField createConstantField(Class<?> container, String field, Constant annot)
throws ConstantException {
Class<?> type;
try {
type = container.getField(field).getType();
} catch (NoSuchFieldException e) {
throw new ConstantException("Cannot find ... | class class_name[name] begin[{]
method[createConstantField, return_type[type[ConstantField]], modifier[public], parameter[container, field, annot]] begin[{]
local_variable[type[Class], type]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, p... | Keyword[public] identifier[ConstantField] identifier[createConstantField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[container] , identifier[String] identifier[field] , identifier[Constant] identifier[annot] operator[SEP] Keyword[throws] identifier[ConstantException] {
ident... |
private int findIndexOfFrom(String query) {
if (query.startsWith("from")) return 0;
int fromIdx = query.indexOf(" from ");
if (-1 == fromIdx) return -1;
final int first = query.substring(0, fromIdx).indexOf("(");
if (first > 0) {
int leftCnt = 1;
int i = first + 1;
while (leftCnt !... | class class_name[name] begin[{]
method[findIndexOfFrom, return_type[type[int]], modifier[private], parameter[query]] begin[{]
if[call[query.startsWith, parameter[literal["from"]]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
local_variable[type[int], fromIdx]
... | Keyword[private] Keyword[int] identifier[findIndexOfFrom] operator[SEP] identifier[String] identifier[query] operator[SEP] {
Keyword[if] operator[SEP] identifier[query] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[in... |
public Observable<WorkflowRunActionRepetitionDefinitionCollectionInner> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) {
return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<WorkflowRunActionRepetitio... | class class_name[name] begin[{]
method[listAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workflowName, runName, actionName]] begin[{]
return[call[.listWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.workflowName], member[.runName], member[.... | Keyword[public] identifier[Observable] operator[<] identifier[WorkflowRunActionRepetitionDefinitionCollectionInner] operator[>] identifier[listAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workflowName] , identifier[String] identifier[runName] , identifier[Stri... |
public static List<CommercePriceList> findByCommerceCurrencyId(
long commerceCurrencyId, int start, int end,
OrderByComparator<CommercePriceList> orderByComparator) {
return getPersistence()
.findByCommerceCurrencyId(commerceCurrencyId, start, end,
orderByComparator);
} | class class_name[name] begin[{]
method[findByCommerceCurrencyId, return_type[type[List]], modifier[public static], parameter[commerceCurrencyId, start, end, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommercePriceList] operator[>] identifier[findByCommerceCurrencyId] operator[SEP] Keyword[long] identifier[commerceCurrencyId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[OrderByComparator] operator[<] identifier... |
@Override
public Object set(int index, Object obj) {
State state = isState(obj);
return set(index, obj, state);
} | class class_name[name] begin[{]
method[set, return_type[type[Object]], modifier[public], parameter[index, obj]] begin[{]
local_variable[type[State], state]
return[call[.set, parameter[member[.index], member[.obj], member[.state]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[Object] identifier[obj] operator[SEP] {
identifier[State] identifier[state] operator[=] identifier[isState] operator[SEP] identifier[obj] operator[SEP] operator[SEP] Ke... |
protected String getDiagramResourceForDefinition(DeploymentEntity deployment, String resourceName, DefinitionEntity definition, Map<String, ResourceEntity> resources) {
for (String diagramSuffix: getDiagramSuffixes()) {
String definitionDiagramResource = getDefinitionDiagramResourceName(resourceName, definiti... | class class_name[name] begin[{]
method[getDiagramResourceForDefinition, return_type[type[String]], modifier[protected], parameter[deployment, resourceName, definition, resources]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[Var... | Keyword[protected] identifier[String] identifier[getDiagramResourceForDefinition] operator[SEP] identifier[DeploymentEntity] identifier[deployment] , identifier[String] identifier[resourceName] , identifier[DefinitionEntity] identifier[definition] , identifier[Map] operator[<] identifier[String] , identifier[Resour... |
private ResolvedViewable resolve(final Viewable viewable,
final List<MediaType> mediaTypes,
final Class<?> resolvingClass,
final ViewableContext viewableContext,
final Set<... | class class_name[name] begin[{]
method[resolve, return_type[type[ResolvedViewable]], modifier[private], parameter[viewable, mediaTypes, resolvingClass, viewableContext, templateProcessors]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, st... | Keyword[private] identifier[ResolvedViewable] identifier[resolve] operator[SEP] Keyword[final] identifier[Viewable] identifier[viewable] , Keyword[final] identifier[List] operator[<] identifier[MediaType] operator[>] identifier[mediaTypes] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identif... |
public String varNameToOpName(String varName){
int idx = varName.lastIndexOf(':');
if(idx < 0)
return varName;
return varName.substring(0, idx);
} | class class_name[name] begin[{]
method[varNameToOpName, return_type[type[String]], modifier[public], parameter[varName]] begin[{]
local_variable[type[int], idx]
if[binary_operation[member[.idx], <, literal[0]]] begin[{]
return[member[.varName]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[String] identifier[varNameToOpName] operator[SEP] identifier[String] identifier[varName] operator[SEP] {
Keyword[int] identifier[idx] operator[=] identifier[varName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP... |
private MBeanParameterInfo[] getMatchingSignature(List<String> pTypes, List<MBeanParameterInfo[]> pParamInfos) {
OUTER:
for (MBeanParameterInfo[] infos : pParamInfos) {
if (infos.length == 0 && pTypes.size() == 0) {
// No-arg argument
return infos;
... | class class_name[name] begin[{]
method[getMatchingSignature, return_type[type[MBeanParameterInfo]], modifier[private], parameter[pTypes, pParamInfos]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReferenc... | Keyword[private] identifier[MBeanParameterInfo] operator[SEP] operator[SEP] identifier[getMatchingSignature] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[pTypes] , identifier[List] operator[<] identifier[MBeanParameterInfo] operator[SEP] operator[SEP] operator[>] identifier[pPar... |
public final ProtoParser.service_block_return service_block(Proto proto, Message message) throws RecognitionException {
ProtoParser.service_block_return retval = new ProtoParser.service_block_return();
retval.start = input.LT(1);
Object root_0 = null;
Token SERVICE137=null;
Tok... | class class_name[name] begin[{]
method[service_block, return_type[type[ProtoParser]], modifier[final public], parameter[proto, message]] begin[{]
local_variable[type[ProtoParser], retval]
assign[member[retval.start], call[input.LT, parameter[literal[1]]]]
local_variable[type[Obj... | Keyword[public] Keyword[final] identifier[ProtoParser] operator[SEP] identifier[service_block_return] identifier[service_block] operator[SEP] identifier[Proto] identifier[proto] , identifier[Message] identifier[message] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[ProtoParser] ope... |
@Nonnull
public PSExtends readExtendsFromXML (@Nonnull final IMicroElement eExtends)
{
final PSExtends ret = new PSExtends ();
eExtends.forAllAttributes ( (sNS, sAttrName, sVal) -> {
final String sAttrValue = _getAttributeValue (sVal);
if (sAttrName.equals (CSchematronXML.ATTR_RULE))
re... | class class_name[name] begin[{]
method[readExtendsFromXML, return_type[type[PSExtends]], modifier[public], parameter[eExtends]] begin[{]
local_variable[type[PSExtends], ret]
call[eExtends.forAllAttributes, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declara... | annotation[@] identifier[Nonnull] Keyword[public] identifier[PSExtends] identifier[readExtendsFromXML] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IMicroElement] identifier[eExtends] operator[SEP] {
Keyword[final] identifier[PSExtends] identifier[ret] operator[=] Keyword[new] identi... |
public static Annotation[] getResourcesAnnotations(Method method) {
Map<Class<?>, Annotation> annotations = new HashMap<Class<?>, Annotation>();
for (Annotation annotation : method.getDeclaringClass().getAnnotations()) {
annotations.put(annotation.getClass(), annotation);
}
f... | class class_name[name] begin[{]
method[getResourcesAnnotations, return_type[type[Annotation]], modifier[public static], parameter[method]] begin[{]
local_variable[type[Map], annotations]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arg... | Keyword[public] Keyword[static] identifier[Annotation] operator[SEP] operator[SEP] identifier[getResourcesAnnotations] operator[SEP] identifier[Method] identifier[method] operator[SEP] {
identifier[Map] operator[<] identifier[Class] operator[<] operator[?] operator[>] , identifier[Annotation] operator[>] identi... |
public static boolean isInternationalPhoneNumber(String s) {
if (isEmpty(s)) return defaultEmptyOK;
String normalizedPhone = stripCharsInBag(s, phoneNumberDelimiters);
return isPositiveInteger(normalizedPhone);
} | class class_name[name] begin[{]
method[isInternationalPhoneNumber, return_type[type[boolean]], modifier[public static], parameter[s]] begin[{]
if[call[.isEmpty, parameter[member[.s]]]] begin[{]
return[member[.defaultEmptyOK]]
else begin[{]
None
end[}]
local_variable[type... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isInternationalPhoneNumber] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] identifier[defaultEmptyOK] operator[SEP] ide... |
public static TransactionEdit createInvalid(long writePointer) {
return new TransactionEdit(writePointer, 0L, State.INVALID, 0L, null, 0L, false, null, null, 0L, 0L, null);
} | class class_name[name] begin[{]
method[createInvalid, return_type[type[TransactionEdit]], modifier[public static], parameter[writePointer]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=writePointer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_... | Keyword[public] Keyword[static] identifier[TransactionEdit] identifier[createInvalid] operator[SEP] Keyword[long] identifier[writePointer] operator[SEP] {
Keyword[return] Keyword[new] identifier[TransactionEdit] operator[SEP] identifier[writePointer] , Other[0L] , identifier[State] operator[SEP] identifier[INV... |
public ShortToken visitShort(EditsElement e) throws IOException {
return (ShortToken)visit(tokenizer.read(new ShortToken(e)));
} | class class_name[name] begin[{]
method[visitShort, return_type[type[ShortToken]], modifier[public], parameter[e]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifie... | Keyword[public] identifier[ShortToken] identifier[visitShort] operator[SEP] identifier[EditsElement] identifier[e] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] operator[SEP] identifier[ShortToken] operator[SEP] identifier[visit] operator[SEP] identifier[tokenizer] operator[SEP] identif... |
public void setIndexAttachments(java.util.Collection<IndexAttachment> indexAttachments) {
if (indexAttachments == null) {
this.indexAttachments = null;
return;
}
this.indexAttachments = new java.util.ArrayList<IndexAttachment>(indexAttachments);
} | class class_name[name] begin[{]
method[setIndexAttachments, return_type[void], modifier[public], parameter[indexAttachments]] begin[{]
if[binary_operation[member[.indexAttachments], ==, literal[null]]] begin[{]
assign[THIS[member[None.indexAttachments]], literal[null]]
... | Keyword[public] Keyword[void] identifier[setIndexAttachments] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[IndexAttachment] operator[>] identifier[indexAttachments] operator[SEP] {
Keyword[if] operator[SEP] identifier[indexAttachments] ... |
@Override
public T select(Object item) {
if (item == null) {
return null;
}
if (itemClass.isInstance(item)) {
return itemClass.cast(item);
}
logger.debug("item [{}] is not assignable to class [{}], returning null", item, itemClass);
return null;
} | class class_name[name] begin[{]
method[select, return_type[type[T]], modifier[public], parameter[item]] begin[{]
if[binary_operation[member[.item], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[call[itemClass.isInstan... | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[select] operator[SEP] identifier[Object] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[item] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if... |
public static void updateFileFromUrl(final String sourceUrl, final String destinationFilePath,
final String username, final String password) throws
UpdateException {
updateFileFromUrl(sourceUrl, destinationFilePath, username, password, URLFileUpdater.factory());
... | class class_name[name] begin[{]
method[updateFileFromUrl, return_type[void], modifier[public static], parameter[sourceUrl, destinationFilePath, username, password]] begin[{]
call[.updateFileFromUrl, parameter[member[.sourceUrl], member[.destinationFilePath], member[.username], member[.password]... | Keyword[public] Keyword[static] Keyword[void] identifier[updateFileFromUrl] operator[SEP] Keyword[final] identifier[String] identifier[sourceUrl] , Keyword[final] identifier[String] identifier[destinationFilePath] , Keyword[final] identifier[String] identifier[username] , Keyword[final] identifier[String] identifier... |
private static final void divmod(byte[] q, byte[] r, int n, byte[] d, int t) {
int rn = 0;
int dt = ((d[t-1] & 0xFF) << 8);
if (t>1) {
dt |= (d[t-2] & 0xFF);
}
while (n-- >= t) {
int z = (rn << 16) | ((r[n] & 0xFF) << 8);
if (n>0) {
z |= (r[n-1] & 0xFF);
}
z/=dt;
rn += mula_small(r,r, n-... | class class_name[name] begin[{]
method[divmod, return_type[void], modifier[final private static], parameter[q, r, n, d, t]] begin[{]
local_variable[type[int], rn]
local_variable[type[int], dt]
if[binary_operation[member[.t], >, literal[1]]] begin[{]
assig... | Keyword[private] Keyword[static] Keyword[final] Keyword[void] identifier[divmod] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[q] , Keyword[byte] operator[SEP] operator[SEP] identifier[r] , Keyword[int] identifier[n] , Keyword[byte] operator[SEP] operator[SEP] identifier[d] , Keyword[int] ident... |
public ServiceFuture<LoadBalancerInner> updateTagsAsync(String resourceGroupName, String loadBalancerName, Map<String, String> tags, final ServiceCallback<LoadBalancerInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), servic... | class class_name[name] begin[{]
method[updateTagsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, loadBalancerName, tags, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.updateTagsWithServiceResponseAsync, parameter[member[.resou... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[LoadBalancerInner] operator[>] identifier[updateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[loadBalancerName] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>... |
public static <S, N extends Node<?,S,N>> List<S> recoverStatePath(N node){
List<S> states = new LinkedList<S>();
for(N n : node.path()){
states.add(n.state());
}
return states;
} | class class_name[name] begin[{]
method[recoverStatePath, return_type[type[List]], modifier[public static], parameter[node]] begin[{]
local_variable[type[List], states]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvoc... | Keyword[public] Keyword[static] operator[<] identifier[S] , identifier[N] Keyword[extends] identifier[Node] operator[<] operator[?] , identifier[S] , identifier[N] operator[>] operator[>] identifier[List] operator[<] identifier[S] operator[>] identifier[recoverStatePath] operator[SEP] identifier[N] identifier[node] ... |
private Group get_group_i(final String n, final boolean fwd) {
final GroupElement e = find_i(n, fwd);
return e != null && e instanceof Group ? (Group) e : null;
} | class class_name[name] begin[{]
method[get_group_i, return_type[type[Group]], modifier[private], parameter[n, fwd]] begin[{]
local_variable[type[GroupElement], e]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[],... | Keyword[private] identifier[Group] identifier[get_group_i] operator[SEP] Keyword[final] identifier[String] identifier[n] , Keyword[final] Keyword[boolean] identifier[fwd] operator[SEP] {
Keyword[final] identifier[GroupElement] identifier[e] operator[=] identifier[find_i] operator[SEP] identifier[n] , identifie... |
public int skip(int maxSize) {
int s = maxSize;
while (hasRemaining()) {
ByteBuf buf = bufs[first];
int remaining = buf.readRemaining();
if (s < remaining) {
buf.moveHead(s);
return maxSize;
} else {
buf.recycle();
first = next(first);
s -= remaining;
}
}
return maxSize - s;
... | class class_name[name] begin[{]
method[skip, return_type[type[int]], modifier[public], parameter[maxSize]] begin[{]
local_variable[type[int], s]
while[call[.hasRemaining, parameter[]]] begin[{]
local_variable[type[ByteBuf], buf]
local_variable[type[int], remainin... | Keyword[public] Keyword[int] identifier[skip] operator[SEP] Keyword[int] identifier[maxSize] operator[SEP] {
Keyword[int] identifier[s] operator[=] identifier[maxSize] operator[SEP] Keyword[while] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] {
identifier[ByteBuf] id... |
private String toSQLPattern(String attribute) {
String pattern = attribute.replace("*", "%");
if (!pattern.startsWith("%")) {
pattern = "%" + pattern;
}
if (!pattern.endsWith("%")) {
pattern = pattern.concat("%");
}
return pattern;
} | class class_name[name] begin[{]
method[toSQLPattern, return_type[type[String]], modifier[private], parameter[attribute]] begin[{]
local_variable[type[String], pattern]
if[call[pattern.startsWith, parameter[literal["%"]]]] begin[{]
assign[member[.pattern], binary_... | Keyword[private] identifier[String] identifier[toSQLPattern] operator[SEP] identifier[String] identifier[attribute] operator[SEP] {
identifier[String] identifier[pattern] operator[=] identifier[attribute] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SE... |
@Nullable
public String encodeURL (@Nullable final String sUrl)
{
if (StringHelper.hasText (m_sEncodeUrlSuffix))
return StringHelper.getNotNull (sUrl) + m_sEncodeUrlSuffix;
return sUrl;
} | class class_name[name] begin[{]
method[encodeURL, return_type[type[String]], modifier[public], parameter[sUrl]] begin[{]
if[call[StringHelper.hasText, parameter[member[.m_sEncodeUrlSuffix]]]] begin[{]
return[binary_operation[call[StringHelper.getNotNull, parameter[member[.sUrl]]], +, member[.m_... | annotation[@] identifier[Nullable] Keyword[public] identifier[String] identifier[encodeURL] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sUrl] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringHelper] operator[SEP] identifier[hasText] operator[SEP] identi... |
@SuppressWarnings("unchecked")
public <T> T fromJson(String json, Type typeOfT) throws JsonSyntaxException {
if (json == null) {
return null;
}
StringReader reader = new StringReader(json);
T target = (T) fromJson(reader, typeOfT);
return target;
} | class class_name[name] begin[{]
method[fromJson, return_type[type[T]], modifier[public], parameter[json, typeOfT]] begin[{]
if[binary_operation[member[.json], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[Str... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[fromJson] operator[SEP] identifier[String] identifier[json] , identifier[Type] identifier[typeOfT] operator[SEP] Keyword[throws] identifier[JsonSyntaxExc... |
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "no npe in getters")
public CreateContainerCmd fillContainerConfig(CreateContainerCmd containerConfig,
@CheckForNull java.util.function.Function<String, String> resolveVar) {
... | class class_name[name] begin[{]
method[fillContainerConfig, return_type[type[CreateContainerCmd]], modifier[public], parameter[containerConfig, resolveVar]] begin[{]
if[call[StringUtils.isNotBlank, parameter[member[.hostname]]]] begin[{]
call[containerConfig.withHostName... | annotation[@] identifier[SuppressFBWarnings] operator[SEP] identifier[value] operator[=] literal[String] , identifier[justification] operator[=] literal[String] operator[SEP] Keyword[public] identifier[CreateContainerCmd] identifier[fillContainerConfig] operator[SEP] identifier[CreateContainerCmd] identifier[container... |
public Collection<Variable> getVariables() {
if (parent == null) {
return getLocalVariables();
}
List<Variable> result = new ArrayList<>();
result.addAll(parent.getVariables());
result.addAll(getLocalVariables());
return result;
} | class class_name[name] begin[{]
method[getVariables, return_type[type[Collection]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
return[call[.getLocalVariables, parameter[]]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[Collection] operator[<] identifier[Variable] operator[>] identifier[getVariables] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[getLocalVariables] operator[SEP] operator[SEP] ope... |
public void marshall(DeletePermissionRequest deletePermissionRequest, ProtocolMarshaller protocolMarshaller) {
if (deletePermissionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deletePerm... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deletePermissionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deletePermissionRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeletePermissionRequest] identifier[deletePermissionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deletePermissionRequest] operator[==] Other[null] operator... |
protected void validateEmailAddress(final List<Diagnostic> diags) {
if (!isEmpty()) {
String value = getValueAsString();
String errorMessage = getComponentModel().errorMessage;
// Email Pattern
if (!Pattern.matches(
"^(?:\".+\"|[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+)@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)+$",
... | class class_name[name] begin[{]
method[validateEmailAddress, return_type[void], modifier[protected], parameter[diags]] begin[{]
if[call[.isEmpty, parameter[]]] begin[{]
local_variable[type[String], value]
local_variable[type[String], errorMessage]
... | Keyword[protected] Keyword[void] identifier[validateEmailAddress] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Diagnostic] operator[>] identifier[diags] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identif... |
public int[] extractLongArray() {
int[] argout;
argout = new int[values.length];
for (int i = 0; i < values.length; i++) {
argout[i] = Integer.parseInt(values[i]);
}
return argout;
} | class class_name[name] begin[{]
method[extractLongArray, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], argout]
assign[member[.argout], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[extractLongArray] operator[SEP] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[argout] operator[SEP] identifier[argout] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[values] operator[SEP] identifier[length] ... |
@Override
public void visit(JavaClass someObj) {
currentClass = someObj.getClassName();
currentMethod = null;
currentCFG = null;
currentLockDataFlow = null;
sawDateClass = false;
} | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[someObj]] begin[{]
assign[member[.currentClass], call[someObj.getClassName, parameter[]]]
assign[member[.currentMethod], literal[null]]
assign[member[.currentCFG], litera... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[JavaClass] identifier[someObj] operator[SEP] {
identifier[currentClass] operator[=] identifier[someObj] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] identifier[currentMe... |
public Swagger2MarkupConfigBuilder withInterDocumentCrossReferences(String prefix) {
Validate.notNull(prefix, "%s must not be null", "prefix");
config.interDocumentCrossReferencesEnabled = true;
config.interDocumentCrossReferencesPrefix = prefix;
return this;
} | class class_name[name] begin[{]
method[withInterDocumentCrossReferences, return_type[type[Swagger2MarkupConfigBuilder]], modifier[public], parameter[prefix]] begin[{]
call[Validate.notNull, parameter[member[.prefix], literal["%s must not be null"], literal["prefix"]]]
assign[mem... | Keyword[public] identifier[Swagger2MarkupConfigBuilder] identifier[withInterDocumentCrossReferences] operator[SEP] identifier[String] identifier[prefix] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[prefix] , literal[String] , literal[String] operator[SEP] oper... |
boolean matchXmlDeclaration(
final boolean blockMatching,
final int markupLevel, final int markupBlockIndex) {
checkMarkupLevel(markupLevel);
if (this.markupSelectorItem.anyLevel() || markupLevel == 0 || (this.prev != null && this.prev.matchedMarkupLevels[markupLevel - 1])) {
... | class class_name[name] begin[{]
method[matchXmlDeclaration, return_type[type[boolean]], modifier[default], parameter[blockMatching, markupLevel, markupBlockIndex]] begin[{]
call[.checkMarkupLevel, parameter[member[.markupLevel]]]
if[binary_operation[binary_operation[THIS[member[... | Keyword[boolean] identifier[matchXmlDeclaration] operator[SEP] Keyword[final] Keyword[boolean] identifier[blockMatching] , Keyword[final] Keyword[int] identifier[markupLevel] , Keyword[final] Keyword[int] identifier[markupBlockIndex] operator[SEP] {
identifier[checkMarkupLevel] operator[SEP] identifier[markupL... |
private static void addFile(final File file, final File dirToZip, final ZipOutputStream zos)
throws IOException
{
final String absolutePath = file.getAbsolutePath();
final int index = absolutePath.indexOf(dirToZip.getName());
final String zipEntryName = absolutePath.substring(index, absolutePath.length());
f... | class class_name[name] begin[{]
method[addFile, return_type[void], modifier[private static], parameter[file, dirToZip, zos]] begin[{]
local_variable[type[String], absolutePath]
local_variable[type[int], index]
local_variable[type[String], zipEntryName]
local_variable[type[byte],... | Keyword[private] Keyword[static] Keyword[void] identifier[addFile] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[File] identifier[dirToZip] , Keyword[final] identifier[ZipOutputStream] identifier[zos] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[f... |
@Override
public Object
read(List<Slice> slices)
throws DapException
{
switch (this.scheme) {
case ATOMIC:
return readAtomic(slices);
case STRUCTURE:
if(((DapVariable) this.getTemplate()).getRank() > 0
|| DapUtil.isScalarSlices(... | class class_name[name] begin[{]
method[read, return_type[type[Object]], modifier[public], parameter[slices]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['ATOMIC'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=slices, postfix_operators=[], prefi... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[read] operator[SEP] identifier[List] operator[<] identifier[Slice] operator[>] identifier[slices] operator[SEP] Keyword[throws] identifier[DapException] {
Keyword[switch] operator[SEP] Keyword[this] operator[SEP] identifier[scheme] ... |
protected void analyzeImpl(Analyzer analyzer, boolean allowFlow,
IntArray pendingTargets,
IntArray completedTargets)
throws Exception
{
setOffset(0);
pendingTargets.add(0);
ArrayList<CodeAttribute.ExceptionItem> exns;
exns = getExcept... | class class_name[name] begin[{]
method[analyzeImpl, return_type[void], modifier[protected], parameter[analyzer, allowFlow, pendingTargets, completedTargets]] begin[{]
call[.setOffset, parameter[literal[0]]]
call[pendingTargets.add, parameter[literal[0]]]
local_variable[t... | Keyword[protected] Keyword[void] identifier[analyzeImpl] operator[SEP] identifier[Analyzer] identifier[analyzer] , Keyword[boolean] identifier[allowFlow] , identifier[IntArray] identifier[pendingTargets] , identifier[IntArray] identifier[completedTargets] operator[SEP] Keyword[throws] identifier[Exception] {
... |
private JPanel createFilterPane() {
JButton addButton = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.add_dot_btn", "Add..."));
JButton removeButton = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.remove_btn", "Remove"));
JButton removeAllButton = new JButton(edu.umd.cs.fin... | class class_name[name] begin[{]
method[createFilterPane, return_type[type[JPanel]], modifier[private], parameter[]] begin[{]
local_variable[type[JButton], addButton]
local_variable[type[JButton], removeButton]
local_variable[type[JButton], removeAllButton]
local_variable[type[JP... | Keyword[private] identifier[JPanel] identifier[createFilterPane] operator[SEP] operator[SEP] {
identifier[JButton] identifier[addButton] operator[=] Keyword[new] identifier[JButton] operator[SEP] identifier[edu] operator[SEP] identifier[umd] operator[SEP] identifier[cs] operator[SEP] identifier[findbugs] operato... |
public MultiPolylineMarkers addMultiPolylineToMapAsMarkers(
GoogleMapShapeMarkers shapeMarkers, GoogleMap map,
MultiPolylineOptions multiPolyline,
MarkerOptions polylineMarkerOptions,
PolylineOptions globalPolylineOptions) {
MultiPolylineMarkers polylines = new Mu... | class class_name[name] begin[{]
method[addMultiPolylineToMapAsMarkers, return_type[type[MultiPolylineMarkers]], modifier[public], parameter[shapeMarkers, map, multiPolyline, polylineMarkerOptions, globalPolylineOptions]] begin[{]
local_variable[type[MultiPolylineMarkers], polylines]
ForStatemen... | Keyword[public] identifier[MultiPolylineMarkers] identifier[addMultiPolylineToMapAsMarkers] operator[SEP] identifier[GoogleMapShapeMarkers] identifier[shapeMarkers] , identifier[GoogleMap] identifier[map] , identifier[MultiPolylineOptions] identifier[multiPolyline] , identifier[MarkerOptions] identifier[polylineMark... |
public static UnionTerminal distinct() {
UnionTerminal ret = UnionFactory.distinct();
ASTNode an = APIObjectAccess.getAstNode(ret);
an.setClauseType(ClauseType.UNION);
return ret;
} | class class_name[name] begin[{]
method[distinct, return_type[type[UnionTerminal]], modifier[public static], parameter[]] begin[{]
local_variable[type[UnionTerminal], ret]
local_variable[type[ASTNode], an]
call[an.setClauseType, parameter[member[ClauseType.UNION]]]
return... | Keyword[public] Keyword[static] identifier[UnionTerminal] identifier[distinct] operator[SEP] operator[SEP] {
identifier[UnionTerminal] identifier[ret] operator[=] identifier[UnionFactory] operator[SEP] identifier[distinct] operator[SEP] operator[SEP] operator[SEP] identifier[ASTNode] identifier[an] operator[=] i... |
public String next() {
if (entry == null) return null;
entry = entry.next;
return entry.element;
} | class class_name[name] begin[{]
method[next, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.entry], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
assign[member[.entry], member[entry.ne... | Keyword[public] identifier[String] identifier[next] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[entry] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[entry] operator[=] identifier[entry] operator[SEP] identifier[next] operator[SEP] Keyword[retur... |
@SuppressWarnings("null")
private boolean accepts(SlingHttpServletRequest request) {
return request.getMethod().equalsIgnoreCase(METHOD_GET)
&& request.getResource() != null
&& StringUtils.equals(request.getResource().getValueMap().get(JCR_PRIMARYTYPE, String.class), NT_FILE);
} | class class_name[name] begin[{]
method[accepts, return_type[type[boolean]], modifier[private], parameter[request]] begin[{]
return[binary_operation[binary_operation[call[request.getMethod, parameter[]], &&, binary_operation[call[request.getResource, parameter[]], !=, literal[null]]], &&, call[StringUti... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[boolean] identifier[accepts] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] operator[SEP] {
Keyword[return] identifier[request] operator[SEP] identifier[getMethod] operator[SEP] ... |
public static RequestResponse callHttpPatch(HttpJsonRpcClient client, String url,
Map<String, Object> headers, Map<String, Object> urlParams, Object requestData) {
return client.doPatch(url, headers, urlParams, requestData);
} | class class_name[name] begin[{]
method[callHttpPatch, return_type[type[RequestResponse]], modifier[public static], parameter[client, url, headers, urlParams, requestData]] begin[{]
return[call[client.doPatch, parameter[member[.url], member[.headers], member[.urlParams], member[.requestData]]]]
end[... | Keyword[public] Keyword[static] identifier[RequestResponse] identifier[callHttpPatch] operator[SEP] identifier[HttpJsonRpcClient] identifier[client] , identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[headers] , identifier[Map] operator[<... |
public void marshall(ApplicationCodeConfigurationDescription applicationCodeConfigurationDescription, ProtocolMarshaller protocolMarshaller) {
if (applicationCodeConfigurationDescription == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[applicationCodeConfigurationDescription, protocolMarshaller]] begin[{]
if[binary_operation[member[.applicationCodeConfigurationDescription], ==, literal[null]]] begin[{]
ThrowStatement(ex... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ApplicationCodeConfigurationDescription] identifier[applicationCodeConfigurationDescription] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[applicationCodeConfigurati... |
protected boolean findOUColumn(CmsSetupDb dbCon, String table, String ouColumn) {
System.out.println(new Exception().getStackTrace()[0].toString());
return dbCon.hasTableOrColumn(table, ouColumn);
} | class class_name[name] begin[{]
method[findOUColumn, return_type[type[boolean]], modifier[protected], parameter[dbCon, table, ouColumn]] begin[{]
call[System.out.println, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], ... | Keyword[protected] Keyword[boolean] identifier[findOUColumn] operator[SEP] identifier[CmsSetupDb] identifier[dbCon] , identifier[String] identifier[table] , identifier[String] identifier[ouColumn] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] K... |
public DeployableUnitImpl build(String url, File deploymentRoot,
ComponentRepository componentRepository)
throws DeploymentException, AlreadyDeployedException,
MalformedURLException {
if (logger.isDebugEnabled()) {
logger.debug("Building DU from " + url);
}
DeployableUnitID deployableUnitID... | class class_name[name] begin[{]
method[build, return_type[type[DeployableUnitImpl]], modifier[public], parameter[url, deploymentRoot, componentRepository]] begin[{]
if[call[logger.isDebugEnabled, parameter[]]] begin[{]
call[logger.debug, parameter[binary_operation[litera... | Keyword[public] identifier[DeployableUnitImpl] identifier[build] operator[SEP] identifier[String] identifier[url] , identifier[File] identifier[deploymentRoot] , identifier[ComponentRepository] identifier[componentRepository] operator[SEP] Keyword[throws] identifier[DeploymentException] , identifier[AlreadyDeployedE... |
public TagsEnvelope getTagSuggestions(String entityType, String tags, String name, Integer count) throws ApiException {
ApiResponse<TagsEnvelope> resp = getTagSuggestionsWithHttpInfo(entityType, tags, name, count);
return resp.getData();
} | class class_name[name] begin[{]
method[getTagSuggestions, return_type[type[TagsEnvelope]], modifier[public], parameter[entityType, tags, name, count]] begin[{]
local_variable[type[ApiResponse], resp]
return[call[resp.getData, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[TagsEnvelope] identifier[getTagSuggestions] operator[SEP] identifier[String] identifier[entityType] , identifier[String] identifier[tags] , identifier[String] identifier[name] , identifier[Integer] identifier[count] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier... |
public static <T extends Comparable<? super T>> ArrayList<T> sortThis(ArrayList<T> list)
{
return ArrayListIterate.sortThis(list, Comparators.naturalOrder());
} | class class_name[name] begin[{]
method[sortThis, return_type[type[ArrayList]], modifier[public static], parameter[list]] begin[{]
return[call[ArrayListIterate.sortThis, parameter[member[.list], call[Comparators.naturalOrder, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[ArrayList] operator[<] identifier[T] operator[>] identifier[sortThis] operator[SEP] identifier[ArrayList] operator[<] identifier[T] op... |
public void handleDebugEvents(DebugEvent[] events)
{
for (int i = 0; i < events.length; i++)
{
DebugEvent event = events[i];
if (event.getSource().equals(getProcess()))
{
Runnable r = new Runnable()
{
public void run()
{
if (fTerminate != null)
{
fTerminate.update();
... | class class_name[name] begin[{]
method[handleDebugEvents, return_type[void], modifier[public], parameter[events]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=... | Keyword[public] Keyword[void] identifier[handleDebugEvents] operator[SEP] identifier[DebugEvent] operator[SEP] operator[SEP] identifier[events] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[events] operator[SEP] ident... |
public Stream<T> headStream(T key, boolean inclusive, boolean parallel)
{
return StreamSupport.stream(headSpliterator(key, inclusive), parallel);
} | class class_name[name] begin[{]
method[headStream, return_type[type[Stream]], modifier[public], parameter[key, inclusive, parallel]] begin[{]
return[call[StreamSupport.stream, parameter[call[.headSpliterator, parameter[member[.key], member[.inclusive]]], member[.parallel]]]]
end[}]
END[}] | Keyword[public] identifier[Stream] operator[<] identifier[T] operator[>] identifier[headStream] operator[SEP] identifier[T] identifier[key] , Keyword[boolean] identifier[inclusive] , Keyword[boolean] identifier[parallel] operator[SEP] {
Keyword[return] identifier[StreamSupport] operator[SEP] identifier[stream]... |
public void addMessageListener(DigitalChannel channel, Class<? extends Message> messageClass,
MessageListener<Message> messageListener) {
addListener(channel.getIdentifier(), messageClass, messageListener);
} | class class_name[name] begin[{]
method[addMessageListener, return_type[void], modifier[public], parameter[channel, messageClass, messageListener]] begin[{]
call[.addListener, parameter[call[channel.getIdentifier, parameter[]], member[.messageClass], member[.messageListener]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addMessageListener] operator[SEP] identifier[DigitalChannel] identifier[channel] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Message] operator[>] identifier[messageClass] , identifier[MessageListener] operator[<] identifier[Message] operator[>] iden... |
public final void entryRuleParenthesizedElement() throws RecognitionException {
try {
// InternalXtext.g:1046:1: ( ruleParenthesizedElement EOF )
// InternalXtext.g:1047:1: ruleParenthesizedElement EOF
{
before(grammarAccess.getParenthesizedElementRule());
... | class class_name[name] begin[{]
method[entryRuleParenthesizedElement, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParenthes... | Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleParenthesizedElement] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
{
identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getParenthesizedElem... |
public static void registerSerializers(final Kryo kryo) {
final LinkedListMultimapSerializer serializer = new LinkedListMultimapSerializer();
kryo.register(LinkedListMultimap.class, serializer);
} | class class_name[name] begin[{]
method[registerSerializers, return_type[void], modifier[public static], parameter[kryo]] begin[{]
local_variable[type[LinkedListMultimapSerializer], serializer]
call[kryo.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualif... | Keyword[public] Keyword[static] Keyword[void] identifier[registerSerializers] operator[SEP] Keyword[final] identifier[Kryo] identifier[kryo] operator[SEP] {
Keyword[final] identifier[LinkedListMultimapSerializer] identifier[serializer] operator[=] Keyword[new] identifier[LinkedListMultimapSerializer] operator[SE... |
public void unregisterPainter(Painter painter) {
String className = painter.getPaintableClassName();
if (painters.containsKey(className)) {
List<Painter> list = painters.remove(className);
if (list.size() > 1) {
list.remove(painter);
painters.put(className, list);
}
}
} | class class_name[name] begin[{]
method[unregisterPainter, return_type[void], modifier[public], parameter[painter]] begin[{]
local_variable[type[String], className]
if[call[painters.containsKey, parameter[member[.className]]]] begin[{]
local_variable[type[List], list]
... | Keyword[public] Keyword[void] identifier[unregisterPainter] operator[SEP] identifier[Painter] identifier[painter] operator[SEP] {
identifier[String] identifier[className] operator[=] identifier[painter] operator[SEP] identifier[getPaintableClassName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator... |
public boolean tryEnter(Object obj) {
if (entered.containsKey(obj)) {
return false;
} else {
entered.put(obj, null);
return true;
}
} | class class_name[name] begin[{]
method[tryEnter, return_type[type[boolean]], modifier[public], parameter[obj]] begin[{]
if[call[entered.containsKey, parameter[member[.obj]]]] begin[{]
return[literal[false]]
else begin[{]
call[entered.put, parameter[me... | Keyword[public] Keyword[boolean] identifier[tryEnter] operator[SEP] identifier[Object] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[entered] operator[SEP] identifier[containsKey] operator[SEP] identifier[obj] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operat... |
public static void remove(String key) throws IllegalArgumentException {
if (key == null) {
throw new IllegalArgumentException("key parameter cannot be null");
}
if (mdcAdapter == null) {
throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_U... | class class_name[name] begin[{]
method[remove, return_type[void], modifier[public static], parameter[key]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[static] Keyword[void] identifier[remove] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifi... |
public void createSampleDatas() throws NamingException {
final Context ctx = new InitialContext();
final BeanManager beanManager = (BeanManager) ctx.lookup("java:comp/env/BeanManager");
final EntityManagerFactory entityManagerFactory = BeanManagerUtils.getOrCreateInstance(beanManager, EntityManagerFactory.class);... | class class_name[name] begin[{]
method[createSampleDatas, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Context], ctx]
local_variable[type[BeanManager], beanManager]
local_variable[type[EntityManagerFactory], entityManagerFactory]
local_variable[... | Keyword[public] Keyword[void] identifier[createSampleDatas] operator[SEP] operator[SEP] Keyword[throws] identifier[NamingException] {
Keyword[final] identifier[Context] identifier[ctx] operator[=] Keyword[new] identifier[InitialContext] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[BeanMana... |
public Integer lockActivityInstance(Long actInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockActivityInstance(actInstId);
... | class class_name[name] begin[{]
method[lockActivityInstance, return_type[type[Integer]], modifier[public], parameter[actInstId]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isInTransaction, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=... | Keyword[public] identifier[Integer] identifier[lockActivityInstance] operator[SEP] identifier[Long] identifier[actInstId] operator[SEP] Keyword[throws] identifier[DataAccessException] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[isInTransaction] operator[SEP] operator[SEP] operato... |
@Nullable
public static IJson readFromStream (@Nonnull final IHasInputStream aISP, @Nonnull final Charset aFallbackCharset)
{
return readFromStream (aISP, aFallbackCharset, null);
} | class class_name[name] begin[{]
method[readFromStream, return_type[type[IJson]], modifier[public static], parameter[aISP, aFallbackCharset]] begin[{]
return[call[.readFromStream, parameter[member[.aISP], member[.aFallbackCharset], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[IJson] identifier[readFromStream] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IHasInputStream] identifier[aISP] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Charset] identifier[aFallbackCharset]... |
public Signature insertArgs(int index, String[] names, Class<?>... types) {
assert names.length == types.length : "names and types must be of the same length";
String[] newArgNames = new String[argNames.length + names.length];
System.arraycopy(names, 0, newArgNames, index, names.length);
... | class class_name[name] begin[{]
method[insertArgs, return_type[type[Signature]], modifier[public], parameter[index, names, types]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=names, selectors=[]), operan... | Keyword[public] identifier[Signature] identifier[insertArgs] operator[SEP] Keyword[int] identifier[index] , identifier[String] operator[SEP] operator[SEP] identifier[names] , identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[types] operator[SEP] {
Keyword[assert] identifier[names] ... |
public String getYear(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getYear();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.YEAR);
}
return null;
} | class class_name[name] begin[{]
method[getYear, return_type[type[String]], modifier[public], parameter[type]] begin[{]
if[call[.allow, parameter[binary_operation[member[.type], &, member[.ID3V1]]]]] begin[{]
return[call[id3v1.getYear, parameter[]]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getYear] operator[SEP] Keyword[int] identifier[type] operator[SEP] {
Keyword[if] operator[SEP] identifier[allow] operator[SEP] identifier[type] operator[&] identifier[ID3V1] operator[SEP] operator[SEP] {
Keyword[return] identifier[id3v1] operator[SEP] iden... |
public OvhSubscription subscription_subscriptionType_GET(String subscriptionType) throws IOException {
String qPath = "/me/subscription/{subscriptionType}";
StringBuilder sb = path(qPath, subscriptionType);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhSubscription.class);
} | class class_name[name] begin[{]
method[subscription_subscriptionType_GET, return_type[type[OvhSubscription]], modifier[public], parameter[subscriptionType]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], resp]
re... | Keyword[public] identifier[OvhSubscription] identifier[subscription_subscriptionType_GET] operator[SEP] identifier[String] identifier[subscriptionType] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] ... |
public static byte[] generateAesKey(final int keysize) {
try {
KeyGenerator keyGenerator = KeyGenerator.getInstance(AES_NAME);
keyGenerator.init(keysize);
SecretKey secretKey = keyGenerator.generateKey();
return secretKey.getEncoded();
} catch (NoSuchAlgorithmException e) {
throw new ImpossibleExcept... | class class_name[name] begin[{]
method[generateAesKey, return_type[type[byte]], modifier[public static], parameter[keysize]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(membe... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[generateAesKey] operator[SEP] Keyword[final] Keyword[int] identifier[keysize] operator[SEP] {
Keyword[try] {
identifier[KeyGenerator] identifier[keyGenerator] operator[=] identifier[KeyGenerator] operator[SEP] identif... |
@Override
public EClass getIfcBoxAlignment() {
if (ifcBoxAlignmentEClass == null) {
ifcBoxAlignmentEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(895);
}
return ifcBoxAlignmentEClass;
} | class class_name[name] begin[{]
method[getIfcBoxAlignment, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcBoxAlignmentEClass], ==, literal[null]]] begin[{]
assign[member[.ifcBoxAlignmentEClass], Cast(expression=MethodInv... | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBoxAlignment] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcBoxAlignmentEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcBoxAlignmentEClass] operator[=] operator[SEP] identifier... |
private void _saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__saveActionPerformed
int[] i = _oList.getSelectedRows();
String[] o = new String[i.length];
for (int j = 0; j < i.length; j++) {
o[j] = (String) _oList.getValueAt(i[j], 0);
}
JFileCho... | class class_name[name] begin[{]
method[_saveActionPerformed, return_type[void], modifier[private], parameter[evt]] begin[{]
local_variable[type[int], i]
local_variable[type[String], o]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(exp... | Keyword[private] Keyword[void] identifier[_saveActionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[i] operator[=] identifier[_oList] ... |
public Object run(String scriptText, String fileName, List list) throws CompilationFailedException {
String[] args = new String[list.size()];
list.toArray(args);
return run(scriptText, fileName, args);
} | class class_name[name] begin[{]
method[run, return_type[type[Object]], modifier[public], parameter[scriptText, fileName, list]] begin[{]
local_variable[type[String], args]
call[list.toArray, parameter[member[.args]]]
return[call[.run, parameter[member[.scriptText], member[.fileN... | Keyword[public] identifier[Object] identifier[run] operator[SEP] identifier[String] identifier[scriptText] , identifier[String] identifier[fileName] , identifier[List] identifier[list] operator[SEP] Keyword[throws] identifier[CompilationFailedException] {
identifier[String] operator[SEP] operator[SEP] identifi... |
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> skipLast(int count) {
if (count < 0) {
throw new IndexOutOfBoundsException("count >= 0 required but it was " + count);
}
if (count == 0) {
... | class class_name[name] begin[{]
method[skipLast, return_type[type[Flowable]], modifier[final public], parameter[count]] begin[{]
if[binary_operation[member[.count], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_op... | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[publ... |
public TaxonomyTerm selectTaxonomyTerm(final String taxonomy, final String name) throws SQLException {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
long taxonomyTermId = 0L;
long termId = 0L;
String description = "";
Timer.Context ctx = metrics.s... | class class_name[name] begin[{]
method[selectTaxonomyTerm, return_type[type[TaxonomyTerm]], modifier[public], parameter[taxonomy, name]] begin[{]
local_variable[type[Connection], conn]
local_variable[type[PreparedStatement], stmt]
local_variable[type[ResultSet], rs]
local_variab... | Keyword[public] identifier[TaxonomyTerm] identifier[selectTaxonomyTerm] operator[SEP] Keyword[final] identifier[String] identifier[taxonomy] , Keyword[final] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[Connection] identifier[conn] operator[=] Other[nul... |
public void setCookies(final Cookie[] cookies) {
this.cookies.clear();
if (cookies != null) {
for (final Cookie cookie : cookies) {
cookie(cookie);
}
}
} | class class_name[name] begin[{]
method[setCookies, return_type[void], modifier[public], parameter[cookies]] begin[{]
THIS[member[None.cookies]call[None.clear, parameter[]]]
if[binary_operation[member[.cookies], !=, literal[null]]] begin[{]
ForStatement(body=BlockStat... | Keyword[public] Keyword[void] identifier[setCookies] operator[SEP] Keyword[final] identifier[Cookie] operator[SEP] operator[SEP] identifier[cookies] operator[SEP] {
Keyword[this] operator[SEP] identifier[cookies] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ... |
public LocalDate minusYears(int years) {
if (years == 0) {
return this;
}
long instant = getChronology().years().subtract(getLocalMillis(), years);
return withLocalMillis(instant);
} | class class_name[name] begin[{]
method[minusYears, return_type[type[LocalDate]], modifier[public], parameter[years]] begin[{]
if[binary_operation[member[.years], ==, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
local_variable[type[long], ins... | Keyword[public] identifier[LocalDate] identifier[minusYears] operator[SEP] Keyword[int] identifier[years] operator[SEP] {
Keyword[if] operator[SEP] identifier[years] operator[==] Other[0] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]
}
Keyword[long] identifier[instant] oper... |
@Override
@VisibleForTesting
int getOperationFromRecord(
Record record,
int defaultOpCode,
UnsupportedOperationAction unsupportedAction,
List<OnRecordErrorException> errorRecords ) {
int opCode = -1; // -1 is invalid and not used in OperationType.
String op = null;
try {
/... | class class_name[name] begin[{]
method[getOperationFromRecord, return_type[type[int]], modifier[default], parameter[record, defaultOpCode, unsupportedAction, errorRecords]] begin[{]
local_variable[type[int], opCode]
local_variable[type[String], op]
TryStatement(block=[StatementExpressio... | annotation[@] identifier[Override] annotation[@] identifier[VisibleForTesting] Keyword[int] identifier[getOperationFromRecord] operator[SEP] identifier[Record] identifier[record] , Keyword[int] identifier[defaultOpCode] , identifier[UnsupportedOperationAction] identifier[unsupportedAction] , identifier[List] operato... |
public UpdateIntegrationResult withRequestParameters(java.util.Map<String, String> requestParameters) {
setRequestParameters(requestParameters);
return this;
} | class class_name[name] begin[{]
method[withRequestParameters, return_type[type[UpdateIntegrationResult]], modifier[public], parameter[requestParameters]] begin[{]
call[.setRequestParameters, parameter[member[.requestParameters]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[UpdateIntegrationResult] identifier[withRequestParameters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[requestParameters] operator[SEP] {
identifier[setRequestPar... |
@SuppressWarnings("unused")
@RequirePostWithGHHookPayload
public void doIndex(@Nonnull @GHEventHeader GHEvent event, @Nonnull @GHEventPayload String payload) {
GHSubscriberEvent subscriberEvent =
new GHSubscriberEvent(SCMEvent.originOf(Stapler.getCurrentRequest()), event, payload);
... | class class_name[name] begin[{]
method[doIndex, return_type[void], modifier[public], parameter[event, payload]] begin[{]
local_variable[type[GHSubscriberEvent], subscriberEvent]
call[.from, parameter[call[GHEventsSubscriber.all, parameter[]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[RequirePostWithGHHookPayload] Keyword[public] Keyword[void] identifier[doIndex] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[GHEventHeader] identifier[GHEvent] identifier[event] , ... |
public void insertKVRecord(Object keyBase, long keyOffset, int keyLen,
Object valueBase, long valueOffset, int valueLen, long prefix, boolean prefixIsNull)
throws IOException {
growPointerArrayIfNecessary();
int uaoSize = UnsafeAlignedOffset.getUaoSize();
final int required = keyLen + valueLen + ... | class class_name[name] begin[{]
method[insertKVRecord, return_type[void], modifier[public], parameter[keyBase, keyOffset, keyLen, valueBase, valueOffset, valueLen, prefix, prefixIsNull]] begin[{]
call[.growPointerArrayIfNecessary, parameter[]]
local_variable[type[int], uaoSize]
... | Keyword[public] Keyword[void] identifier[insertKVRecord] operator[SEP] identifier[Object] identifier[keyBase] , Keyword[long] identifier[keyOffset] , Keyword[int] identifier[keyLen] , identifier[Object] identifier[valueBase] , Keyword[long] identifier[valueOffset] , Keyword[int] identifier[valueLen] , Keyword[lon... |
protected void doSave() {
List<CmsFavoriteEntry> entries = getEntries();
try {
m_favDao.saveFavorites(entries);
} catch (Exception e) {
CmsErrorDialog.showErrorDialog(e);
}
} | class class_name[name] begin[{]
method[doSave, return_type[void], modifier[protected], parameter[]] begin[{]
local_variable[type[List], entries]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entries, postfix_operators=[], prefix_operators=... | Keyword[protected] Keyword[void] identifier[doSave] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[CmsFavoriteEntry] operator[>] identifier[entries] operator[=] identifier[getEntries] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[m_favDao] operator[SEP] ide... |
@SuppressWarnings("unchecked")
public static <E> E createRecord(Class<E> type, Schema schema) {
// Don't instantiate SpecificRecords or interfaces.
if (isGeneric(type) && !type.isInterface()) {
if (GenericData.Record.class.equals(type)) {
return (E) GenericData.get().newRecord(null, schema);
... | class class_name[name] begin[{]
method[createRecord, return_type[type[E]], modifier[public static], parameter[type, schema]] begin[{]
if[binary_operation[call[.isGeneric, parameter[member[.type]]], &&, call[type.isInterface, parameter[]]]] begin[{]
if[ClassReference(post... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[E] identifier[createRecord] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[type] , identifier[Schema] identifier[sche... |
public boolean determine(HttpServletRequest request) {
final String methodName = mappingMethodName;
return !isParameterEmpty(request.getParameter(methodName)) // e.g. doUpdate=update
|| !isParameterEmpty(request.getParameter(methodName + ".x")) // e.g. doUpdate.x=update
|... | class class_name[name] begin[{]
method[determine, return_type[type[boolean]], modifier[public], parameter[request]] begin[{]
local_variable[type[String], methodName]
return[binary_operation[binary_operation[call[.isParameterEmpty, parameter[call[request.getParameter, parameter[member[.methodNam... | Keyword[public] Keyword[boolean] identifier[determine] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] identifier[mappingMethodName] operator[SEP] Keyword[return] operator[!] identifier[isParameterEmpty] operato... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.