code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public List<Executor> getAllExecutors() {
List<Executor> result = new ArrayList<>(executors.size() + oneOffExecutors.size());
result.addAll(executors);
result.addAll(oneOffExecutors);
return result;
} | class class_name[name] begin[{]
method[getAllExecutors, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], result]
call[result.addAll, parameter[member[.executors]]]
call[result.addAll, parameter[member[.oneOffExecutors]]]
... | Keyword[public] identifier[List] operator[<] identifier[Executor] operator[>] identifier[getAllExecutors] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Executor] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[... |
private static boolean patchShadedLibraryId(byte[] bytes, String originalName, String name) {
// Our native libs always have the name as part of their id so we can search for it and replace it
// to make the ID unique if shading is used.
byte[] nameBytes = originalName.getBytes(CharsetUtil.UTF_8... | class class_name[name] begin[{]
method[patchShadedLibraryId, return_type[type[boolean]], modifier[private static], parameter[bytes, originalName, name]] begin[{]
local_variable[type[byte], nameBytes]
local_variable[type[int], idIdx]
ForStatement(body=BlockStatement(label=None, statement... | Keyword[private] Keyword[static] Keyword[boolean] identifier[patchShadedLibraryId] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , identifier[String] identifier[originalName] , identifier[String] identifier[name] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[n... |
public void setReplicaSettingsUpdate(java.util.Collection<ReplicaSettingsUpdate> replicaSettingsUpdate) {
if (replicaSettingsUpdate == null) {
this.replicaSettingsUpdate = null;
return;
}
this.replicaSettingsUpdate = new java.util.ArrayList<ReplicaSettingsUpdate>(replica... | class class_name[name] begin[{]
method[setReplicaSettingsUpdate, return_type[void], modifier[public], parameter[replicaSettingsUpdate]] begin[{]
if[binary_operation[member[.replicaSettingsUpdate], ==, literal[null]]] begin[{]
assign[THIS[member[None.replicaSettingsUpdate... | Keyword[public] Keyword[void] identifier[setReplicaSettingsUpdate] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ReplicaSettingsUpdate] operator[>] identifier[replicaSettingsUpdate] operator[SEP] {
Keyword[if] operator[SEP] identifier[re... |
private int[] getRange(String field, int min, int max) {
int[] result = new int[2];
if (field.contains("*")) {
result[0] = min;
result[1] = max - 1;
return result;
}
if (!field.contains("-")) {
result[0] = result[1] = Integer.valueOf(field)... | class class_name[name] begin[{]
method[getRange, return_type[type[int]], modifier[private], parameter[field, min, max]] begin[{]
local_variable[type[int], result]
if[call[field.contains, parameter[literal["*"]]]] begin[{]
assign[member[.result], member[.min]]
... | Keyword[private] Keyword[int] operator[SEP] operator[SEP] identifier[getRange] operator[SEP] identifier[String] identifier[field] , Keyword[int] identifier[min] , Keyword[int] identifier[max] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[int] opera... |
private static final Duration parseDurationInFractionsOfMinutes(ProjectProperties properties, Number value, TimeUnit targetTimeUnit, int factor)
{
Duration result = null;
if (value != null)
{
result = Duration.getInstance(value.intValue() / factor, TimeUnit.MINUTES);
if (targetTi... | class class_name[name] begin[{]
method[parseDurationInFractionsOfMinutes, return_type[type[Duration]], modifier[final private static], parameter[properties, value, targetTimeUnit, factor]] begin[{]
local_variable[type[Duration], result]
if[binary_operation[member[.value], !=, literal[nu... | Keyword[private] Keyword[static] Keyword[final] identifier[Duration] identifier[parseDurationInFractionsOfMinutes] operator[SEP] identifier[ProjectProperties] identifier[properties] , identifier[Number] identifier[value] , identifier[TimeUnit] identifier[targetTimeUnit] , Keyword[int] identifier[factor] operator[SEP... |
@Override
public CPDefinitionOptionRel findByUuid_C_First(String uuid,
long companyId,
OrderByComparator<CPDefinitionOptionRel> orderByComparator)
throws NoSuchCPDefinitionOptionRelException {
CPDefinitionOptionRel cpDefinitionOptionRel = fetchByUuid_C_First(uuid,
companyId, orderByComparator);
if (cpDe... | class class_name[name] begin[{]
method[findByUuid_C_First, return_type[type[CPDefinitionOptionRel]], modifier[public], parameter[uuid, companyId, orderByComparator]] begin[{]
local_variable[type[CPDefinitionOptionRel], cpDefinitionOptionRel]
if[binary_operation[member[.cpDefinitionOptio... | annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionOptionRel] identifier[findByUuid_C_First] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionOptionRel] operator[>] identifier[orderByCompar... |
public Datatype.Builder mutateGeneratedBuilderAnnotations(
Consumer<? super List<Excerpt>> mutator) {
if (generatedBuilderAnnotations instanceof ImmutableList) {
generatedBuilderAnnotations = new ArrayList<>(generatedBuilderAnnotations);
}
// If addGeneratedBuilderAnnotations is overridden, this... | class class_name[name] begin[{]
method[mutateGeneratedBuilderAnnotations, return_type[type[Datatype]], modifier[public], parameter[mutator]] begin[{]
if[binary_operation[member[.generatedBuilderAnnotations], instanceof, type[ImmutableList]]] begin[{]
assign[member[.gener... | Keyword[public] identifier[Datatype] operator[SEP] identifier[Builder] identifier[mutateGeneratedBuilderAnnotations] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[List] operator[<] identifier[Excerpt] operator[>] operator[>] identifier[mutator] operator[SEP] {
Keyword[if] o... |
@Incubating
@CheckReturnValue
public static <T> T spy(Class<T> classToSpy) {
return MOCKITO_CORE.mock(classToSpy, withSettings()
.useConstructor()
.defaultAnswer(CALLS_REAL_METHODS));
} | class class_name[name] begin[{]
method[spy, return_type[type[T]], modifier[public static], parameter[classToSpy]] begin[{]
return[call[MOCKITO_CORE.mock, parameter[member[.classToSpy], call[.withSettings, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[Incubating] annotation[@] identifier[CheckReturnValue] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[spy] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[classToSpy] operator[SEP] {
Keyword[return] identifi... |
private static void serialize(Serializable object, OutputStream output) throws IOException {
BufferedOutputStream bos = new BufferedOutputStream(output);
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(object);
bos.flush();
} | class class_name[name] begin[{]
method[serialize, return_type[void], modifier[private static], parameter[object, output]] begin[{]
local_variable[type[BufferedOutputStream], bos]
local_variable[type[ObjectOutputStream], oos]
call[oos.writeObject, parameter[member[.object]]]
... | Keyword[private] Keyword[static] Keyword[void] identifier[serialize] operator[SEP] identifier[Serializable] identifier[object] , identifier[OutputStream] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[BufferedOutputStream] identifier[bos] operator[=] Keyword[new] identifie... |
protected void gitPush(final String branchName, boolean pushTags)
throws MojoFailureException, CommandLineException {
getLog().info(
"Pushing '" + branchName + "' branch" + " to '"
+ gitFlowConfig.getOrigin() + "'.");
if (pushTags) {
execu... | class class_name[name] begin[{]
method[gitPush, return_type[void], modifier[protected], parameter[branchName, pushTags]] begin[{]
call[.getLog, parameter[]]
if[member[.pushTags]] begin[{]
call[.executeGitCommand, parameter[literal["push"], literal["--quie... | Keyword[protected] Keyword[void] identifier[gitPush] operator[SEP] Keyword[final] identifier[String] identifier[branchName] , Keyword[boolean] identifier[pushTags] operator[SEP] Keyword[throws] identifier[MojoFailureException] , identifier[CommandLineException] {
identifier[getLog] operator[SEP] operator[SEP] ... |
public final EObject ruleXTryCatchFinallyExpression() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_4=null;
Token otherlv_6=null;
EObject lv_expression_2_0 = null;
EObject lv_catchClauses_3_0 = null;
EObject lv_finall... | class class_name[name] begin[{]
method[ruleXTryCatchFinallyExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], otherlv_1]
local_variable[type[Token], otherlv_4]
local_variable[ty... | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXTryCatchFinallyExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_1] operator[=] Other[null... |
@Override
public void read(DataInputView in) throws IOException {
final boolean isNotNull = in.readBoolean();
if (isNotNull) {
final String scheme = StringUtils.readNullableString(in);
final String userInfo = StringUtils.readNullableString(in);
final String host = StringUtils.readNullableString(in);
fi... | class class_name[name] begin[{]
method[read, return_type[void], modifier[public], parameter[in]] begin[{]
local_variable[type[boolean], isNotNull]
if[member[.isNotNull]] begin[{]
local_variable[type[String], scheme]
local_variable[type[String], userInfo]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[read] operator[SEP] identifier[DataInputView] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[boolean] identifier[isNotNull] operator[=] identifier[in] operator[SEP] identifier[readBoolean] o... |
@Override
public void invoke(CheckedRunnable runnable) {
try {
super.invoke(runnable);
} catch (Exception ex) {
LOGGER.debug("Catched exception, suppressing", ex);
}
} | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public], parameter[runnable]] begin[{]
TryStatement(block=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], m... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[invoke] operator[SEP] identifier[CheckedRunnable] identifier[runnable] operator[SEP] {
Keyword[try] {
Keyword[super] operator[SEP] identifier[invoke] operator[SEP] identifier[runnable] operator[SEP] operator[SEP]
}
... |
public LogSetup withTypes(LogType... types) {
java.util.ArrayList<String> typesCopy = new java.util.ArrayList<String>(types.length);
for (LogType value : types) {
typesCopy.add(value.toString());
}
if (getTypes() == null) {
setTypes(typesCopy);
} else {
... | class class_name[name] begin[{]
method[withTypes, return_type[type[LogSetup]], modifier[public], parameter[types]] begin[{]
local_variable[type[java], typesCopy]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(... | Keyword[public] identifier[LogSetup] identifier[withTypes] operator[SEP] identifier[LogType] operator[...] identifier[types] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[typesCopy] operator[=] Keyword[new... |
public final void cancelOperation(String name) {
CancelOperationRequest request = CancelOperationRequest.newBuilder().setName(name).build();
cancelOperation(request);
} | class class_name[name] begin[{]
method[cancelOperation, return_type[void], modifier[final public], parameter[name]] begin[{]
local_variable[type[CancelOperationRequest], request]
call[.cancelOperation, parameter[member[.request]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[cancelOperation] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[CancelOperationRequest] identifier[request] operator[=] identifier[CancelOperationRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operato... |
protected AnalyzedSentence getSentenceWithImmunization(AnalyzedSentence sentence) {
if (!getAntiPatterns().isEmpty()) {
//we need a copy of the sentence, not reference to the old one
AnalyzedSentence immunizedSentence = sentence.copy(sentence);
for (DisambiguationPatternRule patternRule : getAntiP... | class class_name[name] begin[{]
method[getSentenceWithImmunization, return_type[type[AnalyzedSentence]], modifier[protected], parameter[sentence]] begin[{]
if[call[.getAntiPatterns, parameter[]]] begin[{]
local_variable[type[AnalyzedSentence], immunizedSentence]
ForState... | Keyword[protected] identifier[AnalyzedSentence] identifier[getSentenceWithImmunization] operator[SEP] identifier[AnalyzedSentence] identifier[sentence] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[getAntiPatterns] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] ope... |
@Override
public int read() throws IOException {
if (ostart >= ofinish) {
int temp;
for (temp = 0; temp == 0; temp = getMoreData())
;
if (temp == -1) {
return -1;
}
}
return obuffer[ostart++] & 255;
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ostart], >=, member[.ofinish]]] begin[{]
local_variable[type[int], temp]
ForStatement(body=Statement(label=None), control=ForControl(c... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[ostart] operator[>=] identifier[ofinish] operator[SEP] {
Keyword[int] identifier[temp] operator[SEP] Keyword[for] ... |
private void insertIntoTableKToV(int entry, int keyHash) {
checkArgument(entry != ABSENT);
int keyBucket = bucket(keyHash);
nextInBucketKToV[entry] = hashTableKToV[keyBucket];
hashTableKToV[keyBucket] = entry;
} | class class_name[name] begin[{]
method[insertIntoTableKToV, return_type[void], modifier[private], parameter[entry, keyHash]] begin[{]
call[.checkArgument, parameter[binary_operation[member[.entry], !=, member[.ABSENT]]]]
local_variable[type[int], keyBucket]
assign[member... | Keyword[private] Keyword[void] identifier[insertIntoTableKToV] operator[SEP] Keyword[int] identifier[entry] , Keyword[int] identifier[keyHash] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[entry] operator[!=] identifier[ABSENT] operator[SEP] operator[SEP] Keyword[int] identifier[keyBucket] ... |
public static Number plus(Number left, Number right) {
return NumberMath.add(left, right);
} | class class_name[name] begin[{]
method[plus, return_type[type[Number]], modifier[public static], parameter[left, right]] begin[{]
return[call[NumberMath.add, parameter[member[.left], member[.right]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Number] identifier[plus] operator[SEP] identifier[Number] identifier[left] , identifier[Number] identifier[right] operator[SEP] {
Keyword[return] identifier[NumberMath] operator[SEP] identifier[add] operator[SEP] identifier[left] , identifier[right] operator[SEP] oper... |
protected static boolean isLogoutRequestConfirmed(final RequestContext requestContext) {
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
return request.getParameterMap().containsKey(REQUEST_PARAM_LOGOUT_REQUEST_CONFIRMED);
} | class class_name[name] begin[{]
method[isLogoutRequestConfirmed, return_type[type[boolean]], modifier[static protected], parameter[requestContext]] begin[{]
local_variable[type[val], request]
return[call[request.getParameterMap, parameter[]]]
end[}]
END[}] | Keyword[protected] Keyword[static] Keyword[boolean] identifier[isLogoutRequestConfirmed] operator[SEP] Keyword[final] identifier[RequestContext] identifier[requestContext] operator[SEP] {
identifier[val] identifier[request] operator[=] identifier[WebUtils] operator[SEP] identifier[getHttpServletRequestFromExtern... |
@SuppressWarnings({"WeakerAccess", "unused"})
public Picture renderViewToPicture(String viewId, int widthInPixels, int heightInPixels)
{
RenderOptions renderOptions = new RenderOptions();
renderOptions.view(viewId)
.viewPort(0f, 0f, (float) widthInPixels, (float) heightInPixe... | class class_name[name] begin[{]
method[renderViewToPicture, return_type[type[Picture]], modifier[public], parameter[viewId, widthInPixels, heightInPixels]] begin[{]
local_variable[type[RenderOptions], renderOptions]
call[renderOptions.view, parameter[member[.viewId]]]
local_vari... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] identifier[Picture] identifier[renderViewToPicture] operator[SEP] identifier[String] identifier[viewId] , Keyword[int] identifier[widthInPixels] , Keyword[int] identifier[heightInPix... |
public float getS15Fixed16() throws IOException
{
if (_isMotorolaByteOrder) {
float res = (getByte() & 0xFF) << 8 |
(getByte() & 0xFF);
int d = (getByte() & 0xFF) << 8 |
(getByte() & 0xFF);
return (float)(res + d/65536.0... | class class_name[name] begin[{]
method[getS15Fixed16, return_type[type[float]], modifier[public], parameter[]] begin[{]
if[member[._isMotorolaByteOrder]] begin[{]
local_variable[type[float], res]
local_variable[type[int], d]
return[Cast(expression=BinaryOpera... | Keyword[public] Keyword[float] identifier[getS15Fixed16] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[_isMotorolaByteOrder] operator[SEP] {
Keyword[float] identifier[res] operator[=] operator[SEP] identifier[getByte] operator[SEP] operator[... |
public static void main(String[] args) throws Throwable {
String homeDir = getHomeDir(args);
System.setProperty(TRACE_PARSER_HOME, homeDir);
String dataDir = homeDir + File.separator + "data" + File.separator;
System.setProperty(TRACE_PARSER_DATA, dataDir);
if (!initLOG4JPropert... | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[String], homeDir]
call[System.setProperty, parameter[member[.TRACE_PARSER_HOME], member[.homeDir]]]
local_variable[type[String], dataDir]
... | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] {
identifier[String] identifier[homeDir] operator[=] identifier[getHomeDir] operator[SEP] identifier[args] operator[SEP]... |
public D4Cursor
compileSequence(DapVariable var, DapSequence dapseq, D4Cursor container)
throws DapException
{
int pos = getPos(this.databuffer);
D4Cursor seq = new D4Cursor(Scheme.SEQUENCE, this.dsp, var, container)
.setOffset(pos);
List<DapVariable> dfields ... | class class_name[name] begin[{]
method[compileSequence, return_type[type[D4Cursor]], modifier[public], parameter[var, dapseq, container]] begin[{]
local_variable[type[int], pos]
local_variable[type[D4Cursor], seq]
local_variable[type[List], dfields]
local_variable[type[long], nr... | Keyword[public] identifier[D4Cursor] identifier[compileSequence] operator[SEP] identifier[DapVariable] identifier[var] , identifier[DapSequence] identifier[dapseq] , identifier[D4Cursor] identifier[container] operator[SEP] Keyword[throws] identifier[DapException] {
Keyword[int] identifier[pos] operator[=] iden... |
@Override
public void componentMetaDataCreated(MetaDataEvent<ComponentMetaData> event) {
JaccService js = jaccService.getService();
if (js != null) {
MetaData metaData = event.getMetaData();
if (metaData instanceof BeanMetaData) {
BeanMetaData bmd = (BeanMetaD... | class class_name[name] begin[{]
method[componentMetaDataCreated, return_type[void], modifier[public], parameter[event]] begin[{]
local_variable[type[JaccService], js]
if[binary_operation[member[.js], !=, literal[null]]] begin[{]
local_variable[type[MetaData], metaData]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[componentMetaDataCreated] operator[SEP] identifier[MetaDataEvent] operator[<] identifier[ComponentMetaData] operator[>] identifier[event] operator[SEP] {
identifier[JaccService] identifier[js] operator[=] identifier[jaccService] operator... |
protected static Object escape(Object val) {
if (val instanceof String) {
return ((String)val).replaceAll("/", PATH_SEP_TOKEN);
} else {
return val;
}
} | class class_name[name] begin[{]
method[escape, return_type[type[Object]], modifier[static protected], parameter[val]] begin[{]
if[binary_operation[member[.val], instanceof, type[String]]] begin[{]
return[Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operat... | Keyword[protected] Keyword[static] identifier[Object] identifier[escape] operator[SEP] identifier[Object] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] identifier[val] Keyword[instanceof] identifier[String] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[String] oper... |
public static List<Match> searchRecursive(Match match, List<MappedConst> mc, int index)
{
List<Match> result = new ArrayList<Match>();
Constraint con = mc.get(index).getConstr();
int[] ind = mc.get(index).getInds();
int lastInd = ind[ind.length-1];
if (con.canGenerate() && match.get(lastInd) == null)
{
... | class class_name[name] begin[{]
method[searchRecursive, return_type[type[List]], modifier[public static], parameter[match, mc, index]] begin[{]
local_variable[type[List], result]
local_variable[type[Constraint], con]
local_variable[type[int], ind]
local_variable[type[int], lastI... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Match] operator[>] identifier[searchRecursive] operator[SEP] identifier[Match] identifier[match] , identifier[List] operator[<] identifier[MappedConst] operator[>] identifier[mc] , Keyword[int] identifier[index] operator[SEP] {
identifier[... |
public Object[] toArrayCached() {
Object[] readCacheArray = generatedCacheMap.values().toArray();
Object[] writeCacheArray = resultSetCacheMap.values().toArray();
Object[] combinedCacheArray = new Object[readCacheArray.length + writeCacheArray.length];
System.arraycopy(readCacheArray, ... | class class_name[name] begin[{]
method[toArrayCached, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[Object], readCacheArray]
local_variable[type[Object], writeCacheArray]
local_variable[type[Object], combinedCacheArray]
call[Syste... | Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[toArrayCached] operator[SEP] operator[SEP] {
identifier[Object] operator[SEP] operator[SEP] identifier[readCacheArray] operator[=] identifier[generatedCacheMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] ide... |
public static boolean copy(InputStream pFrom, OutputStream pTo) throws IOException {
Validate.notNull(pFrom, "from");
Validate.notNull(pTo, "to");
// TODO: Consider using file channels for faster copy where possible
// Use buffer size two times byte array, to avoid i/o bottleneck... | class class_name[name] begin[{]
method[copy, return_type[type[boolean]], modifier[public static], parameter[pFrom, pTo]] begin[{]
call[Validate.notNull, parameter[member[.pFrom], literal["from"]]]
call[Validate.notNull, parameter[member[.pTo], literal["to"]]]
local_varia... | Keyword[public] Keyword[static] Keyword[boolean] identifier[copy] operator[SEP] identifier[InputStream] identifier[pFrom] , identifier[OutputStream] identifier[pTo] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[pFrom] , l... |
protected Class<? extends DBObject> getInternalClass(final String path) {
return objectFactory.getClassForPath(asList(path.split("\\.")));
} | class class_name[name] begin[{]
method[getInternalClass, return_type[type[Class]], modifier[protected], parameter[path]] begin[{]
return[call[objectFactory.getClassForPath, parameter[call[.asList, parameter[call[path.split, parameter[literal["\\."]]]]]]]]
end[}]
END[}] | Keyword[protected] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[DBObject] operator[>] identifier[getInternalClass] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] {
Keyword[return] identifier[objectFactory] operator[SEP] identifier[getClassForPath] operator... |
public double getContactOverlapScore(StructureInterface other, boolean invert) {
Structure thisStruct = getParentStructure();
Structure otherStruct = other.getParentStructure();
if (thisStruct!=otherStruct) {
// in the current implementation, comparison between different structure doesn't make much sense
... | class class_name[name] begin[{]
method[getContactOverlapScore, return_type[type[double]], modifier[public], parameter[other, invert]] begin[{]
local_variable[type[Structure], thisStruct]
local_variable[type[Structure], otherStruct]
if[binary_operation[member[.thisStruct], !=, me... | Keyword[public] Keyword[double] identifier[getContactOverlapScore] operator[SEP] identifier[StructureInterface] identifier[other] , Keyword[boolean] identifier[invert] operator[SEP] {
identifier[Structure] identifier[thisStruct] operator[=] identifier[getParentStructure] operator[SEP] operator[SEP] operator[SEP... |
public static String encodeBytes( byte[] source, int off, int len )
{
return encodeBytes( source, off, len, true );
} | class class_name[name] begin[{]
method[encodeBytes, return_type[type[String]], modifier[public static], parameter[source, off, len]] begin[{]
return[call[.encodeBytes, parameter[member[.source], member[.off], member[.len], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[encodeBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] {
Keyword[return] identifier[encodeBytes] operator[SEP] identifier[source] , identif... |
public String getUrl(SlingHttpServletRequest request, RendererContext context) {
String uri;
switch (kind) {
case FILE: // we can only refer to that exact resource.
uri = path;
break;
case CLIENTLIB:
uri = ClientlibServlet.makePath(... | class class_name[name] begin[{]
method[getUrl, return_type[type[String]], modifier[public], parameter[request, context]] begin[{]
local_variable[type[String], uri]
SwitchStatement(cases=[SwitchStatementCase(case=['FILE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberR... | Keyword[public] identifier[String] identifier[getUrl] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] , identifier[RendererContext] identifier[context] operator[SEP] {
identifier[String] identifier[uri] operator[SEP] Keyword[switch] operator[SEP] identifier[kind] operator[SEP] {
... |
public static void deleteIfExists(final File file)
{
if (file.exists())
{
try
{
Files.delete(file.toPath());
}
catch (final IOException ex)
{
LangUtil.rethrowUnchecked(ex);
}
}
} | class class_name[name] begin[{]
method[deleteIfExists, return_type[void], modifier[public static], parameter[file]] begin[{]
if[call[file.exists, parameter[]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], memb... | Keyword[public] Keyword[static] Keyword[void] identifier[deleteIfExists] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] {
Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keyword[try] {
... |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11")
public void setKauf(JAXBElement<Object> value) {
this.kauf = value;
} | class class_name[name] begin[{]
method[setKauf, return_type[void], modifier[public], parameter[value]] begin[{]
assign[THIS[member[None.kauf]], member[.value]]
end[}]
END[}] | annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setKauf] operator[SEP] identifier[JAXBElement] operator[<] identifier... |
public EventContext createActivityEndEventContext(ActivityContext ac,
EventUnreferencedCallback unreferencedCallback) {
final EventReferencesHandlerImpl referencesHandler = new EventReferencesHandlerImpl();
final EventContextData data = dataSource.newEventContextData(
ActivityEndEventImpl.EVENT_TYPE_ID,
... | class class_name[name] begin[{]
method[createActivityEndEventContext, return_type[type[EventContext]], modifier[public], parameter[ac, unreferencedCallback]] begin[{]
local_variable[type[EventReferencesHandlerImpl], referencesHandler]
local_variable[type[EventContextData], data]
local_v... | Keyword[public] identifier[EventContext] identifier[createActivityEndEventContext] operator[SEP] identifier[ActivityContext] identifier[ac] , identifier[EventUnreferencedCallback] identifier[unreferencedCallback] operator[SEP] {
Keyword[final] identifier[EventReferencesHandlerImpl] identifier[referencesHandler]... |
protected void clear(int count, int margin) {
if (margin < 64) {
margin = 64;
}
int maxlookup = hashIndex.newNodePointer;
int accessBase = getAccessCountCeiling(count, margin);
for (int lookup = 0; lookup < maxlookup; lookup++) {
Object o = objectKeyTa... | class class_name[name] begin[{]
method[clear, return_type[void], modifier[protected], parameter[count, margin]] begin[{]
if[binary_operation[member[.margin], <, literal[64]]] begin[{]
assign[member[.margin], literal[64]]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[void] identifier[clear] operator[SEP] Keyword[int] identifier[count] , Keyword[int] identifier[margin] operator[SEP] {
Keyword[if] operator[SEP] identifier[margin] operator[<] Other[64] operator[SEP] {
identifier[margin] operator[=] Other[64] operator[SEP]
}
K... |
protected void BuildNewLGSubrs(int Font)throws IOException
{
// If the font is CID then the lsubrs are divided into FontDicts.
// for each FD array the lsubrs will be subsetted.
if(fonts[Font].isCID)
{
// Init the hashmap-array and the arraylist-array to hold the subrs used
// in each private dict.
hS... | class class_name[name] begin[{]
method[BuildNewLGSubrs, return_type[void], modifier[protected], parameter[Font]] begin[{]
if[member[.fonts]] begin[{]
assign[member[.hSubrsUsed], ArrayCreator(dimensions=[MemberReference(member=fonts, postfix_operators=[], prefix_operators... | Keyword[protected] Keyword[void] identifier[BuildNewLGSubrs] operator[SEP] Keyword[int] identifier[Font] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[fonts] operator[SEP] identifier[Font] operator[SEP] operator[SEP] identifier[isCID] operator[SEP] {
iden... |
public static boolean hasOnlyNum(String str) {
if (isEmpty(str))
return false;
Pattern pattern = Pattern.compile("[0-9]*");
return pattern.matcher(str).matches();
} | class class_name[name] begin[{]
method[hasOnlyNum, return_type[type[boolean]], modifier[public static], parameter[str]] begin[{]
if[call[.isEmpty, parameter[member[.str]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Pattern], pattern]
... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasOnlyNum] operator[SEP] identifier[String] identifier[str] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[Pattern] ident... |
private void checkAbstractPropertyAccess(Node method) {
if (NodeUtil.isLhsOfAssign(method)) {
// Allow declaring abstract methods. (This assumes they are never re-assigned)
// /** @abstract */ Foo.prototype.bar = function() {}
return;
}
FunctionType methodType = getJSType(method).toMay... | class class_name[name] begin[{]
method[checkAbstractPropertyAccess, return_type[void], modifier[private], parameter[method]] begin[{]
if[call[NodeUtil.isLhsOfAssign, parameter[member[.method]]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[t... | Keyword[private] Keyword[void] identifier[checkAbstractPropertyAccess] operator[SEP] identifier[Node] identifier[method] operator[SEP] {
Keyword[if] operator[SEP] identifier[NodeUtil] operator[SEP] identifier[isLhsOfAssign] operator[SEP] identifier[method] operator[SEP] operator[SEP] {
Keyword[return]... |
public Lint suppress(LintCategory... lc) {
Lint l = new Lint(this);
l.values.removeAll(Arrays.asList(lc));
l.suppressedValues.addAll(Arrays.asList(lc));
return l;
} | class class_name[name] begin[{]
method[suppress, return_type[type[Lint]], modifier[public], parameter[lc]] begin[{]
local_variable[type[Lint], l]
call[l.values.removeAll, parameter[call[Arrays.asList, parameter[member[.lc]]]]]
call[l.suppressedValues.addAll, parameter[ca... | Keyword[public] identifier[Lint] identifier[suppress] operator[SEP] identifier[LintCategory] operator[...] identifier[lc] operator[SEP] {
identifier[Lint] identifier[l] operator[=] Keyword[new] identifier[Lint] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[l] operator[SEP] identifier[values]... |
public static SerializationFormat toSerializationFormat(TProtocolFactory protoFactory) {
requireNonNull(protoFactory, "protoFactory");
if (protoFactory instanceof TBinaryProtocol.Factory) {
return ThriftSerializationFormats.BINARY;
} else if (protoFactory instanceof TCompactProtocol... | class class_name[name] begin[{]
method[toSerializationFormat, return_type[type[SerializationFormat]], modifier[public static], parameter[protoFactory]] begin[{]
call[.requireNonNull, parameter[member[.protoFactory], literal["protoFactory"]]]
if[binary_operation[member[.protoFact... | Keyword[public] Keyword[static] identifier[SerializationFormat] identifier[toSerializationFormat] operator[SEP] identifier[TProtocolFactory] identifier[protoFactory] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[protoFactory] , literal[String] operator[SEP] operator[SEP] Keyword[if] operat... |
public ResultSet runSelect(String logMessage, String query, Object[] arguments) throws SQLException {
long before = System.currentTimeMillis();
try {
return runSelect(query, arguments);
}
finally {
if (logger.isDebugEnabled()) {
long after = System... | class class_name[name] begin[{]
method[runSelect, return_type[type[ResultSet]], modifier[public], parameter[logMessage, query, arguments]] begin[{]
local_variable[type[long], before]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=query, postfix... | Keyword[public] identifier[ResultSet] identifier[runSelect] operator[SEP] identifier[String] identifier[logMessage] , identifier[String] identifier[query] , identifier[Object] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[long] identifier[bef... |
public void addRightWhere(int left, IntBitSet result) {
if (line[left] != null) {
result.addAll(line[left]);
}
} | class class_name[name] begin[{]
method[addRightWhere, return_type[void], modifier[public], parameter[left, result]] begin[{]
if[binary_operation[member[.line], !=, literal[null]]] begin[{]
call[result.addAll, parameter[member[.line]]]
else begin[{]
None
e... | Keyword[public] Keyword[void] identifier[addRightWhere] operator[SEP] Keyword[int] identifier[left] , identifier[IntBitSet] identifier[result] operator[SEP] {
Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[left] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[re... |
public static void expandAll(JTree tree, TreePath path, boolean expand)
{
TreeNode node = (TreeNode)path.getLastPathComponent();
if (node.getChildCount() >= 0)
{
Enumeration<?> enumeration = node.children();
while (enumeration.hasMoreElements())
{
TreeNode n = (TreeNode)enumeration.nextElement();
... | class class_name[name] begin[{]
method[expandAll, return_type[void], modifier[public static], parameter[tree, path, expand]] begin[{]
local_variable[type[TreeNode], node]
if[binary_operation[call[node.getChildCount, parameter[]], >=, literal[0]]] begin[{]
local_variable[type... | Keyword[public] Keyword[static] Keyword[void] identifier[expandAll] operator[SEP] identifier[JTree] identifier[tree] , identifier[TreePath] identifier[path] , Keyword[boolean] identifier[expand] operator[SEP] {
identifier[TreeNode] identifier[node] operator[=] operator[SEP] identifier[TreeNode] operator[SEP] i... |
public static boolean typesMatch(ParaObject so) {
return (so == null) ? false : so.getClass().equals(toClass(so.getType()));
} | class class_name[name] begin[{]
method[typesMatch, return_type[type[boolean]], modifier[public static], parameter[so]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=so, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(p... | Keyword[public] Keyword[static] Keyword[boolean] identifier[typesMatch] operator[SEP] identifier[ParaObject] identifier[so] operator[SEP] {
Keyword[return] operator[SEP] identifier[so] operator[==] Other[null] operator[SEP] operator[?] literal[boolean] operator[:] identifier[so] operator[SEP] identifier[getClas... |
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case XbasePackage.XBASIC_FOR_LOOP_EXPRESSION__EXPRESSION:
return basicSetExpression(null, msgs);
case XbasePackage.XBASIC_FOR_LOOP_EXPRESSION__EACH_EXPRESSION:
re... | class class_name[name] begin[{]
method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XBASIC_FOR_LOOP_EXPRESSION__EXPRESSION, postfix_operators=[], prefix_oper... | annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] {
Keyword[switch] operator[SEP] identifi... |
public static void setAllowSmallerIntervalsForMarshmallow(boolean allowSmallerIntervals) {
if (allowSmallerIntervals && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
throw new IllegalStateException("This method is only allowed to call on Android M or earlier");
}
JobConfig.allowS... | class class_name[name] begin[{]
method[setAllowSmallerIntervalsForMarshmallow, return_type[void], modifier[public static], parameter[allowSmallerIntervals]] begin[{]
if[binary_operation[member[.allowSmallerIntervals], &&, binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_... | Keyword[public] Keyword[static] Keyword[void] identifier[setAllowSmallerIntervalsForMarshmallow] operator[SEP] Keyword[boolean] identifier[allowSmallerIntervals] operator[SEP] {
Keyword[if] operator[SEP] identifier[allowSmallerIntervals] operator[&&] identifier[Build] operator[SEP] identifier[VERSION] operator[S... |
public static <T> List<T> createList(T value, int n) {
List<T> result = new ArrayList<>(n);
for (int i = 0; i < n; i++)
result.add(value);
return result;
} | class class_name[name] begin[{]
method[createList, return_type[type[List]], modifier[public static], parameter[value, n]] begin[{]
local_variable[type[List], result]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], ... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[createList] operator[SEP] identifier[T] identifier[value] , Keyword[int] identifier[n] operator[SEP] {
identifier[List] operator[<] identifier[T] operator[>] identifier[result]... |
private boolean isDummyRedGEntityConstructor(Constructor constructor) {
if (constructor.getParameterCount() < 1) {
return false;
}
if (!AbstractRedG.class.isAssignableFrom(constructor.getParameterTypes()[0])) {
return false;
}
for (int i = 1; i < co... | class class_name[name] begin[{]
method[isDummyRedGEntityConstructor, return_type[type[boolean]], modifier[private], parameter[constructor]] begin[{]
if[binary_operation[call[constructor.getParameterCount, parameter[]], <, literal[1]]] begin[{]
return[literal[false]]
else beg... | Keyword[private] Keyword[boolean] identifier[isDummyRedGEntityConstructor] operator[SEP] identifier[Constructor] identifier[constructor] operator[SEP] {
Keyword[if] operator[SEP] identifier[constructor] operator[SEP] identifier[getParameterCount] operator[SEP] operator[SEP] operator[<] Other[1] operator[SEP] {
... |
public static <E> HashSet<E> asHashSet(final Collection<E> c) {
if (noItems(c)) {
return new HashSet<E>();
}
return new HashSet<E>(c);
} | class class_name[name] begin[{]
method[asHashSet, return_type[type[HashSet]], modifier[public static], parameter[c]] begin[{]
if[call[.noItems, parameter[member[.c]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix... | Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[HashSet] operator[<] identifier[E] operator[>] identifier[asHashSet] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[E] operator[>] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[noItem... |
public static void copyDirectory(File srcDir, File destDir,
FileFilter filter, boolean preserveFileDate) throws IOException {
if (srcDir == null) {
throw new NullPointerException("Source must not be null");
}
if (destDir == null) {
throw new NullPointerException("Destination must not be nu... | class class_name[name] begin[{]
method[copyDirectory, return_type[void], modifier[public static], parameter[srcDir, destDir, filter, preserveFileDate]] begin[{]
if[binary_operation[member[.srcDir], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Litera... | Keyword[public] Keyword[static] Keyword[void] identifier[copyDirectory] operator[SEP] identifier[File] identifier[srcDir] , identifier[File] identifier[destDir] , identifier[FileFilter] identifier[filter] , Keyword[boolean] identifier[preserveFileDate] operator[SEP] Keyword[throws] identifier[IOException] {
K... |
private void valueProviderToBean(ValueProvider<String> valueProvider, Object bean) {
if (null == valueProvider) {
return;
}
final CopyOptions copyOptions = this.copyOptions;
Class<?> actualEditable = bean.getClass();
if (copyOptions.editable != null) {
// 检查限制类是否为target的父类或接口
if (false == c... | class class_name[name] begin[{]
method[valueProviderToBean, return_type[void], modifier[private], parameter[valueProvider, bean]] begin[{]
if[binary_operation[literal[null], ==, member[.valueProvider]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_va... | Keyword[private] Keyword[void] identifier[valueProviderToBean] operator[SEP] identifier[ValueProvider] operator[<] identifier[String] operator[>] identifier[valueProvider] , identifier[Object] identifier[bean] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[valueProvider] operator[... |
public FbBotMillResponse build(MessageEnvelope envelope) {
User recipient = getRecipient(envelope);
return new FbBotMillActionResponse(recipient, action);
} | class class_name[name] begin[{]
method[build, return_type[type[FbBotMillResponse]], modifier[public], parameter[envelope]] begin[{]
local_variable[type[User], recipient]
return[ClassCreator(arguments=[MemberReference(member=recipient, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] identifier[FbBotMillResponse] identifier[build] operator[SEP] identifier[MessageEnvelope] identifier[envelope] operator[SEP] {
identifier[User] identifier[recipient] operator[=] identifier[getRecipient] operator[SEP] identifier[envelope] operator[SEP] operator[SEP] Keyword[return] Keyword[new] id... |
public T params(Map transformation) {
this.transformation = transformation;
transformations.add(transformation);
return (T) this;
} | class class_name[name] begin[{]
method[params, return_type[type[T]], modifier[public], parameter[transformation]] begin[{]
assign[THIS[member[None.transformation]], member[.transformation]]
call[transformations.add, parameter[member[.transformation]]]
return[Cast(express... | Keyword[public] identifier[T] identifier[params] operator[SEP] identifier[Map] identifier[transformation] operator[SEP] {
Keyword[this] operator[SEP] identifier[transformation] operator[=] identifier[transformation] operator[SEP] identifier[transformations] operator[SEP] identifier[add] operator[SEP] identifier[... |
public String getShortName(long instant, Locale locale) {
if (locale == null) {
locale = Locale.getDefault();
}
String nameKey = getNameKey(instant);
if (nameKey == null) {
return iID;
}
String name;
NameProvider np = getNameProvider();
... | class class_name[name] begin[{]
method[getShortName, return_type[type[String]], modifier[public], parameter[instant, locale]] begin[{]
if[binary_operation[member[.locale], ==, literal[null]]] begin[{]
assign[member[.locale], call[Locale.getDefault, parameter[]]]
... | Keyword[public] identifier[String] identifier[getShortName] operator[SEP] Keyword[long] identifier[instant] , identifier[Locale] identifier[locale] operator[SEP] {
Keyword[if] operator[SEP] identifier[locale] operator[==] Other[null] operator[SEP] {
identifier[locale] operator[=] identifier[Locale] o... |
public static byte[] encodeHexStringToBCD(String hexString) {
hexString=hexString.toLowerCase();
int noOfDigits = hexString.length();
boolean isOdd = noOfDigits % 2 == 0 ? false : true;
int noOfBytes = noOfDigits / 2;
if (isOdd) {
noOfBytes++;
}
byte[... | class class_name[name] begin[{]
method[encodeHexStringToBCD, return_type[type[byte]], modifier[public static], parameter[hexString]] begin[{]
assign[member[.hexString], call[hexString.toLowerCase, parameter[]]]
local_variable[type[int], noOfDigits]
local_variable[type[boolean], ... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[encodeHexStringToBCD] operator[SEP] identifier[String] identifier[hexString] operator[SEP] {
identifier[hexString] operator[=] identifier[hexString] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP]... |
protected void openDialog(CmsBasicDialog dialog, String windowCaption) {
if (m_dialogWindow != null) {
m_dialogWindow.close();
}
m_dialogWindow = CmsBasicDialog.prepareWindow(DialogWidth.wide);
m_dialogWindow.setContent(dialog);
m_dialogWindow.setCaption(windowCapti... | class class_name[name] begin[{]
method[openDialog, return_type[void], modifier[protected], parameter[dialog, windowCaption]] begin[{]
if[binary_operation[member[.m_dialogWindow], !=, literal[null]]] begin[{]
call[m_dialogWindow.close, parameter[]]
else begin[{]
N... | Keyword[protected] Keyword[void] identifier[openDialog] operator[SEP] identifier[CmsBasicDialog] identifier[dialog] , identifier[String] identifier[windowCaption] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_dialogWindow] operator[!=] Other[null] operator[SEP] {
identifier[m_dialogWindow] o... |
public Set getSIBDestinationLocalitySet(String busName, String uuid)
throws SIBExceptionBase {
return getDestinationCache()
.getSIBDestinationLocalitySet(busName, uuid);
} | class class_name[name] begin[{]
method[getSIBDestinationLocalitySet, return_type[type[Set]], modifier[public], parameter[busName, uuid]] begin[{]
return[call[.getDestinationCache, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Set] identifier[getSIBDestinationLocalitySet] operator[SEP] identifier[String] identifier[busName] , identifier[String] identifier[uuid] operator[SEP] Keyword[throws] identifier[SIBExceptionBase] {
Keyword[return] identifier[getDestinationCache] operator[SEP] operator[SEP] operator[SE... |
@Nonnull
public EChange stop ()
{
// Already stopped?
if (m_nStartDT == 0)
return EChange.UNCHANGED;
final long nCurrentNanoTime = getCurrentNanoTime ();
m_nDurationNanos += (nCurrentNanoTime - m_nStartDT);
m_nStartDT = 0;
return EChange.CHANGED;
} | class class_name[name] begin[{]
method[stop, return_type[type[EChange]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_nStartDT], ==, literal[0]]] begin[{]
return[member[EChange.UNCHANGED]]
else begin[{]
None
end[}]
local_variable[type[long], nCur... | annotation[@] identifier[Nonnull] Keyword[public] identifier[EChange] identifier[stop] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_nStartDT] operator[==] Other[0] operator[SEP] Keyword[return] identifier[EChange] operator[SEP] identifier[UNCHANGED] operator[SEP] Keyword[final] Keyword[lo... |
@Given("^I switch to iframe with '([^:]*?):(.+?)'$")
public void seleniumIdFrame(String method, String idframe) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException {
assertThat(commonspec.locateElement(method, idframe, 1));
if (method.equals("id") || method.equals("name")) {... | class class_name[name] begin[{]
method[seleniumIdFrame, return_type[void], modifier[public], parameter[method, idframe]] begin[{]
call[.assertThat, parameter[call[commonspec.locateElement, parameter[member[.method], member[.idframe], literal[1]]]]]
if[binary_operation[call[metho... | annotation[@] identifier[Given] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[seleniumIdFrame] operator[SEP] identifier[String] identifier[method] , identifier[String] identifier[idframe] operator[SEP] Keyword[throws] identifier[IllegalAccessException] , identifier[NoSuchFieldEx... |
public void marshall(BatchDetachPolicy batchDetachPolicy, ProtocolMarshaller protocolMarshaller) {
if (batchDetachPolicy == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(batchDetachPolicy.getPolicyR... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[batchDetachPolicy, protocolMarshaller]] begin[{]
if[binary_operation[member[.batchDetachPolicy], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchDetachPolicy] identifier[batchDetachPolicy] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[batchDetachPolicy] operator[==] Other[null] operator[SEP] {
... |
public final CryptoKeyVersion destroyCryptoKeyVersion(CryptoKeyVersionName name) {
DestroyCryptoKeyVersionRequest request =
DestroyCryptoKeyVersionRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return destroyCryptoKeyVersion(request);
} | class class_name[name] begin[{]
method[destroyCryptoKeyVersion, return_type[type[CryptoKeyVersion]], modifier[final public], parameter[name]] begin[{]
local_variable[type[DestroyCryptoKeyVersionRequest], request]
return[call[.destroyCryptoKeyVersion, parameter[member[.request]]]]
end[}]
END... | Keyword[public] Keyword[final] identifier[CryptoKeyVersion] identifier[destroyCryptoKeyVersion] operator[SEP] identifier[CryptoKeyVersionName] identifier[name] operator[SEP] {
identifier[DestroyCryptoKeyVersionRequest] identifier[request] operator[=] identifier[DestroyCryptoKeyVersionRequest] operator[SEP] ident... |
private Document getDOMObject(InputStream is, boolean validating)
throws SAXException, IOException, ParserConfigurationException {
// Create a builder factory
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
if (!validating) {
factory.setValidating(validating);
fact... | class class_name[name] begin[{]
method[getDOMObject, return_type[type[Document]], modifier[private], parameter[is, validating]] begin[{]
local_variable[type[DocumentBuilderFactory], factory]
if[member[.validating]] begin[{]
call[factory.setValidating, parameter[m... | Keyword[private] identifier[Document] identifier[getDOMObject] operator[SEP] identifier[InputStream] identifier[is] , Keyword[boolean] identifier[validating] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] , identifier[ParserConfigurationException] {
identifier[DocumentBuilder... |
public void marshall(JobTemplateSettings jobTemplateSettings, ProtocolMarshaller protocolMarshaller) {
if (jobTemplateSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(jobTemplateSettings.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[jobTemplateSettings, protocolMarshaller]] begin[{]
if[binary_operation[member[.jobTemplateSettings], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[JobTemplateSettings] identifier[jobTemplateSettings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[jobTemplateSettings] operator[==] Other[null] operator[SEP] {
... |
public void updatePosition() {
setPosition(CmsPositionBean.getBoundingClientRect(m_element));
for (Widget widget : m_buttonPanel) {
if (widget instanceof CmsInlineEntityWidget) {
((CmsInlineEntityWidget)widget).positionWidget();
}
}
} | class class_name[name] begin[{]
method[updatePosition, return_type[void], modifier[public], parameter[]] begin[{]
call[.setPosition, parameter[call[CmsPositionBean.getBoundingClientRect, parameter[member[.m_element]]]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatemen... | Keyword[public] Keyword[void] identifier[updatePosition] operator[SEP] operator[SEP] {
identifier[setPosition] operator[SEP] identifier[CmsPositionBean] operator[SEP] identifier[getBoundingClientRect] operator[SEP] identifier[m_element] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identif... |
@Nullable
@ReturnsMutableCopy
public static ICommonsMap <String, String> readMap (@Nonnull @WillClose final InputStream aIS)
{
final ICommonsMap <String, String> ret = new CommonsHashMap <> ();
if (readMap (aIS, ret).isFailure ())
return null;
return ret;
} | class class_name[name] begin[{]
method[readMap, return_type[type[ICommonsMap]], modifier[public static], parameter[aIS]] begin[{]
local_variable[type[ICommonsMap], ret]
if[call[.readMap, parameter[member[.aIS], member[.ret]]]] begin[{]
return[literal[null]]
else begin[{]
None
... | annotation[@] identifier[Nullable] annotation[@] identifier[ReturnsMutableCopy] Keyword[public] Keyword[static] identifier[ICommonsMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[readMap] operator[SEP] annotation[@] identifier[Nonnull] annotation[@] identifier[WillClose] Keyword[final] ... |
public <T extends IEntity> void uploadAsync(T entity, InputStream docContent, CallbackHandler callbackHandler) throws FMSException {
IntuitMessage intuitMessage = prepareUpload(entity, docContent);
//set callback handler
intuitMessage.getRequestElements().setCallbackHandler(callbackHandler);
... | class class_name[name] begin[{]
method[uploadAsync, return_type[void], modifier[public], parameter[entity, docContent, callbackHandler]] begin[{]
local_variable[type[IntuitMessage], intuitMessage]
call[intuitMessage.getRequestElements, parameter[]]
call[.executeAsyncInte... | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[IEntity] operator[>] Keyword[void] identifier[uploadAsync] operator[SEP] identifier[T] identifier[entity] , identifier[InputStream] identifier[docContent] , identifier[CallbackHandler] identifier[callbackHandler] operator[SEP] Keyword[throws] ident... |
private static <T> Stream<T> enumerationAsStream(Enumeration<? extends T> e)
{
Iterator<T> iterator = new Iterator<T>()
{
@Override
public T next()
{
return e.nextElement();
}
@Override
public boolean... | class class_name[name] begin[{]
method[enumerationAsStream, return_type[type[Stream]], modifier[private static], parameter[e]] begin[{]
local_variable[type[Iterator], iterator]
return[call[StreamSupport.stream, parameter[call[Spliterators.spliteratorUnknownSize, parameter[member[.iterator], mem... | Keyword[private] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[enumerationAsStream] operator[SEP] identifier[Enumeration] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[e] operator[SEP] {
identifier[Iterato... |
public OutputStream getOutputStream()
{
OutputStream stream=null;
try
{
stream=this.commPort.getOutputStream();
}
catch(IOException exception)
{
throw new FaxException("Unable to extract output stream.",exception);
}
re... | class class_name[name] begin[{]
method[getOutputStream, return_type[type[OutputStream]], modifier[public], parameter[]] begin[{]
local_variable[type[OutputStream], stream]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stream, postfix_operators=... | Keyword[public] identifier[OutputStream] identifier[getOutputStream] operator[SEP] operator[SEP] {
identifier[OutputStream] identifier[stream] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[stream] operator[=] Keyword[this] operator[SEP] identifier[commPort] operator[SEP] identifier[g... |
private String checkSegments(String key, Set<String> corpora, CorpusConfigMap corpusConfigurations)
{
String segmentation = null;
for (String corpus : corpora)
{
CorpusConfig c = null;
if (corpusConfigurations.containsConfig(corpus))
{
c = corpusConfigurations.get(corpus);
... | class class_name[name] begin[{]
method[checkSegments, return_type[type[String]], modifier[private], parameter[key, corpora, corpusConfigurations]] begin[{]
local_variable[type[String], segmentation]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[]... | Keyword[private] identifier[String] identifier[checkSegments] operator[SEP] identifier[String] identifier[key] , identifier[Set] operator[<] identifier[String] operator[>] identifier[corpora] , identifier[CorpusConfigMap] identifier[corpusConfigurations] operator[SEP] {
identifier[String] identifier[segmentati... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.MCFRG__RG_LENGTH:
setRGLength(RG_LENGTH_EDEFAULT);
return;
case AfplibPackage.MCFRG__TRIPLETS:
getTriplets().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MCFRG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[St... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[MCFRG__RG_LENGTH] op... |
public static String getPeriodEffectiveSign(String bucketName, String cosPath, Credentials cred, long expired)
throws AbstractCosException {
return appSignatureBase(cred, bucketName, cosPath, expired, true);
} | class class_name[name] begin[{]
method[getPeriodEffectiveSign, return_type[type[String]], modifier[public static], parameter[bucketName, cosPath, cred, expired]] begin[{]
return[call[.appSignatureBase, parameter[member[.cred], member[.bucketName], member[.cosPath], member[.expired], literal[true]]]]
... | Keyword[public] Keyword[static] identifier[String] identifier[getPeriodEffectiveSign] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[cosPath] , identifier[Credentials] identifier[cred] , Keyword[long] identifier[expired] operator[SEP] Keyword[throws] identifier[AbstractCosExc... |
void computeVisibility(List<Boolean> visibilities, CmsInheritanceInfo info) {
boolean visible = true;
boolean inherited = true;
boolean parentVisible = true;
for (Boolean visibility : visibilities) {
parentVisible = visible;
if (visibility == Boolean.TRUE)... | class class_name[name] begin[{]
method[computeVisibility, return_type[void], modifier[default], parameter[visibilities, info]] begin[{]
local_variable[type[boolean], visible]
local_variable[type[boolean], inherited]
local_variable[type[boolean], parentVisible]
ForStatement(body=... | Keyword[void] identifier[computeVisibility] operator[SEP] identifier[List] operator[<] identifier[Boolean] operator[>] identifier[visibilities] , identifier[CmsInheritanceInfo] identifier[info] operator[SEP] {
Keyword[boolean] identifier[visible] operator[=] literal[boolean] operator[SEP] Keyword[boolean] ident... |
protected static ContentCreateOptions newContentCreateOptions(
DocumentMetadata meta, ContentCreateOptions options,
boolean isCopyColls, boolean isCopyQuality, boolean isCopyMeta,
boolean isCopyPerms, long effectiveVersion) {
ContentCreateOptions opt = (ContentCreateOptions)... | class class_name[name] begin[{]
method[newContentCreateOptions, return_type[type[ContentCreateOptions]], modifier[static protected], parameter[meta, options, isCopyColls, isCopyQuality, isCopyMeta, isCopyPerms, effectiveVersion]] begin[{]
local_variable[type[ContentCreateOptions], opt]
... | Keyword[protected] Keyword[static] identifier[ContentCreateOptions] identifier[newContentCreateOptions] operator[SEP] identifier[DocumentMetadata] identifier[meta] , identifier[ContentCreateOptions] identifier[options] , Keyword[boolean] identifier[isCopyColls] , Keyword[boolean] identifier[isCopyQuality] , Keyword... |
@Override
public PaxDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) {
return (PaxDate) super.resolveDate(fieldValues, resolverStyle);
} | class class_name[name] begin[{]
method[resolveDate, return_type[type[PaxDate]], modifier[public], parameter[fieldValues, resolverStyle]] begin[{]
return[Cast(expression=SuperMethodInvocation(arguments=[MemberReference(member=fieldValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=... | annotation[@] identifier[Override] Keyword[public] identifier[PaxDate] identifier[resolveDate] operator[SEP] identifier[Map] operator[<] identifier[TemporalField] , identifier[Long] operator[>] identifier[fieldValues] , identifier[ResolverStyle] identifier[resolverStyle] operator[SEP] {
Keyword[return] operato... |
public void removeXmitQueuePoint(SIBUuid8 meUuid)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeXmitQueuePoint", meUuid);
if (_xmitQueuePoints != null)
{
synchronized(_xmitQueuePoints)
{
_xmitQueuePoints.remove(meUuid);
}
}
... | class class_name[name] begin[{]
method[removeXmitQueuePoint, return_type[void], modifier[public], parameter[meUuid]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[me... | Keyword[public] Keyword[void] identifier[removeXmitQueuePoint] operator[SEP] identifier[SIBUuid8] identifier[meUuid] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[... |
protected void checkTransaction() throws IllegalStateException {
try {
if (!sleeContainer.getTransactionManager().getTransaction().equals(this.transaction)) {
throw new IllegalStateException();
}
} catch (SystemException e) {
throw new IllegalStateException();
}
} | class class_name[name] begin[{]
method[checkTransaction, return_type[void], modifier[protected], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getTransactionManager, postfix_operators=[], prefix_operators=['!'], qualifier=sleeContainer, selectors=... | Keyword[protected] Keyword[void] identifier[checkTransaction] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalStateException] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[sleeContainer] operator[SEP] identifier[getTransactionManager] operator[SEP] operator[SEP] opera... |
private void dfsComparison(Report report, Arbitrator arbitrator, List<Node> a, List<Node> b, String nameA,
String nameB) {
// #1 pre-process lists
arbitrator.preProcessor(a);
arbitrator.preProcessor(b);
// #2 diff nodes
int i=0;
int j=0;
... | class class_name[name] begin[{]
method[dfsComparison, return_type[void], modifier[private], parameter[report, arbitrator, a, b, nameA, nameB]] begin[{]
call[arbitrator.preProcessor, parameter[member[.a]]]
call[arbitrator.preProcessor, parameter[member[.b]]]
local_variabl... | Keyword[private] Keyword[void] identifier[dfsComparison] operator[SEP] identifier[Report] identifier[report] , identifier[Arbitrator] identifier[arbitrator] , identifier[List] operator[<] identifier[Node] operator[>] identifier[a] , identifier[List] operator[<] identifier[Node] operator[>] identifier[b] , identifie... |
private void resolveIncompleteTransactions() throws SQLException {
switch(transactionState) {
case COMPLETED:
//All we know for certain is that at least one commit/rollback was called. Do nothing.
break;
case STARTED:
//At least one statement was created with... | class class_name[name] begin[{]
method[resolveIncompleteTransactions, return_type[void], modifier[private], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['COMPLETED'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STARTED'], statements=[IfState... | Keyword[private] Keyword[void] identifier[resolveIncompleteTransactions] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[switch] operator[SEP] identifier[transactionState] operator[SEP] {
Keyword[case] identifier[COMPLETED] operator[:] Keyword[break] operator[SEP] Keywo... |
public String getStackMessage() {
if (lineNumberEnd.longValue() > 0 && !lineNumberStart.equals(lineNumberEnd)) {
return "at " + testFilePath + "(" + actionName + ":" + lineNumberStart + "-" + lineNumberEnd + ")";
} else {
return "at " + testFilePath + "(" + actionName + ":" + lin... | class class_name[name] begin[{]
method[getStackMessage, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[call[lineNumberEnd.longValue, parameter[]], >, literal[0]], &&, call[lineNumberStart.equals, parameter[member[.lineNumberEnd]]]]] begin... | Keyword[public] identifier[String] identifier[getStackMessage] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[lineNumberEnd] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] operator[!] identifier[lineNumberStart] operator[SEP] identifier[equal... |
@Deprecated
public synchronized FailureDetectorConfig setNodes(Collection<Node> nodes) {
Utils.notNull(nodes);
this.nodes = new HashSet<Node>(nodes);
return this;
} | class class_name[name] begin[{]
method[setNodes, return_type[type[FailureDetectorConfig]], modifier[synchronized public], parameter[nodes]] begin[{]
call[Utils.notNull, parameter[member[.nodes]]]
assign[THIS[member[None.nodes]], ClassCreator(arguments=[MemberReference(member=nod... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[synchronized] identifier[FailureDetectorConfig] identifier[setNodes] operator[SEP] identifier[Collection] operator[<] identifier[Node] operator[>] identifier[nodes] operator[SEP] {
identifier[Utils] operator[SEP] identifier[notNull] operator[SEP] ident... |
public Packer setContainer(final Container cont) throws IllegalAccessException {
if (container != null) {
final Packer p = (Packer) clone();
container.setLayout(p);
}
container = cont;
cont.setLayout(this);
return this;
} | class class_name[name] begin[{]
method[setContainer, return_type[type[Packer]], modifier[public], parameter[cont]] begin[{]
if[binary_operation[member[.container], !=, literal[null]]] begin[{]
local_variable[type[Packer], p]
call[container.setLayout, paramete... | Keyword[public] identifier[Packer] identifier[setContainer] operator[SEP] Keyword[final] identifier[Container] identifier[cont] operator[SEP] Keyword[throws] identifier[IllegalAccessException] {
Keyword[if] operator[SEP] identifier[container] operator[!=] Other[null] operator[SEP] {
Keyword[final] ide... |
@Override
public List<CommerceAccountUserRel> findAll(int start, int end) {
return findAll(start, end, null);
} | class class_name[name] begin[{]
method[findAll, return_type[type[List]], modifier[public], parameter[start, end]] begin[{]
return[call[.findAll, parameter[member[.start], member[.end], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceAccountUserRel] operator[>] identifier[findAll] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[findAll] operator[SEP] identifier[start] , id... |
@CommandArgument
public void start() {
System.out.println("Starting server");
try {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
EmbeddedDataSource ds = new EmbeddedDataSource();
ds.setConnectionAttributes("create=true");
ds.setDatabaseName("classes");
logger.info("In... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
call[System.out.println, parameter[literal["Starting server"]]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_op... | annotation[@] identifier[CommandArgument] Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] {
identifier[Class] operator... |
private static int getIndex(String identifier, String subIdentifier) {
int position = identifier.indexOf(subIdentifier);
if (position > 0) {
String temp = identifier.substring(position + (subIdentifier.length()));
return readInteger(temp);
}
return -1;
} | class class_name[name] begin[{]
method[getIndex, return_type[type[int]], modifier[private static], parameter[identifier, subIdentifier]] begin[{]
local_variable[type[int], position]
if[binary_operation[member[.position], >, literal[0]]] begin[{]
local_variable[type[String], ... | Keyword[private] Keyword[static] Keyword[int] identifier[getIndex] operator[SEP] identifier[String] identifier[identifier] , identifier[String] identifier[subIdentifier] operator[SEP] {
Keyword[int] identifier[position] operator[=] identifier[identifier] operator[SEP] identifier[indexOf] operator[SEP] identifie... |
public @NonNull
Query setInsideBoundingBox(@Nullable GeoRect... boxes) {
if (boxes == null) {
set(KEY_INSIDE_BOUNDING_BOX, null);
} else {
StringBuilder sb = new StringBuilder();
for (GeoRect box : boxes) {
if (sb.length() != 0) {
... | class class_name[name] begin[{]
method[setInsideBoundingBox, return_type[type[Query]], modifier[public], parameter[boxes]] begin[{]
if[binary_operation[member[.boxes], ==, literal[null]]] begin[{]
call[.set, parameter[member[.KEY_INSIDE_BOUNDING_BOX], literal[null]]]
... | Keyword[public] annotation[@] identifier[NonNull] identifier[Query] identifier[setInsideBoundingBox] operator[SEP] annotation[@] identifier[Nullable] identifier[GeoRect] operator[...] identifier[boxes] operator[SEP] {
Keyword[if] operator[SEP] identifier[boxes] operator[==] Other[null] operator[SEP] {
... |
public static String toHexa( byte [] bb ) {
char[] HEXA_CHARS = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] ret = new char[bb.length*2];
for(int i=0;i<bb.length;i++){
ret[i*2] =HEXA_CHARS[((bb[i]& 0xF0) >> 4)];
ret[i*2+1] = HEXA_CHARS[((bb[i]... | class class_name[name] begin[{]
method[toHexa, return_type[type[String]], modifier[public static], parameter[bb]] begin[{]
local_variable[type[char], HEXA_CHARS]
local_variable[type[char], ret]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assig... | Keyword[public] Keyword[static] identifier[String] identifier[toHexa] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bb] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[HEXA_CHARS] operator[=] {
literal[String] , literal[String] , literal[String] , literal[S... |
@Override
public Character convert(final String valueStr, final boolean _caseSensitive, final Object target)
throws ParseException
{
if (valueStr.length() == 1)
{
if (_caseSensitive)
return new Character(valueStr.charAt(0));
return new Characte... | class class_name[name] begin[{]
method[convert, return_type[type[Character]], modifier[public], parameter[valueStr, _caseSensitive, target]] begin[{]
if[binary_operation[call[valueStr.length, parameter[]], ==, literal[1]]] begin[{]
if[member[._caseSensitive]] begin[{]
re... | annotation[@] identifier[Override] Keyword[public] identifier[Character] identifier[convert] operator[SEP] Keyword[final] identifier[String] identifier[valueStr] , Keyword[final] Keyword[boolean] identifier[_caseSensitive] , Keyword[final] identifier[Object] identifier[target] operator[SEP] Keyword[throws] identifier... |
public static Resource create(@NotNull ResourceResolver resourceResolver, @Nullable String path, @NotNull String resourceType) {
return create(resourceResolver, path, resourceType, ValueMap.EMPTY);
} | class class_name[name] begin[{]
method[create, return_type[type[Resource]], modifier[public static], parameter[resourceResolver, path, resourceType]] begin[{]
return[call[.create, parameter[member[.resourceResolver], member[.path], member[.resourceType], member[ValueMap.EMPTY]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Resource] identifier[create] operator[SEP] annotation[@] identifier[NotNull] identifier[ResourceResolver] identifier[resourceResolver] , annotation[@] identifier[Nullable] identifier[String] identifier[path] , annotation[@] identifier[NotNull] identifier[String] identifier[r... |
@SuppressWarnings("unchecked")
public static <T> T parseNumber(String value, Class<T> targetClass){
if(value == null){
return null;
}
try{
if(Integer.class == targetClass){
return (T)Integer.valueOf(value);
}
else if(Float.class == targetClass){
return (T)Float.valueOf(value);
}
else if... | class class_name[name] begin[{]
method[parseNumber, return_type[type[T]], modifier[public static], parameter[value, targetClass]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
TryStat... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[parseNumber] operator[SEP] identifier[String] identifier[value] , identifier[Class] operator[<] identifier[T] operator[>] identifier[targ... |
private Class<?> loadClass(String className, boolean required)
throws InjectionConfigurationException
{
if (className == null || className.equals("") || ivClassLoader == null) // F743-32443
{
return null;
}
final boolean isTraceOn = TraceComponent.isA... | class class_name[name] begin[{]
method[loadClass, return_type[type[Class]], modifier[private], parameter[className, required]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.className], ==, literal[null]], ||, call[className.equals, parameter[literal[""]]]], ||, binary_o... | Keyword[private] identifier[Class] operator[<] operator[?] operator[>] identifier[loadClass] operator[SEP] identifier[String] identifier[className] , Keyword[boolean] identifier[required] operator[SEP] Keyword[throws] identifier[InjectionConfigurationException] {
Keyword[if] operator[SEP] identifier[className] ... |
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions)
{
/* All this is handled by grid screen now
if (strCommand.equalsIgnoreCase(MenuConstants.FORMDETAIL))
return (this.onForm(null, ScreenConstants.DETAIL_MODE, true, iCommandOptions, null) != null);
... | class class_name[name] begin[{]
method[doCommand, return_type[type[boolean]], modifier[public], parameter[strCommand, sourceSField, iCommandOptions]] begin[{]
return[SuperMethodInvocation(arguments=[MemberReference(member=strCommand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] Keyword[boolean] identifier[doCommand] operator[SEP] identifier[String] identifier[strCommand] , identifier[ScreenField] identifier[sourceSField] , Keyword[int] identifier[iCommandOptions] operator[SEP] {
Keyword[return] Keyword[super] operator[SEP] identifier[doCommand] operator[SEP] identifie... |
@Override
public SSLServerSocketFactory getSSLServerSocketFactory(SSLConfig config) throws SSLException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getSSLServerSocketFactory");
try {
SSLContext context = getSSLContext(null, config);
... | class class_name[name] begin[{]
method[getSSLServerSocketFactory, return_type[type[SSLServerSocketFactory]], modifier[public], parameter[config]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
c... | annotation[@] identifier[Override] Keyword[public] identifier[SSLServerSocketFactory] identifier[getSSLServerSocketFactory] operator[SEP] identifier[SSLConfig] identifier[config] operator[SEP] Keyword[throws] identifier[SSLException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier... |
static boolean resolveWebServiceEndpointMethods(BeanMetaData bmd,
Method[] endpointMethods)
throws EJBConfigurationException
{
if (endpointMethods == null || endpointMethods.length == 0)
{
throw new EJBConfigurationE... | class class_name[name] begin[{]
method[resolveWebServiceEndpointMethods, return_type[type[boolean]], modifier[static], parameter[bmd, endpointMethods]] begin[{]
if[binary_operation[binary_operation[member[.endpointMethods], ==, literal[null]], ||, binary_operation[member[endpointMethods.length]... | Keyword[static] Keyword[boolean] identifier[resolveWebServiceEndpointMethods] operator[SEP] identifier[BeanMetaData] identifier[bmd] , identifier[Method] operator[SEP] operator[SEP] identifier[endpointMethods] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] {
Keyword[if] operator[SEP] identi... |
public T set(T newValue) {
final T obj = this.object;
this.object = newValue;
return obj;
} | class class_name[name] begin[{]
method[set, return_type[type[T]], modifier[public], parameter[newValue]] begin[{]
local_variable[type[T], obj]
assign[THIS[member[None.object]], member[.newValue]]
return[member[.obj]]
end[}]
END[}] | Keyword[public] identifier[T] identifier[set] operator[SEP] identifier[T] identifier[newValue] operator[SEP] {
Keyword[final] identifier[T] identifier[obj] operator[=] Keyword[this] operator[SEP] identifier[object] operator[SEP] Keyword[this] operator[SEP] identifier[object] operator[=] identifier[newValue] oper... |
public void setStorageSize(String name, double value, StorageUnit unit) {
set(name, value + unit.getShortName());
} | class class_name[name] begin[{]
method[setStorageSize, return_type[void], modifier[public], parameter[name, value, unit]] begin[{]
call[.set, parameter[member[.name], binary_operation[member[.value], +, call[unit.getShortName, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setStorageSize] operator[SEP] identifier[String] identifier[name] , Keyword[double] identifier[value] , identifier[StorageUnit] identifier[unit] operator[SEP] {
identifier[set] operator[SEP] identifier[name] , identifier[value] operator[+] identifier[unit] operator[SEP... |
static float getRelativeY (NativeEvent e, Element target) {
return (e.getClientY() - target.getAbsoluteTop() + target.getScrollTop() +
target.getOwnerDocument().getScrollTop()) / HtmlGraphics.experimentalScale;
} | class class_name[name] begin[{]
method[getRelativeY, return_type[type[float]], modifier[static], parameter[e, target]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[call[e.getClientY, parameter[]], -, call[target.getAbsoluteTop, parameter[]]], +, call[target.getScr... | Keyword[static] Keyword[float] identifier[getRelativeY] operator[SEP] identifier[NativeEvent] identifier[e] , identifier[Element] identifier[target] operator[SEP] {
Keyword[return] operator[SEP] identifier[e] operator[SEP] identifier[getClientY] operator[SEP] operator[SEP] operator[-] identifier[target] operato... |
public static RequestResponse callHttpPost(HttpJsonRpcClient client, String url,
Map<String, Object> headers, Map<String, Object> urlParams, Object requestData) {
return client.doPost(url, headers, urlParams, requestData);
} | class class_name[name] begin[{]
method[callHttpPost, return_type[type[RequestResponse]], modifier[public static], parameter[client, url, headers, urlParams, requestData]] begin[{]
return[call[client.doPost, parameter[member[.url], member[.headers], member[.urlParams], member[.requestData]]]]
end[}]... | Keyword[public] Keyword[static] identifier[RequestResponse] identifier[callHttpPost] operator[SEP] identifier[HttpJsonRpcClient] identifier[client] , identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[headers] , identifier[Map] operator[<]... |
@Handler
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
public void onSaveOutput(SaveOutput event) throws InterruptedException {
if (!Arrays.asList(event.options())
.contains(StandardOpenOption.WRITE)) {
throw new IllegalArgumentException(
"File must be... | class class_name[name] begin[{]
method[onSaveOutput, return_type[void], modifier[public], parameter[event]] begin[{]
if[call[Arrays.asList, parameter[call[event.options, parameter[]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_o... | annotation[@] identifier[Handler] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[onSaveOutput] operator[SEP] identifier[SaveOutput] identifier[event] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[if] opera... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.