code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
@Override
public ResourceSet<AuthCallsIpAccessControlListMapping> read(final TwilioRestClient client) {
return new ResourceSet<>(this, client, firstPage(client));
} | class class_name[name] begin[{]
method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=... | annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[AuthCallsIpAccessControlListMapping] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] {
Keyword[return] Keyword[new] identifier[ResourceSet] ope... |
@Override
@SuppressWarnings("unchecked")
public <T> Class<? extends T> createClass(Class<T> parent, T proxy, ClassLoader loader,
String name, Interception interception) {
Enhancer enhancer = new Enhancer();
if (parent.isInterface()) {
enh... | class class_name[name] begin[{]
method[createClass, return_type[type[Class]], modifier[public], parameter[parent, proxy, loader, name, interception]] begin[{]
local_variable[type[Enhancer], enhancer]
if[call[parent.isInterface, parameter[]]] begin[{]
call[enhance... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[createClass] operator[SEP] identifier[Class] ope... |
public Map<String, Object> dehydrate(Entity entity) {
LOG.trace("Dehydrating entity {}", entity);
Map<String, Object> dehydratedEntity = newHashMap();
EntityType entityType = entity.getEntityType();
entityType
.getAtomicAttributes()
.forEach(
attribute -> {
// ... | class class_name[name] begin[{]
method[dehydrate, return_type[type[Map]], modifier[public], parameter[entity]] begin[{]
call[LOG.trace, parameter[literal["Dehydrating entity {}"], member[.entity]]]
local_variable[type[Map], dehydratedEntity]
local_variable[type[EntityType], enti... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[dehydrate] operator[SEP] identifier[Entity] identifier[entity] operator[SEP] {
identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[entity] operator[SEP] operator[SEP... |
protected List<T> readSources()
throws EFapsException
{
final List<T> ret = new ArrayList<>();
final QueryBuilder queryBldr = new QueryBuilder(getClassName4Type());
final MultiPrintQuery multi = queryBldr.getPrint();
multi.addAttribute(CIAdminProgram.Abstract.Name);
m... | class class_name[name] begin[{]
method[readSources, return_type[type[List]], modifier[protected], parameter[]] begin[{]
local_variable[type[List], ret]
local_variable[type[QueryBuilder], queryBldr]
local_variable[type[MultiPrintQuery], multi]
call[multi.addAttribute, par... | Keyword[protected] identifier[List] operator[<] identifier[T] operator[>] identifier[readSources] operator[SEP] operator[SEP] Keyword[throws] identifier[EFapsException] {
Keyword[final] identifier[List] operator[<] identifier[T] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[... |
@SuppressWarnings("fallthrough")
public boolean appendUnit(TimeUnit unit, int count, int cv,
int uv, boolean useCountSep,
boolean useDigitPrefix, boolean multiple,
boolean last, boolean wasSkipped,
Stri... | class class_name[name] begin[{]
method[appendUnit, return_type[type[boolean]], modifier[public], parameter[unit, count, cv, uv, useCountSep, useDigitPrefix, multiple, last, wasSkipped, sb]] begin[{]
local_variable[type[int], px]
local_variable[type[boolean], willRequireSkipMarker]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[appendUnit] operator[SEP] identifier[TimeUnit] identifier[unit] , Keyword[int] identifier[count] , Keyword[int] identifier[cv] , Keyword[int] identifier[uv] , Keyword[boolean] identifie... |
public java.util.List<Patch> getPatches() {
if (patches == null) {
patches = new com.amazonaws.internal.SdkInternalList<Patch>();
}
return patches;
} | class class_name[name] begin[{]
method[getPatches, return_type[type[java]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.patches], ==, literal[null]]] begin[{]
assign[member[.patches], ClassCreator(arguments=[], body=None, constructor_type_argument... | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Patch] operator[>] identifier[getPatches] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[patches] operator[==] Other[null] operator[SEP] {
identifier[patches] opera... |
void switchConnectionListener(Object c, ConnectionListener from, ConnectionListener to)
{
if (clToC != null && clToC.get(from) != null && clToC.get(to) != null)
{
clToC.get(from).remove(c);
clToC.get(to).add(c);
}
} | class class_name[name] begin[{]
method[switchConnectionListener, return_type[void], modifier[default], parameter[c, from, to]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.clToC], !=, literal[null]], &&, binary_operation[call[clToC.get, parameter[member[.from]]], !=, l... | Keyword[void] identifier[switchConnectionListener] operator[SEP] identifier[Object] identifier[c] , identifier[ConnectionListener] identifier[from] , identifier[ConnectionListener] identifier[to] operator[SEP] {
Keyword[if] operator[SEP] identifier[clToC] operator[!=] Other[null] operator[&&] identifier[clToC]... |
public HttpResponse doAction(HttpRequest request, String form, HttpMethod method)
throws ClientException, ServerException {
request.validate();
// try refresh credentials if CredentialProvider set
this.config.refreshCredentials();
try {
int retryTime... | class class_name[name] begin[{]
method[doAction, return_type[type[HttpResponse]], modifier[public], parameter[request, form, method]] begin[{]
call[request.validate, parameter[]]
THIS[member[None.config]call[None.refreshCredentials, parameter[]]]
TryStatement(block=[Loca... | Keyword[public] identifier[HttpResponse] identifier[doAction] operator[SEP] identifier[HttpRequest] identifier[request] , identifier[String] identifier[form] , identifier[HttpMethod] identifier[method] operator[SEP] Keyword[throws] identifier[ClientException] , identifier[ServerException] {
identifier[request... |
public Map<String, List<String>> getChatMetadata(String sessionID) throws XMPPException, NotConnectedException, InterruptedException {
ChatMetadata request = new ChatMetadata();
request.setType(IQ.Type.get);
request.setTo(workgroupJID);
request.setSessionID(sessionID);
ChatMetad... | class class_name[name] begin[{]
method[getChatMetadata, return_type[type[Map]], modifier[public], parameter[sessionID]] begin[{]
local_variable[type[ChatMetadata], request]
call[request.setType, parameter[member[IQ.Type.get]]]
call[request.setTo, parameter[member[.workgr... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[getChatMetadata] operator[SEP] identifier[String] identifier[sessionID] operator[SEP] Keyword[throws] identifier[XMPPException] , identifier[NotConnectedException] , ide... |
public boolean validateAllFields() {
boolean cardNumberIsValid =
CardUtils.isValidCardNumber(mCardNumberEditText.getCardNumber());
boolean expiryIsValid = mExpiryDateEditText.getValidDateFields() != null &&
mExpiryDateEditText.isDateValid();
boolean cvcIsValid = i... | class class_name[name] begin[{]
method[validateAllFields, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], cardNumberIsValid]
local_variable[type[boolean], expiryIsValid]
local_variable[type[boolean], cvcIsValid]
call[mCar... | Keyword[public] Keyword[boolean] identifier[validateAllFields] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[cardNumberIsValid] operator[=] identifier[CardUtils] operator[SEP] identifier[isValidCardNumber] operator[SEP] identifier[mCardNumberEditText] operator[SEP] identifier[getCardNumber] operator[... |
public static double elementMinAbs( DMatrix4 a ) {
double min = Math.abs(a.a1);
double tmp = Math.abs(a.a1); if( tmp < min ) min = tmp;
tmp = Math.abs(a.a2); if( tmp < min ) min = tmp;
tmp = Math.abs(a.a3); if( tmp < min ) min = tmp;
tmp = Math.abs(a.a4); if( tmp < min ) min = tm... | class class_name[name] begin[{]
method[elementMinAbs, return_type[type[double]], modifier[public static], parameter[a]] begin[{]
local_variable[type[double], min]
local_variable[type[double], tmp]
if[binary_operation[member[.tmp], <, member[.min]]] begin[{]
assign[me... | Keyword[public] Keyword[static] Keyword[double] identifier[elementMinAbs] operator[SEP] identifier[DMatrix4] identifier[a] operator[SEP] {
Keyword[double] identifier[min] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[a] operator[SEP] identifier[a1] operator[SEP] operator[SEP... |
public void registerObject(final Object object, final UUID id) {
objectToId.put(object, id);
idToObject.put(id, object);
} | class class_name[name] begin[{]
method[registerObject, return_type[void], modifier[public], parameter[object, id]] begin[{]
call[objectToId.put, parameter[member[.object], member[.id]]]
call[idToObject.put, parameter[member[.id], member[.object]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[registerObject] operator[SEP] Keyword[final] identifier[Object] identifier[object] , Keyword[final] identifier[UUID] identifier[id] operator[SEP] {
identifier[objectToId] operator[SEP] identifier[put] operator[SEP] identifier[object] , identifier[id] operator[SEP] opera... |
public void updateSpaceACLs(String spaceID,
Map<String, AclType> spaceACLs,
String storeID) throws ResourceException {
try {
StorageProvider storage = storageProviderFactory.getStorageProvider(
storeID);
if (... | class class_name[name] begin[{]
method[updateSpaceACLs, return_type[void], modifier[public], parameter[spaceID, spaceACLs, storeID]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReferen... | Keyword[public] Keyword[void] identifier[updateSpaceACLs] operator[SEP] identifier[String] identifier[spaceID] , identifier[Map] operator[<] identifier[String] , identifier[AclType] operator[>] identifier[spaceACLs] , identifier[String] identifier[storeID] operator[SEP] Keyword[throws] identifier[ResourceException] ... |
private String getParameter(List<FileItem> items, String name) {
for (FileItem i : items) {
if (i.isFormField() && i.getFieldName().equals(name)) {
return i.getString();
}
}
return null;
} | class class_name[name] begin[{]
method[getParameter, return_type[type[String]], modifier[private], parameter[items, name]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isFormField, postfix_operator... | Keyword[private] identifier[String] identifier[getParameter] operator[SEP] identifier[List] operator[<] identifier[FileItem] operator[>] identifier[items] , identifier[String] identifier[name] operator[SEP] {
Keyword[for] operator[SEP] identifier[FileItem] identifier[i] operator[:] identifier[items] operator[S... |
private String get_target_name (String ttype_tname)
{
String[] split;
try {
split = ttype_tname.split(LOGGING_SEPARATOR);
} catch (Exception e) {
return _DefaultTargetName;
}
return (split.length > 1) ? split[1] : _DefaultTargetName;
} | class class_name[name] begin[{]
method[get_target_name, return_type[type[String]], modifier[private], parameter[ttype_tname]] begin[{]
local_variable[type[String], split]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=split, postfix_operators=[]... | Keyword[private] identifier[String] identifier[get_target_name] operator[SEP] identifier[String] identifier[ttype_tname] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] Keyword[try] {
identifier[split] operator[=] identifier[ttype_tname] operator[SEP] ide... |
public ResourceHolder<ByteBuffer> getMergeBuffer()
{
final ByteBuffer buffer = mergeBuffers.pop();
return new ResourceHolder<ByteBuffer>()
{
@Override
public ByteBuffer get()
{
return buffer;
}
@Override
public void close()
{
mergeBuffers.add(buff... | class class_name[name] begin[{]
method[getMergeBuffer, return_type[type[ResourceHolder]], modifier[public], parameter[]] begin[{]
local_variable[type[ByteBuffer], buffer]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[Retur... | Keyword[public] identifier[ResourceHolder] operator[<] identifier[ByteBuffer] operator[>] identifier[getMergeBuffer] operator[SEP] operator[SEP] {
Keyword[final] identifier[ByteBuffer] identifier[buffer] operator[=] identifier[mergeBuffers] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] ... |
@Deprecated
protected boolean isApplicable(@Nullable Job<?, ?> project) {
if (checkIsApplicableItem()) {
return isApplicable((Item) project);
}
// a legacy implementation which should not have been calling super.isApplicable(Job)
throw new AbstractMethodError("you must ov... | class class_name[name] begin[{]
method[isApplicable, return_type[type[boolean]], modifier[protected], parameter[project]] begin[{]
if[call[.checkIsApplicableItem, parameter[]]] begin[{]
return[call[.isApplicable, parameter[Cast(expression=MemberReference(member=project, postfix_oper... | annotation[@] identifier[Deprecated] Keyword[protected] Keyword[boolean] identifier[isApplicable] operator[SEP] annotation[@] identifier[Nullable] identifier[Job] operator[<] operator[?] , operator[?] operator[>] identifier[project] operator[SEP] {
Keyword[if] operator[SEP] identifier[checkIsApplicableItem] ope... |
private void saveUserSettings() throws CmsException {
CmsUserSettings settings = new CmsUserSettings(m_user);
settings.setLocale((Locale)m_language.getValue());
settings.setStartSite((String)m_site.getValue() + "/");
settings.setStartProject(m_ou.getValue() + (String)m_project.getValue(... | class class_name[name] begin[{]
method[saveUserSettings, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[CmsUserSettings], settings]
call[settings.setLocale, parameter[Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], p... | Keyword[private] Keyword[void] identifier[saveUserSettings] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsUserSettings] identifier[settings] operator[=] Keyword[new] identifier[CmsUserSettings] operator[SEP] identifier[m_user] operator[SEP] operator[SEP] identifier[settings... |
public GetSessionStatisticsResponse getSessionStatistics(String sessionId, String startDate,
String endDate, Boolean aggregate) {
GetSessionStatisticsRequest request = new GetSessionStatisticsRequest();
request.withSessionId(sessionId).withStartDate(startDate).withEndDate(endDate).withAggre... | class class_name[name] begin[{]
method[getSessionStatistics, return_type[type[GetSessionStatisticsResponse]], modifier[public], parameter[sessionId, startDate, endDate, aggregate]] begin[{]
local_variable[type[GetSessionStatisticsRequest], request]
call[request.withSessionId, parameter[... | Keyword[public] identifier[GetSessionStatisticsResponse] identifier[getSessionStatistics] operator[SEP] identifier[String] identifier[sessionId] , identifier[String] identifier[startDate] , identifier[String] identifier[endDate] , identifier[Boolean] identifier[aggregate] operator[SEP] {
identifier[GetSession... |
public static void setRequiresUserConsent(boolean value) {
if (!sIsInitialized) {
// We can't read hasUserConsent() before we're initialized
sRequiresUserConsent = value;
} else {
boolean hadUserConsent = hasUserConsent();
sRequiresUserConsent = value;
... | class class_name[name] begin[{]
method[setRequiresUserConsent, return_type[void], modifier[public static], parameter[value]] begin[{]
if[member[.sIsInitialized]] begin[{]
assign[member[.sRequiresUserConsent], member[.value]]
else begin[{]
local_variab... | Keyword[public] Keyword[static] Keyword[void] identifier[setRequiresUserConsent] operator[SEP] Keyword[boolean] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[sIsInitialized] operator[SEP] {
identifier[sRequiresUserConsent] operator[=] identifier[value] operator[SEP... |
public List<KafkaMessage> getListWithoutAck(Long timeout, TimeUnit unit, long offset) throws CanalClientException {
waitClientRunning();
if (!running) {
return Lists.newArrayList();
}
if (offset > -1) {
TopicPartition tp = new TopicPartition(topic, partition == n... | class class_name[name] begin[{]
method[getListWithoutAck, return_type[type[List]], modifier[public], parameter[timeout, unit, offset]] begin[{]
call[.waitClientRunning, parameter[]]
if[member[.running]] begin[{]
return[call[Lists.newArrayList, parameter[]]]
e... | Keyword[public] identifier[List] operator[<] identifier[KafkaMessage] operator[>] identifier[getListWithoutAck] operator[SEP] identifier[Long] identifier[timeout] , identifier[TimeUnit] identifier[unit] , Keyword[long] identifier[offset] operator[SEP] Keyword[throws] identifier[CanalClientException] {
identifi... |
public static UniAddress getByName( String hostname,
boolean possibleNTDomainOrWorkgroup )
throws UnknownHostException {
UniAddress[] addrs = UniAddress.getAllByName(hostname, possibleNTDomainOrWorkgroup);
return addrs[0];
... | class class_name[name] begin[{]
method[getByName, return_type[type[UniAddress]], modifier[public static], parameter[hostname, possibleNTDomainOrWorkgroup]] begin[{]
local_variable[type[UniAddress], addrs]
return[member[.addrs]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[UniAddress] identifier[getByName] operator[SEP] identifier[String] identifier[hostname] , Keyword[boolean] identifier[possibleNTDomainOrWorkgroup] operator[SEP] Keyword[throws] identifier[UnknownHostException] {
identifier[UniAddress] operator[SEP] operator[SEP] identi... |
@SuppressWarnings("unchecked")
public static <T> Parcelable wrap(Class<? extends T> inputType, T input) {
if(input == null){
return null;
}
ParcelableFactory parcelableFactory = REPOSITORY.get(inputType);
return parcelableFactory.buildParcelable(input);
} | class class_name[name] begin[{]
method[wrap, return_type[type[Parcelable]], modifier[public static], parameter[inputType, input]] begin[{]
if[binary_operation[member[.input], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_v... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Parcelable] identifier[wrap] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[inputType] , ... |
public double getMajorIsotopeMass(int elem) {
if (this.majorIsotope[elem] != null)
return this.majorIsotope[elem].getExactMass();
IIsotope major = getMajorIsotope(elem);
return major != null ? major.getExactMass() : 0;
} | class class_name[name] begin[{]
method[getMajorIsotopeMass, return_type[type[double]], modifier[public], parameter[elem]] begin[{]
if[binary_operation[THIS[member[None.majorIsotope]ArraySelector(index=MemberReference(member=elem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=... | Keyword[public] Keyword[double] identifier[getMajorIsotopeMass] operator[SEP] Keyword[int] identifier[elem] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[majorIsotope] operator[SEP] identifier[elem] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[return] Keyword[th... |
private static byte[] decodeBase64Digest(String base64Digest) {
String expectedPrefix = "sha1-";
if (!base64Digest.startsWith(expectedPrefix)) {
throw new IllegalArgumentException(base64Digest + " did not start with " +
expectedPrefix);
}
base64Digest = ba... | class class_name[name] begin[{]
method[decodeBase64Digest, return_type[type[byte]], modifier[private static], parameter[base64Digest]] begin[{]
local_variable[type[String], expectedPrefix]
if[call[base64Digest.startsWith, parameter[member[.expectedPrefix]]]] begin[{]
ThrowSt... | Keyword[private] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decodeBase64Digest] operator[SEP] identifier[String] identifier[base64Digest] operator[SEP] {
identifier[String] identifier[expectedPrefix] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] operator[!] identif... |
private JSONObject getAttributesForObjectNameWithPatternRequest(ObjectName pObjectName) {
ObjectName pMBeanFromRequest = getRequest().getObjectName();
ObjectName objectName = pObjectName == null ? pMBeanFromRequest : pObjectName;
JSONObject values = getValue();
JSONObject attributes = (J... | class class_name[name] begin[{]
method[getAttributesForObjectNameWithPatternRequest, return_type[type[JSONObject]], modifier[private], parameter[pObjectName]] begin[{]
local_variable[type[ObjectName], pMBeanFromRequest]
local_variable[type[ObjectName], objectName]
local_variable[type[JS... | Keyword[private] identifier[JSONObject] identifier[getAttributesForObjectNameWithPatternRequest] operator[SEP] identifier[ObjectName] identifier[pObjectName] operator[SEP] {
identifier[ObjectName] identifier[pMBeanFromRequest] operator[=] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifie... |
@PublicEvolving
public <KS, OUT> SingleOutputStreamOperator<OUT> process(
final KeyedBroadcastProcessFunction<KS, IN1, IN2, OUT> function,
final TypeInformation<OUT> outTypeInfo) {
Preconditions.checkNotNull(function);
Preconditions.checkArgument(inputStream1 instanceof KeyedStream,
"A KeyedBroadcastPro... | class class_name[name] begin[{]
method[process, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[function, outTypeInfo]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.function]]]
call[Preconditions.checkArgument, parameter[binary_operation... | annotation[@] identifier[PublicEvolving] Keyword[public] operator[<] identifier[KS] , identifier[OUT] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[OUT] operator[>] identifier[process] operator[SEP] Keyword[final] identifier[KeyedBroadcastProcessFunction] operator[<] identifier[KS] , ident... |
public void writeTo(File file) throws IOException {
FileChannel channel = new FileOutputStream(file).getChannel();
try {
writeTo(channel);
} finally {
channel.close();
}
} | class class_name[name] begin[{]
method[writeTo, return_type[void], modifier[public], parameter[file]] begin[{]
local_variable[type[FileChannel], channel]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=channel, postfix_operators=[], prefix_o... | Keyword[public] Keyword[void] identifier[writeTo] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[FileChannel] identifier[channel] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] id... |
@Override
void addCertToPath(X509Certificate cert,
LinkedList<X509Certificate> certPathList)
{
certPathList.addFirst(cert);
} | class class_name[name] begin[{]
method[addCertToPath, return_type[void], modifier[default], parameter[cert, certPathList]] begin[{]
call[certPathList.addFirst, parameter[member[.cert]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[void] identifier[addCertToPath] operator[SEP] identifier[X509Certificate] identifier[cert] , identifier[LinkedList] operator[<] identifier[X509Certificate] operator[>] identifier[certPathList] operator[SEP] {
identifier[certPathList] operator[SEP] identifier[addFirst] ... |
public static String eachMatch(String self, String regex, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) {
return eachMatch(self, Pattern.compile(regex), closure);
} | class class_name[name] begin[{]
method[eachMatch, return_type[type[String]], modifier[public static], parameter[self, regex, closure]] begin[{]
return[call[.eachMatch, parameter[member[.self], call[Pattern.compile, parameter[member[.regex]]], member[.closure]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[eachMatch] operator[SEP] identifier[String] identifier[self] , identifier[String] identifier[regex] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[FromString] operator[SEP] Keyword[class] , identifier[opti... |
private static void _parseHeaderLine (@Nonnull final FileItemHeaders aHeaders, @Nonnull final String sHeader)
{
final int nColonOffset = sHeader.indexOf (':');
if (nColonOffset == -1)
{
// This header line is malformed, skip it.
if (LOGGER.isWarnEnabled ())
LOGGER.warn ("Found malforme... | class class_name[name] begin[{]
method[_parseHeaderLine, return_type[void], modifier[private static], parameter[aHeaders, sHeader]] begin[{]
local_variable[type[int], nColonOffset]
if[binary_operation[member[.nColonOffset], ==, literal[1]]] begin[{]
if[call[LOGGE... | Keyword[private] Keyword[static] Keyword[void] identifier[_parseHeaderLine] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[FileItemHeaders] identifier[aHeaders] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sHeader] operator[SEP] {
Keyword[final] Key... |
public void saveRequestUrlAndParameters(HttpServletRequest request, HttpServletResponse response) {
String cookieName = ReferrerURLCookieHandler.REFERRER_URL_COOKIENAME;
ReferrerURLCookieHandler referrerURLCookieHandler = getCookieHandler();
Cookie c = referrerURLCookieHandler.createCookie(cooki... | class class_name[name] begin[{]
method[saveRequestUrlAndParameters, return_type[void], modifier[public], parameter[request, response]] begin[{]
local_variable[type[String], cookieName]
local_variable[type[ReferrerURLCookieHandler], referrerURLCookieHandler]
local_variable[type[Cookie], ... | Keyword[public] Keyword[void] identifier[saveRequestUrlAndParameters] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] {
identifier[String] identifier[cookieName] operator[=] identifier[ReferrerURLCookieHandler] operator[SEP] i... |
public WizardPage getPreviousPage(WizardPage page) {
int index = pages.indexOf(page);
if (index == 0 || index == -1) {
// first page or page not found
return null;
}
logger.debug("Returning previous page...");
return (WizardPage)pages.get(index - 1);
... | class class_name[name] begin[{]
method[getPreviousPage, return_type[type[WizardPage]], modifier[public], parameter[page]] begin[{]
local_variable[type[int], index]
if[binary_operation[binary_operation[member[.index], ==, literal[0]], ||, binary_operation[member[.index], ==, literal[1]]]... | Keyword[public] identifier[WizardPage] identifier[getPreviousPage] operator[SEP] identifier[WizardPage] identifier[page] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[pages] operator[SEP] identifier[indexOf] operator[SEP] identifier[page] operator[SEP] operator[SEP] Keyword[if] operator[S... |
public static void onCreate(Context context) {
SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
Editor editor = pref.edit();
// If it is the first launch, save the date in shared preference.
if (pref.getLong(KEY_INSTALL_DATE, 0) == 0L) {
... | class class_name[name] begin[{]
method[onCreate, return_type[void], modifier[public static], parameter[context]] begin[{]
local_variable[type[SharedPreferences], pref]
local_variable[type[Editor], editor]
if[binary_operation[call[pref.getLong, parameter[member[.KEY_INSTALL_DATE]... | Keyword[public] Keyword[static] Keyword[void] identifier[onCreate] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
identifier[SharedPreferences] identifier[pref] operator[=] identifier[context] operator[SEP] identifier[getSharedPreferences] operator[SEP] identifier[PREF_NAME] , identifier[... |
public OptionsBuilder templateDirs(File... templateDirs) {
for (File templateDir : templateDirs) {
this.options.setTemplateDirs(templateDir.getAbsolutePath());
}
return this;
} | class class_name[name] begin[{]
method[templateDirs, return_type[type[OptionsBuilder]], modifier[public], parameter[templateDirs]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[... | Keyword[public] identifier[OptionsBuilder] identifier[templateDirs] operator[SEP] identifier[File] operator[...] identifier[templateDirs] operator[SEP] {
Keyword[for] operator[SEP] identifier[File] identifier[templateDir] operator[:] identifier[templateDirs] operator[SEP] {
Keyword[this] operator[SEP... |
public GetUsersCurrentlyPlayingTrackRequest.Builder getUsersCurrentlyPlayingTrack() {
return new GetUsersCurrentlyPlayingTrackRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port);
} | class class_name[name] begin[{]
method[getUsersCurrentlyPlayingTrack, return_type[type[GetUsersCurrentlyPlayingTrackRequest]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=accessToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]... | Keyword[public] identifier[GetUsersCurrentlyPlayingTrackRequest] operator[SEP] identifier[Builder] identifier[getUsersCurrentlyPlayingTrack] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[GetUsersCurrentlyPlayingTrackRequest] operator[SEP] identifier[Builder] operator[SEP] identifier[acces... |
static SoyAutoescapeException createWithNode(String message, SoyNode node) {
return new SoyAutoescapeException(message, /*cause=*/ null, node);
} | class class_name[name] begin[{]
method[createWithNode, return_type[type[SoyAutoescapeException]], modifier[static], parameter[message, node]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_ope... | Keyword[static] identifier[SoyAutoescapeException] identifier[createWithNode] operator[SEP] identifier[String] identifier[message] , identifier[SoyNode] identifier[node] operator[SEP] {
Keyword[return] Keyword[new] identifier[SoyAutoescapeException] operator[SEP] identifier[message] , Other[null] , identifier... |
public static List<String> read(final String responseElements, final String pattern,
final boolean emptyListOnNullOrEmptyResponse) {
if (isNullOrEmpty(responseElements) && emptyListOnNullOrEmptyResponse) {
return emptyList();
}
try {
r... | class class_name[name] begin[{]
method[read, return_type[type[List]], modifier[public static], parameter[responseElements, pattern, emptyListOnNullOrEmptyResponse]] begin[{]
if[binary_operation[call[.isNullOrEmpty, parameter[member[.responseElements]]], &&, member[.emptyListOnNullOrEmptyRespons... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[String] identifier[responseElements] , Keyword[final] identifier[String] identifier[pattern] , Keyword[final] Keyword[boolean] identifier[emptyListOnNullOrEmptyResponse]... |
public ODatabaseObject open(String name, String user, String password) {
return new OObjectDatabaseTx((ODatabaseDocumentInternal) orientDB.open(name, user, password));
} | class class_name[name] begin[{]
method[open, return_type[type[ODatabaseObject]], modifier[public], parameter[name, user, password]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] identifier[ODatabaseObject] identifier[open] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[user] , identifier[String] identifier[password] operator[SEP] {
Keyword[return] Keyword[new] identifier[OObjectDatabaseTx] operator[SEP] operator[SEP] identifier[ODatab... |
@Override
public String formatValue(Object data) {
if (data instanceof ReportValue) {
return formatter.formatValue((ReportValue) data);
} else {
return String.valueOf(data);
}
} | class class_name[name] begin[{]
method[formatValue, return_type[type[String]], modifier[public], parameter[data]] begin[{]
if[binary_operation[member[.data], instanceof, type[ReportValue]]] begin[{]
return[call[formatter.formatValue, parameter[Cast(expression=MemberReference(member=... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[formatValue] operator[SEP] identifier[Object] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[data] Keyword[instanceof] identifier[ReportValue] operator[SEP] {
Keyword[return] identifier[formatter] o... |
public static String unescapeUriPathSegment(final String text, final String encoding) {
if (encoding == null) {
throw new IllegalArgumentException("Argument 'encoding' cannot be null");
}
return UriEscapeUtil.unescape(text, UriEscapeUtil.UriEscapeType.PATH_SEGMENT, encoding);
} | class class_name[name] begin[{]
method[unescapeUriPathSegment, return_type[type[String]], modifier[public static], parameter[text, encoding]] begin[{]
if[binary_operation[member[.encoding], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfi... | Keyword[public] Keyword[static] identifier[String] identifier[unescapeUriPathSegment] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] identifier[encoding] operator[SEP] {
Keyword[if] operator[SEP] identifier[encoding] operator[==] Other[null] operator[SEP] {... |
public SpanData toSpanData() {
synchronized (this) {
SpanData.Attributes attributesSpanData =
attributes == null
? SpanData.Attributes.create(Collections.<String, AttributeValue>emptyMap(), 0)
: SpanData.Attributes.create(attributes, attributes.getNumberOfDroppedAttribute... | class class_name[name] begin[{]
method[toSpanData, return_type[type[SpanData]], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
local_variable[type[SpanData], attributesSpanData]
local_variable[type[SpanData], annotationsSpanData]
local_... | Keyword[public] identifier[SpanData] identifier[toSpanData] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
identifier[SpanData] operator[SEP] identifier[Attributes] identifier[attributesSpanData] operator[=] identifier[attributes] operator[==] Other[nul... |
@Override
public void updateString(final int columnIndex, final String x) throws SQLException {
wrapped.updateString(columnIndex, x);
} | class class_name[name] begin[{]
method[updateString, return_type[void], modifier[public], parameter[columnIndex, x]] begin[{]
call[wrapped.updateString, parameter[member[.columnIndex], member[.x]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[updateString] operator[SEP] Keyword[final] Keyword[int] identifier[columnIndex] , Keyword[final] identifier[String] identifier[x] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[wrapped] operator[SEP] identifier[upda... |
@SuppressWarnings({"unchecked", "rawtypes"})
public void setField(final FieldDescriptorType descriptor,
Object value) {
if (descriptor.isRepeated()) {
if (!(value instanceof List)) {
throw new IllegalArgumentException(
"Wrong object type used with protocol message re... | class class_name[name] begin[{]
method[setField, return_type[void], modifier[public], parameter[descriptor, value]] begin[{]
if[call[descriptor.isRepeated, parameter[]]] begin[{]
if[binary_operation[member[.value], instanceof, type[List]]] begin[{]
ThrowS... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[void] identifier[setField] operator[SEP] Keyword[final] identifier[FieldDescriptorType] identifier[descriptor] , identifier[Object] identifier[value] operator[SEP] {
Ke... |
@Override
protected PrimitiveMatrix calculateAssetWeights() {
if (this.getOptimisationOptions().logger_appender != null) {
BasicLogger.debug();
BasicLogger.debug("###################################################");
BasicLogger.debug("BEGIN RAF: {} MarkowitzModel optim... | class class_name[name] begin[{]
method[calculateAssetWeights, return_type[type[PrimitiveMatrix]], modifier[protected], parameter[]] begin[{]
if[binary_operation[THIS[call[None.getOptimisationOptions, parameter[]]member[None.logger_appender]], !=, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[protected] identifier[PrimitiveMatrix] identifier[calculateAssetWeights] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getOptimisationOptions] operator[SEP] operator[SEP] operator[SEP] identifier[logger_appender] operator... |
public static <E extends Enum<E>> EnumJsonDeserializer<E> newInstance( Class<E> enumClass ) {
return new EnumJsonDeserializer<E>( enumClass );
} | class class_name[name] begin[{]
method[newInstance, return_type[type[EnumJsonDeserializer]], modifier[public static], parameter[enumClass]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=enumClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constru... | Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Enum] operator[<] identifier[E] operator[>] operator[>] identifier[EnumJsonDeserializer] operator[<] identifier[E] operator[>] identifier[newInstance] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[en... |
public EClass getIfcSpecificHeatCapacityMeasure() {
if (ifcSpecificHeatCapacityMeasureEClass == null) {
ifcSpecificHeatCapacityMeasureEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(740);
}
return ifcSpecificHeatCapacityMeasureEClass;
} | class class_name[name] begin[{]
method[getIfcSpecificHeatCapacityMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcSpecificHeatCapacityMeasureEClass], ==, literal[null]]] begin[{]
assign[member[.ifcSpecificHeatCapa... | Keyword[public] identifier[EClass] identifier[getIfcSpecificHeatCapacityMeasure] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcSpecificHeatCapacityMeasureEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcSpecificHeatCapacityMeasureEClass] operator[=] operator[SEP] ... |
protected boolean isMacroOrFlexFormatter(int type, String rootPath) {
boolean result = false;
try {
I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(type);
result = (CmsFormatterConfigurationCache.TYPE_MACRO_FORMATTER.equals(resType.getTypeName())
... | class class_name[name] begin[{]
method[isMacroOrFlexFormatter, return_type[type[boolean]], modifier[protected], parameter[type, rootPath]] begin[{]
local_variable[type[boolean], result]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], i... | Keyword[protected] Keyword[boolean] identifier[isMacroOrFlexFormatter] operator[SEP] Keyword[int] identifier[type] , identifier[String] identifier[rootPath] operator[SEP] {
Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[try] {
identifier[I_CmsResourceType] iden... |
public static IllegalStateException newIllegalStateException(String message, Object... args) {
return newIllegalStateException(null, message, args);
} | class class_name[name] begin[{]
method[newIllegalStateException, return_type[type[IllegalStateException]], modifier[public static], parameter[message, args]] begin[{]
return[call[.newIllegalStateException, parameter[literal[null], member[.message], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[IllegalStateException] identifier[newIllegalStateException] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[newIllegalStateException] operator[SEP] Other[null] , identi... |
public static long getAndAddRequest(AtomicLong requested, long n) {
// add n to field but check for overflow
while (true) {
long current = requested.get();
long next = current + n;
// check for overflow
if (next < 0) {
next = Long.MAX_VALUE... | class class_name[name] begin[{]
method[getAndAddRequest, return_type[type[long]], modifier[public static], parameter[requested, n]] begin[{]
while[literal[true]] begin[{]
local_variable[type[long], current]
local_variable[type[long], next]
if[bina... | Keyword[public] Keyword[static] Keyword[long] identifier[getAndAddRequest] operator[SEP] identifier[AtomicLong] identifier[requested] , Keyword[long] identifier[n] operator[SEP] {
Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[long] identifier[current] operator[=] identifier[re... |
public String getAlbum(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getAlbum();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.ALBUM);
}
return null;
} | class class_name[name] begin[{]
method[getAlbum, return_type[type[String]], modifier[public], parameter[type]] begin[{]
if[call[.allow, parameter[binary_operation[member[.type], &, member[.ID3V1]]]]] begin[{]
return[call[id3v1.getAlbum, parameter[]]]
else begin[{]
None
... | Keyword[public] identifier[String] identifier[getAlbum] 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] ide... |
public CmsContainerElement copy() {
CmsContainerElement result = new CmsContainerElement();
result.m_clientId = m_clientId;
result.m_hasSettings = m_hasSettings;
result.m_inheritanceInfo = m_inheritanceInfo;
result.m_new = m_new;
result.m_newEditorDisabled = m_newEditorD... | class class_name[name] begin[{]
method[copy, return_type[type[CmsContainerElement]], modifier[public], parameter[]] begin[{]
local_variable[type[CmsContainerElement], result]
assign[member[result.m_clientId], member[.m_clientId]]
assign[member[result.m_hasSettings], memb... | Keyword[public] identifier[CmsContainerElement] identifier[copy] operator[SEP] operator[SEP] {
identifier[CmsContainerElement] identifier[result] operator[=] Keyword[new] identifier[CmsContainerElement] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[m_clientId] operator[=] ... |
private void writeWBS(Task mpxj)
{
if (mpxj.getUniqueID().intValue() != 0)
{
WBSType xml = m_factory.createWBSType();
m_project.getWBS().add(xml);
String code = mpxj.getWBS();
code = code == null || code.length() == 0 ? DEFAULT_WBS_CODE : code;
Task parentTas... | class class_name[name] begin[{]
method[writeWBS, return_type[void], modifier[private], parameter[mpxj]] begin[{]
if[binary_operation[call[mpxj.getUniqueID, parameter[]], !=, literal[0]]] begin[{]
local_variable[type[WBSType], xml]
call[m_project.getWBS, param... | Keyword[private] Keyword[void] identifier[writeWBS] operator[SEP] identifier[Task] identifier[mpxj] operator[SEP] {
Keyword[if] operator[SEP] identifier[mpxj] operator[SEP] identifier[getUniqueID] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[!=] Other[0] ope... |
public static void deleteDirContents(File dir) {
if (!dir.isDirectory() || !dir.exists()) {
throw new IllegalArgumentException(dir.getAbsolutePath()
+ " is not a directory or does not exist.");
}
String[] children = dir.list();
for (int i = 0; i < ch... | class class_name[name] begin[{]
method[deleteDirContents, return_type[void], modifier[public static], parameter[dir]] begin[{]
if[binary_operation[call[dir.isDirectory, parameter[]], ||, call[dir.exists, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Binar... | Keyword[public] Keyword[static] Keyword[void] identifier[deleteDirContents] operator[SEP] identifier[File] identifier[dir] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[dir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[||] operator[!] identifier[dir] operator[SEP]... |
public MachineTime<U> inverse() {
if (this.isEmpty()) {
return this;
}
return new MachineTime<>(Math.negateExact(this.seconds), -this.nanos, this.scale);
} | class class_name[name] begin[{]
method[inverse, return_type[type[MachineTime]], modifier[public], parameter[]] begin[{]
if[THIS[call[None.isEmpty, parameter[]]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
return[ClassCreator(arguments=[MethodInvocation... | Keyword[public] identifier[MachineTime] operator[<] identifier[U] operator[>] identifier[inverse] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP]
}
... |
public TimerScheduleType<TimerType<T>> getOrCreateSchedule()
{
Node node = childNode.getOrCreate("schedule");
TimerScheduleType<TimerType<T>> schedule = new TimerScheduleTypeImpl<TimerType<T>>(this, "schedule", childNode, node);
return schedule;
} | class class_name[name] begin[{]
method[getOrCreateSchedule, return_type[type[TimerScheduleType]], modifier[public], parameter[]] begin[{]
local_variable[type[Node], node]
local_variable[type[TimerScheduleType], schedule]
return[member[.schedule]]
end[}]
END[}] | Keyword[public] identifier[TimerScheduleType] operator[<] identifier[TimerType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateSchedule] operator[SEP] operator[SEP] {
identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] l... |
public void forEach(@NotNull DoubleConsumer action) {
while (iterator.hasNext()) {
action.accept(iterator.nextDouble());
}
} | class class_name[name] begin[{]
method[forEach, return_type[void], modifier[public], parameter[action]] begin[{]
while[call[iterator.hasNext, parameter[]]] begin[{]
call[action.accept, parameter[call[iterator.nextDouble, parameter[]]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[forEach] operator[SEP] annotation[@] identifier[NotNull] identifier[DoubleConsumer] identifier[action] operator[SEP] {
Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[act... |
public void clear() {
try {
events.cleanup();
events = new XFastEventList(this.attributeMapSerializer);
} catch (IOException e) {
e.printStackTrace();
}
} | class class_name[name] begin[{]
method[clear, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=cleanup, postfix_operators=[], prefix_operators=[], qualifier=events, selectors=[], type_arguments=None), lab... | Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[events] operator[SEP] identifier[cleanup] operator[SEP] operator[SEP] operator[SEP] identifier[events] operator[=] Keyword[new] identifier[XFastEventList] operator[SEP] Keyword[this] operator[SEP] i... |
public <R> Connection<CL> getConnectionForOperation(BaseOperation<CL, R> baseOperation) {
return selectionStrategy.getConnection(baseOperation, cpConfiguration.getMaxTimeoutWhenExhausted(),
TimeUnit.MILLISECONDS);
} | class class_name[name] begin[{]
method[getConnectionForOperation, return_type[type[Connection]], modifier[public], parameter[baseOperation]] begin[{]
return[call[selectionStrategy.getConnection, parameter[member[.baseOperation], call[cpConfiguration.getMaxTimeoutWhenExhausted, parameter[]], member[Time... | Keyword[public] operator[<] identifier[R] operator[>] identifier[Connection] operator[<] identifier[CL] operator[>] identifier[getConnectionForOperation] operator[SEP] identifier[BaseOperation] operator[<] identifier[CL] , identifier[R] operator[>] identifier[baseOperation] operator[SEP] {
Keyword[return] ident... |
public Map<Object, Object> getSwappableData() {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[GET_SWAPPABLE_DATA], appNameAndIdString);
}
Hash... | class class_name[name] begin[{]
method[getSwappableData, return_type[type[Map]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINE]]]... | Keyword[public] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[getSwappableData] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[... |
public RespokeConnection getConnection(String connectionID, boolean skipCreate) {
RespokeConnection connection = null;
for (RespokeConnection eachConnection : connections) {
if (eachConnection.connectionID.equals(connectionID)) {
connection = eachConnection;
... | class class_name[name] begin[{]
method[getConnection, return_type[type[RespokeConnection]], modifier[public], parameter[connectionID, skipCreate]] begin[{]
local_variable[type[RespokeConnection], connection]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodIn... | Keyword[public] identifier[RespokeConnection] identifier[getConnection] operator[SEP] identifier[String] identifier[connectionID] , Keyword[boolean] identifier[skipCreate] operator[SEP] {
identifier[RespokeConnection] identifier[connection] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identi... |
public int bin( double col_data ) {
if(Double.isNaN(col_data)) return _nbin; // NA bucket
if (Double.isInfinite(col_data)) // Put infinity to most left/right bin
if (col_data<0) return 0;
else return _nbin-1;
assert _min <= col_data && col_data < _maxEx : "Coldata " + col_data + " out of range "... | class class_name[name] begin[{]
method[bin, return_type[type[int]], modifier[public], parameter[col_data]] begin[{]
if[call[Double.isNaN, parameter[member[.col_data]]]] begin[{]
return[member[._nbin]]
else begin[{]
None
end[}]
if[call[Double.isInfinite, parameter... | Keyword[public] Keyword[int] identifier[bin] operator[SEP] Keyword[double] identifier[col_data] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[col_data] operator[SEP] operator[SEP] Keyword[return] identifier[_nbin] operator[SEP] Keyword[if] o... |
@Nullable
public static DependencyOptions fromFlags(
@Nullable DependencyMode dependencyModeFlag,
List<String> entryPointFlag,
List<String> closureEntryPointFlag,
String commonJsEntryModuleFlag,
boolean manageClosureDependenciesFlag,
boolean onlyClosureDependenciesFlag) {
bool... | class class_name[name] begin[{]
method[fromFlags, return_type[type[DependencyOptions]], modifier[public static], parameter[dependencyModeFlag, entryPointFlag, closureEntryPointFlag, commonJsEntryModuleFlag, manageClosureDependenciesFlag, onlyClosureDependenciesFlag]] begin[{]
local_variable[type[boolea... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[DependencyOptions] identifier[fromFlags] operator[SEP] annotation[@] identifier[Nullable] identifier[DependencyMode] identifier[dependencyModeFlag] , identifier[List] operator[<] identifier[String] operator[>] identifier[entryPointFlag] , i... |
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
if (servletContext == null)
if (applicationContext instanceof WebApplicationContext) {
servletContext = ((WebApplicationContext) applicationContext).getServletC... | class class_name[name] begin[{]
method[setApplicationContext, return_type[void], modifier[public], parameter[applicationContext]] begin[{]
assign[THIS[member[None.applicationContext]], member[.applicationContext]]
if[binary_operation[member[.servletContext], ==, literal[null]]] ... | Keyword[public] Keyword[void] identifier[setApplicationContext] operator[SEP] identifier[ApplicationContext] identifier[applicationContext] operator[SEP] Keyword[throws] identifier[BeansException] {
Keyword[this] operator[SEP] identifier[applicationContext] operator[=] identifier[applicationContext] operator[SEP... |
private final void cleanupAfterExceptionDuringNodeDirCheck() {
if (nodeDirectory != null) {
// attempt to remove the node directory
try {
if (session.exists(nodeDirectory, this)) {
session.rmdir(nodeDirectory);
}
nodeDir... | class class_name[name] begin[{]
method[cleanupAfterExceptionDuringNodeDirCheck, return_type[void], modifier[final private], parameter[]] begin[{]
if[binary_operation[member[.nodeDirectory], !=, literal[null]]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(argum... | Keyword[private] Keyword[final] Keyword[void] identifier[cleanupAfterExceptionDuringNodeDirCheck] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[nodeDirectory] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[session] opera... |
public void setName(int pathId, String pathName) {
PreparedStatement statement = null;
try (Connection sqlConnection = sqlService.getConnection()) {
statement = sqlConnection.prepareStatement(
"UPDATE " + Constants.DB_TABLE_PATH +
" SET " + Constants.PATH_... | class class_name[name] begin[{]
method[setName, return_type[void], modifier[public], parameter[pathId, pathName]] begin[{]
local_variable[type[PreparedStatement], statement]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=statement, postfix_opera... | Keyword[public] Keyword[void] identifier[setName] operator[SEP] Keyword[int] identifier[pathId] , identifier[String] identifier[pathName] operator[SEP] {
identifier[PreparedStatement] identifier[statement] operator[=] Other[null] operator[SEP] Keyword[try] operator[SEP] identifier[Connection] identifier[sqlConn... |
public CreateIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) {
setRequestTemplates(requestTemplates);
return this;
} | class class_name[name] begin[{]
method[withRequestTemplates, return_type[type[CreateIntegrationResult]], modifier[public], parameter[requestTemplates]] begin[{]
call[.setRequestTemplates, parameter[member[.requestTemplates]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[CreateIntegrationResult] identifier[withRequestTemplates] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[requestTemplates] operator[SEP] {
identifier[setRequestTempl... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "OperationParameter", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_GeneralOperationParameter")
public JAXBElement<OperationParameterType> createOperationParameter(OperationParameterType value) {
return new... | class class_name[name] begin[{]
method[createOperationParameter, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_OperationParameter_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRefer... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
public B channel(Class<? extends C> channelClass) {
if (channelClass == null) {
throw new NullPointerException("channelClass");
}
return channelFactory(new ReflectiveChannelFactory<C>(channelClass));
} | class class_name[name] begin[{]
method[channel, return_type[type[B]], modifier[public], parameter[channelClass]] begin[{]
if[binary_operation[member[.channelClass], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_op... | Keyword[public] identifier[B] identifier[channel] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[C] operator[>] identifier[channelClass] operator[SEP] {
Keyword[if] operator[SEP] identifier[channelClass] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keywo... |
private void close()
{
lock.lock();
try {
for (SocketBase s : sockets) {
try {
s.setSocketOpt(ZMQ.ZMQ_LINGER, 0);
s.close();
}
catch (Exception ignore) {
}
}
so... | class class_name[name] begin[{]
method[close, return_type[void], modifier[private], parameter[]] begin[{]
call[lock.lock, parameter[]]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(argumen... | Keyword[private] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[for] operator[SEP] identifier[SocketBase] identifier[s] operator[:] identifier[sockets] operator[SEP] {
... |
public String cleanupPreFormatted(String value) {
String result = value;
if (value != null) {
Matcher matcher = PRE_FORMATTED_PATTERN.matcher(value);
if (matcher.matches()) {
String escapedBody = matcher.group(1);
result = StringEscapeUtils.unescap... | class class_name[name] begin[{]
method[cleanupPreFormatted, return_type[type[String]], modifier[public], parameter[value]] begin[{]
local_variable[type[String], result]
if[binary_operation[member[.value], !=, literal[null]]] begin[{]
local_variable[type[Matcher], matcher]
... | Keyword[public] identifier[String] identifier[cleanupPreFormatted] operator[SEP] identifier[String] identifier[value] operator[SEP] {
identifier[String] identifier[result] operator[=] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] {
i... |
public void calc(int numLabels){
//计算最大阶
int numTemplets = size();
this.orders = new int[numTemplets];
for(int j=0; j<numTemplets; j++) {
Templet t = get(j);
this.orders[j] = t.getOrder();
if (orders[j] > maxOrder)
maxOrder = orders[j];
}
base = new int[maxOrder+2];
base[0]=1;
... | class class_name[name] begin[{]
method[calc, return_type[void], modifier[public], parameter[numLabels]] begin[{]
local_variable[type[int], numTemplets]
assign[THIS[member[None.orders]], ArrayCreator(dimensions=[MemberReference(member=numTemplets, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[void] identifier[calc] operator[SEP] Keyword[int] identifier[numLabels] operator[SEP] {
Keyword[int] identifier[numTemplets] operator[=] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[orders] operator[=] Keyword[new] Keyword[int] operator... |
public void put(int data)
{
// If the buffer is small.
if (mBuffer.capacity() < (mLength + 1))
{
expandBuffer(mLength + ADDITIONAL_BUFFER_SIZE);
}
mBuffer.put((byte)data);
++mLength;
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[data]] begin[{]
if[binary_operation[call[mBuffer.capacity, parameter[]], <, binary_operation[member[.mLength], +, literal[1]]]] begin[{]
call[.expandBuffer, parameter[binary_operat... | Keyword[public] Keyword[void] identifier[put] operator[SEP] Keyword[int] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[mBuffer] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[<] operator[SEP] identifier[mLength] operator[+] Other[1] operator[SEP] operator[SEP] {
... |
public static Restriction ne(String name, Object value){
return new Restriction(Operator.NOT_EQUALS, name, value);
} | class class_name[name] begin[{]
method[ne, return_type[type[Restriction]], modifier[public static], parameter[name, value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=NOT_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=Operator, selectors=[]), MemberReference(member=nam... | Keyword[public] Keyword[static] identifier[Restriction] identifier[ne] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[Restriction] operator[SEP] identifier[Operator] operator[SEP] identifier[NOT_EQUALS] , identifi... |
public static String decodeAmpersand(String s) {
if(s==null || s.indexOf('&')==-1) return(s);
StringBuilder result = new StringBuilder();
int[] eatLength = new int[1];// add this in order to multithread safe
while (s.length() != 0) {
char c = eatAmpersand(s, eatLength);
if (eatLength[0] > 1)... | class class_name[name] begin[{]
method[decodeAmpersand, return_type[type[String]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[call[s.indexOf, parameter[literal['&']]], ==, literal[1]]]] begin[{]
retur... | Keyword[public] Keyword[static] identifier[String] identifier[decodeAmpersand] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] o... |
public final static <T> T readJson(String json, Class<T> clazz)
{
ObjectMapper mapper = new ObjectMapper();
try
{
if (json != null && !json.isEmpty())
{
return mapper.readValue(json, clazz);
}
else
{
... | class class_name[name] begin[{]
method[readJson, return_type[type[T]], modifier[final public static], parameter[json, clazz]] begin[{]
local_variable[type[ObjectMapper], mapper]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=js... | Keyword[public] Keyword[final] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[readJson] operator[SEP] identifier[String] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] {
identifier[ObjectMapper] identifier[mapper] operat... |
public XObject eval(
Node contextNode, String str, PrefixResolver prefixResolver)
throws TransformerException
{
// Since we don't have a XML Parser involved here, install some default support
// for things like namespaces, etc.
// (Changed from: XPathContext xpathSupport = new XPat... | class class_name[name] begin[{]
method[eval, return_type[type[XObject]], modifier[public], parameter[contextNode, str, prefixResolver]] begin[{]
local_variable[type[XPath], xpath]
local_variable[type[XPathContext], xpathSupport]
local_variable[type[int], ctxtNode]
return[call[xp... | Keyword[public] identifier[XObject] identifier[eval] operator[SEP] identifier[Node] identifier[contextNode] , identifier[String] identifier[str] , identifier[PrefixResolver] identifier[prefixResolver] operator[SEP] Keyword[throws] identifier[TransformerException] {
identifier[XPath] identifier[xpath] operator[... |
public final void entryRuleParenthesizedTerminalElement() throws RecognitionException {
try {
// InternalXtext.g:1221:1: ( ruleParenthesizedTerminalElement EOF )
// InternalXtext.g:1222:1: ruleParenthesizedTerminalElement EOF
{
before(grammarAccess.getParenthesiz... | class class_name[name] begin[{]
method[entryRuleParenthesizedTerminalElement, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getP... | Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleParenthesizedTerminalElement] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
{
identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getParenthes... |
public void close() {
try {
String username = dataSource.getUsername();
String password = dataSource.getPassword();
dataSource.close();
if (isEmbeddedDB()) {
shutdownEmbeddedDB(username, password);
}
} catch (SQLException sqle)... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUsername, postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[String] identifier[username] operator[=] identifier[dataSource] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[password] operator[=] id... |
public static String getValueLabel(final Object value) {
if (value == null) {
return NULL_LABEL;
}
if (value instanceof HasLabelAdvice) {
final String suggestedLabel = ((HasLabelAdvice) value).getSuggestedLabel();
if (!Strings.isNullOrEmpty(suggestedLabel)) {... | class class_name[name] begin[{]
method[getValueLabel, return_type[type[String]], modifier[public static], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
return[member[.NULL_LABEL]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[String] identifier[getValueLabel] operator[SEP] Keyword[final] identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[NULL_LABEL] operator[SEP]
... |
public DocServiceBuilder exampleHttpHeaders(String serviceName, HttpHeaders... exampleHttpHeaders) {
requireNonNull(exampleHttpHeaders, "exampleHttpHeaders");
return exampleHttpHeaders(serviceName, ImmutableList.copyOf(exampleHttpHeaders));
} | class class_name[name] begin[{]
method[exampleHttpHeaders, return_type[type[DocServiceBuilder]], modifier[public], parameter[serviceName, exampleHttpHeaders]] begin[{]
call[.requireNonNull, parameter[member[.exampleHttpHeaders], literal["exampleHttpHeaders"]]]
return[call[.exampleHttpHe... | Keyword[public] identifier[DocServiceBuilder] identifier[exampleHttpHeaders] operator[SEP] identifier[String] identifier[serviceName] , identifier[HttpHeaders] operator[...] identifier[exampleHttpHeaders] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[exampleHttpHeaders] , literal[String] ... |
private void nugetPackCommand() throws MojoExecutionException {
List<String> commandList = new LinkedList<String>();
commandList.add(0, NUGET_COMMAND);
commandList.add(1, "pack");
String[] command = commandList.toArray(new String[commandList.size()]);
ProcessBuilder builder = new... | class class_name[name] begin[{]
method[nugetPackCommand, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[List], commandList]
call[commandList.add, parameter[literal[0], member[.NUGET_COMMAND]]]
call[commandList.add, parameter[literal[1], l... | Keyword[private] Keyword[void] identifier[nugetPackCommand] operator[SEP] operator[SEP] Keyword[throws] identifier[MojoExecutionException] {
identifier[List] operator[<] identifier[String] operator[>] identifier[commandList] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[String] operator[... |
public void setTracePrettyPrint(boolean pretty) {
if (this.httpClient instanceof DefaultHttpClient) {
((DefaultHttpClient)this.httpClient).setTracePrettyPrint(pretty);
}
else
throw new UnsupportedOperationException("Invalid operation for class " + this.httpClient.getClass... | class class_name[name] begin[{]
method[setTracePrettyPrint, return_type[void], modifier[public], parameter[pretty]] begin[{]
if[binary_operation[THIS[member[None.httpClient]], instanceof, type[DefaultHttpClient]]] begin[{]
Cast(expression=This(postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[setTracePrettyPrint] operator[SEP] Keyword[boolean] identifier[pretty] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[httpClient] Keyword[instanceof] identifier[DefaultHttpClient] operator[SEP] {
operator[SEP] operator[SEP] ide... |
public String generateDrop(String table) {
StringBuffer result = new StringBuffer();
result.append("DROP TABLE ");
result.append(table);
result.append(";\n");
return result.toString();
} | class class_name[name] begin[{]
method[generateDrop, return_type[type[String]], modifier[public], parameter[table]] begin[{]
local_variable[type[StringBuffer], result]
call[result.append, parameter[literal["DROP TABLE "]]]
call[result.append, parameter[member[.table]]]
... | Keyword[public] identifier[String] identifier[generateDrop] operator[SEP] identifier[String] identifier[table] operator[SEP] {
identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append... |
public void setUidHash(String uidHash) {
Preconditions.checkNotNull(uidHash);
Preconditions.checkArgument(uidHash.matches("^[0-9A-Fa-f]{32}$"),
"Node hash must be a 32 character String that describes a hex code. Found: " + uidHash);
this.userProvidedNodeHash = uidHash;
} | class class_name[name] begin[{]
method[setUidHash, return_type[void], modifier[public], parameter[uidHash]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.uidHash]]]
call[Preconditions.checkArgument, parameter[call[uidHash.matches, parameter[literal["^[0-9A-Fa-f]{32... | Keyword[public] Keyword[void] identifier[setUidHash] operator[SEP] identifier[String] identifier[uidHash] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[uidHash] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument... |
@Override
public boolean remove(Object o) {
if (o == null) {
return false;
}
if (size() == 0) {
return false;
}
synchronized (this) {
//First check the expedited buffer
synchronized (lock) {
//Check if we wrap... | class class_name[name] begin[{]
method[remove, return_type[type[boolean]], modifier[public], parameter[o]] begin[{]
if[binary_operation[member[.o], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation[call[... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[... |
String fastFormat(double d) {
// (Re-)Evaluates fast-path status if needed.
if (fastPathCheckNeeded)
checkAndSetFastPathStatus();
if (!isFastPath )
// DecimalFormat instance is not in a fast-path state.
return null;
if (!Double.isFinite(d))
... | class class_name[name] begin[{]
method[fastFormat, return_type[type[String]], modifier[default], parameter[d]] begin[{]
if[member[.fastPathCheckNeeded]] begin[{]
call[.checkAndSetFastPathStatus, parameter[]]
else begin[{]
None
end[}]
if[member[.isFast... | identifier[String] identifier[fastFormat] operator[SEP] Keyword[double] identifier[d] operator[SEP] {
Keyword[if] operator[SEP] identifier[fastPathCheckNeeded] operator[SEP] identifier[checkAndSetFastPathStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isFastPath... |
public static void addComment (Activity context, Entity entity, String text, CommentOptions commentOptions, CommentAddListener listener, SocialNetwork...networks) {
proxy.addComment(context, entity, text, commentOptions, listener, networks);
} | class class_name[name] begin[{]
method[addComment, return_type[void], modifier[public static], parameter[context, entity, text, commentOptions, listener, networks]] begin[{]
call[proxy.addComment, parameter[member[.context], member[.entity], member[.text], member[.commentOptions], member[.liste... | Keyword[public] Keyword[static] Keyword[void] identifier[addComment] operator[SEP] identifier[Activity] identifier[context] , identifier[Entity] identifier[entity] , identifier[String] identifier[text] , identifier[CommentOptions] identifier[commentOptions] , identifier[CommentAddListener] identifier[listener] , i... |
private Set<String> getStringSet(I_CmsXmlContentLocation val, String path) {
Set<String> valueSet = new HashSet<String>();
if ((val != null)) {
List<I_CmsXmlContentValueLocation> singleValueLocs = val.getSubValues(path);
for (I_CmsXmlContentValueLocation singleValueLoc : singleV... | class class_name[name] begin[{]
method[getStringSet, return_type[type[Set]], modifier[private], parameter[val, path]] begin[{]
local_variable[type[Set], valueSet]
if[binary_operation[member[.val], !=, literal[null]]] begin[{]
local_variable[type[List], singleValueLocs]
... | Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[getStringSet] operator[SEP] identifier[I_CmsXmlContentLocation] identifier[val] , identifier[String] identifier[path] operator[SEP] {
identifier[Set] operator[<] identifier[String] operator[>] identifier[valueSet] operator[=]... |
public boolean flushable() throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "flushable");
// Short circuit if we've never created a stream
if (streamSet == null)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())... | class class_name[name] begin[{]
method[flushable, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc... | Keyword[public] Keyword[boolean] identifier[flushable] operator[SEP] operator[SEP] Keyword[throws] identifier[SIResourceException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[... |
@Override
public int compareTo(final MutableByte other) {
return (this.value > other.value) ? 1 : ((this.value == other.value) ? 0 : -1);
} | class class_name[name] begin[{]
method[compareTo, return_type[type[int]], modifier[public], parameter[other]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=value, postfix_operators=N... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] Keyword[final] identifier[MutableByte] identifier[other] operator[SEP] {
Keyword[return] operator[SEP] Keyword[this] operator[SEP] identifier[value] operator[>] identifier[other] operator[SEP] identifier[value] op... |
public final boolean searchContainHits(
QueryBuilder qbParam,
String indexParam,
boolean withNoFieldsParam,
int offsetParam,
int limitParam,
Long ... formTypesParam) {
SearchHits searchHits = this.searchWithHits(
qbParam,
indexParam,
withNoFieldsParam,
offsetParam,
limitParam,
... | class class_name[name] begin[{]
method[searchContainHits, return_type[type[boolean]], modifier[final public], parameter[qbParam, indexParam, withNoFieldsParam, offsetParam, limitParam, formTypesParam]] begin[{]
local_variable[type[SearchHits], searchHits]
return[binary_operation[binary_operatio... | Keyword[public] Keyword[final] Keyword[boolean] identifier[searchContainHits] operator[SEP] identifier[QueryBuilder] identifier[qbParam] , identifier[String] identifier[indexParam] , Keyword[boolean] identifier[withNoFieldsParam] , Keyword[int] identifier[offsetParam] , Keyword[int] identifier[limitParam] , identi... |
public RowIterator getRows() throws RepositoryException
{
if (excerptProvider == null)
{
try
{
excerptProvider = createExcerptProvider();
}
catch (IOException e)
{
throw new RepositoryException(e);
}
}
return new Ro... | class class_name[name] begin[{]
method[getRows, return_type[type[RowIterator]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.excerptProvider], ==, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReferenc... | Keyword[public] identifier[RowIterator] identifier[getRows] operator[SEP] operator[SEP] Keyword[throws] identifier[RepositoryException] {
Keyword[if] operator[SEP] identifier[excerptProvider] operator[==] Other[null] operator[SEP] {
Keyword[try] {
identifier[excerptProvider] operator[=]... |
private void writeTheLines(final BufferedOutputStream stream,
final String charset)
throws IOException {
for (final GedWriterLine line : visitor.getLines()) {
if (line.getLine().isEmpty()) {
continue;
}
final String string = line.getLin... | class class_name[name] begin[{]
method[writeTheLines, return_type[void], modifier[private], parameter[stream, charset]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getLine, postfix_operators=[], prefix_operators=[], quali... | Keyword[private] Keyword[void] identifier[writeTheLines] operator[SEP] Keyword[final] identifier[BufferedOutputStream] identifier[stream] , Keyword[final] identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[for] operator[SEP] Keyword[final] identifier[GedWriter... |
@Override
public boolean registerForNotifications(Notification targets, NotificationListener callbackObject) throws IllegalArgumentException {
verifyTargets(targets);
/*
* Convert the target artifact version so we can register with the delegate. We just use the delegate root (as we can't c... | class class_name[name] begin[{]
method[registerForNotifications, return_type[type[boolean]], modifier[public], parameter[targets, callbackObject]] begin[{]
call[.verifyTargets, parameter[member[.targets]]]
local_variable[type[ArtifactNotification], artifactNotification]
local_va... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[registerForNotifications] operator[SEP] identifier[Notification] identifier[targets] , identifier[NotificationListener] identifier[callbackObject] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[verify... |
public static PathAndQuery matches(final String pattern)
{
return new PathAndQuery(pattern) {
@Override
public String toString()
{
return "PathAndQuery.matches(\"" + pattern + "\")";
}
};
} | class class_name[name] begin[{]
method[matches, return_type[type[PathAndQuery]], modifier[public static], parameter[pattern]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=[MethodDeclaration(annotation... | Keyword[public] Keyword[static] identifier[PathAndQuery] identifier[matches] operator[SEP] Keyword[final] identifier[String] identifier[pattern] operator[SEP] {
Keyword[return] Keyword[new] identifier[PathAndQuery] operator[SEP] identifier[pattern] operator[SEP] {
annotation[@] identifier[Override] Ke... |
private static String getCharsetFromText(byte[] content,
String declaredCharset, int maxLengthCharsetDetection) {
String charset = null;
// filter HTML tags
CharsetDetector charsetDetector = new CharsetDetector();
charsetDetector.enableInputFilter(true);
// give it a ... | class class_name[name] begin[{]
method[getCharsetFromText, return_type[type[String]], modifier[private static], parameter[content, declaredCharset, maxLengthCharsetDetection]] begin[{]
local_variable[type[String], charset]
local_variable[type[CharsetDetector], charsetDetector]
c... | Keyword[private] Keyword[static] identifier[String] identifier[getCharsetFromText] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[content] , identifier[String] identifier[declaredCharset] , Keyword[int] identifier[maxLengthCharsetDetection] operator[SEP] {
identifier[String] identifier[char... |
public UnsignedInteger mod(UnsignedInteger val) {
return fromIntBits(UnsignedInts.remainder(value, checkNotNull(val).value));
} | class class_name[name] begin[{]
method[mod, return_type[type[UnsignedInteger]], modifier[public], parameter[val]] begin[{]
return[call[.fromIntBits, parameter[call[UnsignedInts.remainder, parameter[member[.value], call[.checkNotNull, parameter[member[.val]]]]]]]]
end[}]
END[}] | Keyword[public] identifier[UnsignedInteger] identifier[mod] operator[SEP] identifier[UnsignedInteger] identifier[val] operator[SEP] {
Keyword[return] identifier[fromIntBits] operator[SEP] identifier[UnsignedInts] operator[SEP] identifier[remainder] operator[SEP] identifier[value] , identifier[checkNotNull] oper... |
@Override
public void close() {
if (conn != null) {
LOG.trace("Close connection. conn[{}], hashCode[{}]", conn, conn.hashCode());
try {
conn.close();
} catch (SQLException e) {
throw new UroborosqlSQLException(e);
}
conn = null;
}
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.conn], !=, literal[null]]] begin[{]
call[LOG.trace, parameter[literal["Close connection. conn[{}], hashCode[{}]"], member[.conn], call[con... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[conn] operator[!=] Other[null] operator[SEP] {
identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[conn] , iden... |
public EClass getIfcFlowStorageDeviceType() {
if (ifcFlowStorageDeviceTypeEClass == null) {
ifcFlowStorageDeviceTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(251);
}
return ifcFlowStorageDeviceTypeEClass;
} | class class_name[name] begin[{]
method[getIfcFlowStorageDeviceType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcFlowStorageDeviceTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcFlowStorageDeviceTypeEClass]... | Keyword[public] identifier[EClass] identifier[getIfcFlowStorageDeviceType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcFlowStorageDeviceTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcFlowStorageDeviceTypeEClass] operator[=] operator[SEP] identifier[EClass]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.