code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public S setParameter(String key, String value) {
if (parameters == null) {
parameters = new ConcurrentHashMap<String, String>();
}
if (value == null) {
parameters.remove(key);
} else {
parameters.put(key, value);
}
return castThis();
... | class class_name[name] begin[{]
method[setParameter, return_type[type[S]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[member[.parameters], ==, literal[null]]] begin[{]
assign[member[.parameters], ClassCreator(arguments=[], body=None, constructo... | Keyword[public] identifier[S] identifier[setParameter] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[parameters] operator[==] Other[null] operator[SEP] {
identifier[parameters] operator[=] Keyword[new] iden... |
@Override
public int stage3EquivalenceParameters(ProtoNetwork network,
Set<EquivalenceDataIndex> indexes) throws IOException {
if (indexes == null) {
throw new InvalidArgument("indexes", indexes);
}
// FIXME Better way to subset equivalences, like maybe by domain
... | class class_name[name] begin[{]
method[stage3EquivalenceParameters, return_type[type[int]], modifier[public], parameter[network, indexes]] begin[{]
if[binary_operation[member[.indexes], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[stage3EquivalenceParameters] operator[SEP] identifier[ProtoNetwork] identifier[network] , identifier[Set] operator[<] identifier[EquivalenceDataIndex] operator[>] identifier[indexes] operator[SEP] Keyword[throws] identifier[IOException] {
... |
protected void closeTx() {
txActive = false;
try {
connection.setAutoCommit(true);
} catch (SQLException sex) {
throw new DbSqlException("Close TX failed", sex);
}
} | class class_name[name] begin[{]
method[closeTx, return_type[void], modifier[protected], parameter[]] begin[{]
assign[member[.txActive], literal[false]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], quali... | Keyword[protected] Keyword[void] identifier[closeTx] operator[SEP] operator[SEP] {
identifier[txActive] operator[=] literal[boolean] operator[SEP] Keyword[try] {
identifier[connection] operator[SEP] identifier[setAutoCommit] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
Ke... |
public Long queryLong(String paramName, Long defaultValue) {
return this.request.queryLong(paramName, defaultValue);
} | class class_name[name] begin[{]
method[queryLong, return_type[type[Long]], modifier[public], parameter[paramName, defaultValue]] begin[{]
return[THIS[member[None.request]call[None.queryLong, parameter[member[.paramName], member[.defaultValue]]]]]
end[}]
END[}] | Keyword[public] identifier[Long] identifier[queryLong] operator[SEP] identifier[String] identifier[paramName] , identifier[Long] identifier[defaultValue] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[request] operator[SEP] identifier[queryLong] operator[SEP] identifier[paramName] , ide... |
public EClass getIfcPropertyEnumeratedValue() {
if (ifcPropertyEnumeratedValueEClass == null) {
ifcPropertyEnumeratedValueEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(402);
}
return ifcPropertyEnumeratedValueEClass;
} | class class_name[name] begin[{]
method[getIfcPropertyEnumeratedValue, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcPropertyEnumeratedValueEClass], ==, literal[null]]] begin[{]
assign[member[.ifcPropertyEnumeratedValueE... | Keyword[public] identifier[EClass] identifier[getIfcPropertyEnumeratedValue] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcPropertyEnumeratedValueEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcPropertyEnumeratedValueEClass] operator[=] operator[SEP] identifier[E... |
public static org.restcomm.connect.provisioning.number.api.PhoneNumber convertIncomingPhoneNumbertoPhoneNumber(IncomingPhoneNumber incomingPhoneNumber) {
return new org.restcomm.connect.provisioning.number.api.PhoneNumber(
incomingPhoneNumber.getFriendlyName(),
incomingPhoneNumbe... | class class_name[name] begin[{]
method[convertIncomingPhoneNumbertoPhoneNumber, return_type[type[org]], modifier[public static], parameter[incomingPhoneNumber]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFriendlyName, postfix_operators=[], prefix_operators=[], qual... | Keyword[public] Keyword[static] identifier[org] operator[SEP] identifier[restcomm] operator[SEP] identifier[connect] operator[SEP] identifier[provisioning] operator[SEP] identifier[number] operator[SEP] identifier[api] operator[SEP] identifier[PhoneNumber] identifier[convertIncomingPhoneNumbertoPhoneNumber] operator[SE... |
public void setDbWorkConStr(String dbWorkConStr) {
String driver;
String pool = '.' + getPool() + '.';
driver = getDbProperty(m_databaseKey + ".driver");
setExtProperty(CmsDbPoolV11.KEY_DATABASE_POOL + pool + CmsDbPoolV11.KEY_JDBC_DRIVER, driver);
setExtProperty(CmsDbPoolV11.K... | class class_name[name] begin[{]
method[setDbWorkConStr, return_type[void], modifier[public], parameter[dbWorkConStr]] begin[{]
local_variable[type[String], driver]
local_variable[type[String], pool]
assign[member[.driver], call[.getDbProperty, parameter[binary_operation[member[.... | Keyword[public] Keyword[void] identifier[setDbWorkConStr] operator[SEP] identifier[String] identifier[dbWorkConStr] operator[SEP] {
identifier[String] identifier[driver] operator[SEP] identifier[String] identifier[pool] operator[=] literal[String] operator[+] identifier[getPool] operator[SEP] operator[SEP] opera... |
public List<PostOfficeElement.PostOfficeName> getPostOfficeName() {
if (postOfficeName == null) {
postOfficeName = new ArrayList<PostOfficeElement.PostOfficeName>();
}
return this.postOfficeName;
} | class class_name[name] begin[{]
method[getPostOfficeName, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.postOfficeName], ==, literal[null]]] begin[{]
assign[member[.postOfficeName], ClassCreator(arguments=[], body=None, cons... | Keyword[public] identifier[List] operator[<] identifier[PostOfficeElement] operator[SEP] identifier[PostOfficeName] operator[>] identifier[getPostOfficeName] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[postOfficeName] operator[==] Other[null] operator[SEP] {
identifier[postOffic... |
public static double norm1(double[] x) {
double norm = 0.0;
for (double n : x) {
norm += Math.abs(n);
}
return norm;
} | class class_name[name] begin[{]
method[norm1, return_type[type[double]], modifier[public static], parameter[x]] begin[{]
local_variable[type[double], norm]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=norm,... | Keyword[public] Keyword[static] Keyword[double] identifier[norm1] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x] operator[SEP] {
Keyword[double] identifier[norm] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[double] identifier[n] operator[:] identifier[x] o... |
public static KafkaWrapper create(State state) {
Preconditions.checkNotNull(state.getProp(ConfigurationKeys.KAFKA_BROKERS),
"Need to specify at least one Kafka broker.");
KafkaWrapper.Builder builder = new KafkaWrapper.Builder();
if (state.getPropAsBoolean(USE_NEW_KAFKA_API, DEFAULT_USE_NEW_KAFKA_AP... | class class_name[name] begin[{]
method[create, return_type[type[KafkaWrapper]], modifier[public static], parameter[state]] begin[{]
call[Preconditions.checkNotNull, parameter[call[state.getProp, parameter[member[ConfigurationKeys.KAFKA_BROKERS]]], literal["Need to specify at least one Kafka bro... | Keyword[public] Keyword[static] identifier[KafkaWrapper] identifier[create] operator[SEP] identifier[State] identifier[state] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[state] operator[SEP] identifier[getProp] operator[SEP] identifier[ConfigurationKe... |
public static String leftPad(String str, int size, char padChar) {
return org.apache.commons.lang3.StringUtils.leftPad(str, size, padChar);
} | class class_name[name] begin[{]
method[leftPad, return_type[type[String]], modifier[public static], parameter[str, size, padChar]] begin[{]
return[call[org.apache.commons.lang3.StringUtils.leftPad, parameter[member[.str], member[.size], member[.padChar]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[leftPad] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[size] , Keyword[char] identifier[padChar] operator[SEP] {
Keyword[return] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[commons] operator... |
public static <K, E> Map<K, List<E>> groupBy(final Iterable<E> iterable, final Function<E, K> func) {
final Map<K, List<E>> retVal = newLinkedHashMap();
for (E e : iterable) {
final K key = func.apply(e);
List<E> val;
if (retVal.containsKey(key)) {
val... | class class_name[name] begin[{]
method[groupBy, return_type[type[Map]], modifier[public static], parameter[iterable, func]] begin[{]
local_variable[type[Map], retVal]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarato... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[E] operator[>] identifier[Map] operator[<] identifier[K] , identifier[List] operator[<] identifier[E] operator[>] operator[>] identifier[groupBy] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[E] operator[>] identifier[it... |
public Observable<ServiceResponse<List<ClosedListEntityExtractor>>> listClosedListsWithServiceResponseAsync(UUID appId, String versionId, ListClosedListsOptionalParameter listClosedListsOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.clie... | class class_name[name] begin[{]
method[listClosedListsWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, listClosedListsOptionalParameter]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.endpoint, parameter[]]], ==, literal[nul... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[ClosedListEntityExtractor] operator[>] operator[>] operator[>] identifier[listClosedListsWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] ide... |
protected static io.grpc.netty.NegotiationType of(final NegotiationType negotiationType) {
switch (negotiationType) {
case PLAINTEXT:
return io.grpc.netty.NegotiationType.PLAINTEXT;
case PLAINTEXT_UPGRADE:
return io.grpc.netty.NegotiationType.PLAINTEXT_UPG... | class class_name[name] begin[{]
method[of, return_type[type[io]], modifier[static protected], parameter[negotiationType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['PLAINTEXT'], statements=[ReturnStatement(expression=MemberReference(member=PLAINTEXT, postfix_operators=[], prefix_operato... | Keyword[protected] Keyword[static] identifier[io] operator[SEP] identifier[grpc] operator[SEP] identifier[netty] operator[SEP] identifier[NegotiationType] identifier[of] operator[SEP] Keyword[final] identifier[NegotiationType] identifier[negotiationType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[n... |
public Interval withStartTime(LocalTime time) {
requireNonNull(time);
return new Interval(startDate, time, endDate, endTime, zoneId);
} | class class_name[name] begin[{]
method[withStartTime, return_type[type[Interval]], modifier[public], parameter[time]] begin[{]
call[.requireNonNull, parameter[member[.time]]]
return[ClassCreator(arguments=[MemberReference(member=startDate, postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[Interval] identifier[withStartTime] operator[SEP] identifier[LocalTime] identifier[time] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[time] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Interval] operator[SEP] identifier[startDate] , identi... |
public VirtualMachineScaleSetInner beginCreateOrUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[beginCreateOrUpdate, return_type[type[VirtualMachineScaleSetInner]], modifier[public], parameter[resourceGroupName, vmScaleSetName, parameters]] begin[{]
return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vmScal... | Keyword[public] identifier[VirtualMachineScaleSetInner] identifier[beginCreateOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] , identifier[VirtualMachineScaleSetInner] identifier[parameters] operator[SEP] {
Keyword[return] identifier[begi... |
public RegionInfo queryRegionInfo(RegionReqInfo regionReqInfo) {
try {
return queryRegionInfo(regionReqInfo.getAccessKey(), regionReqInfo.getBucket());
} catch (Exception e) {
e.printStackTrace();
}
return null;
} | class class_name[name] begin[{]
method[queryRegionInfo, return_type[type[RegionInfo]], modifier[public], parameter[regionReqInfo]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAccessKey, postfix_operators=[], prefix_operato... | Keyword[public] identifier[RegionInfo] identifier[queryRegionInfo] operator[SEP] identifier[RegionReqInfo] identifier[regionReqInfo] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[queryRegionInfo] operator[SEP] identifier[regionReqInfo] operator[SEP] identifier[getAccessKey] operator[SEP] o... |
protected final void addIllegalFieldPointer (int byteNumber) {
final FieldPointerSenseKeySpecificData fp = new FieldPointerSenseKeySpecificData(true,// senseKeySpecificDataValid
true,// commandData (i.e. invalid field in CDB)
false,// bitPointerValid
0,// bitPointer
byteNumb... | class class_name[name] begin[{]
method[addIllegalFieldPointer, return_type[void], modifier[final protected], parameter[byteNumber]] begin[{]
local_variable[type[FieldPointerSenseKeySpecificData], fp]
call[.addIllegalFieldPointer, parameter[member[.fp]]]
end[}]
END[}] | Keyword[protected] Keyword[final] Keyword[void] identifier[addIllegalFieldPointer] operator[SEP] Keyword[int] identifier[byteNumber] operator[SEP] {
Keyword[final] identifier[FieldPointerSenseKeySpecificData] identifier[fp] operator[=] Keyword[new] identifier[FieldPointerSenseKeySpecificData] operator[SEP] liter... |
public MBeanOperationInfo getOperationInfo(ObjectName name, String oper) throws JMException {
checkClientConnected();
MBeanInfo mbeanInfo;
try {
mbeanInfo = mbeanConn.getMBeanInfo(name);
} catch (Exception e) {
throw createJmException("Problems getting bean information from " + name, e);
}
for (MBeanO... | class class_name[name] begin[{]
method[getOperationInfo, return_type[type[MBeanOperationInfo]], modifier[public], parameter[name, oper]] begin[{]
call[.checkClientConnected, parameter[]]
local_variable[type[MBeanInfo], mbeanInfo]
TryStatement(block=[StatementExpression(expressio... | Keyword[public] identifier[MBeanOperationInfo] identifier[getOperationInfo] operator[SEP] identifier[ObjectName] identifier[name] , identifier[String] identifier[oper] operator[SEP] Keyword[throws] identifier[JMException] {
identifier[checkClientConnected] operator[SEP] operator[SEP] operator[SEP] identifier[MB... |
public void setRetainViewMode(@NonNull RetainViewMode retainViewMode) {
this.retainViewMode = retainViewMode != null ? retainViewMode : RetainViewMode.RELEASE_DETACH;
if (this.retainViewMode == RetainViewMode.RELEASE_DETACH && !attached) {
removeViewReference();
}
} | class class_name[name] begin[{]
method[setRetainViewMode, return_type[void], modifier[public], parameter[retainViewMode]] begin[{]
assign[THIS[member[None.retainViewMode]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=retainViewMode, postfix_operators=[], prefix_o... | Keyword[public] Keyword[void] identifier[setRetainViewMode] operator[SEP] annotation[@] identifier[NonNull] identifier[RetainViewMode] identifier[retainViewMode] operator[SEP] {
Keyword[this] operator[SEP] identifier[retainViewMode] operator[=] identifier[retainViewMode] operator[!=] Other[null] operator[?] iden... |
@Override
public Map<String, Object> toSource() {
Map<String, Object> sourceMap = new HashMap<>();
if (createdBy != null) {
addFieldToSource(sourceMap, "createdBy", createdBy);
}
if (createdTime != null) {
addFieldToSource(sourceMap, "createdTime", createdTime... | class class_name[name] begin[{]
method[toSource, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], sourceMap]
if[binary_operation[member[.createdBy], !=, literal[null]]] begin[{]
call[.addFieldToSource, parameter[member[.so... | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toSource] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[sourceMap] operator[=] Keyword[new] id... |
@Override
public int read () throws IOException
{
if (m_nPos >= m_nCount)
{
_fill ();
if (m_nPos >= m_nCount)
return -1;
}
return _getBufIfOpen ()[m_nPos++] & 0xff;
} | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_nPos], >=, member[.m_nCount]]] begin[{]
call[._fill, parameter[]]
if[binary_operation[member[.m_nPos], >=, m... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[m_nPos] operator[>=] identifier[m_nCount] operator[SEP] {
identifier[_fill] operator[SEP] operator[SEP] operator[S... |
public ArtifactStore newInstance()
{
if ( factoryHelper == null )
{
throw new IllegalStateException( "FactoryHelper has not been set" );
}
return new ProxyArtifactStore( factoryHelper.getRepositoryMetadataManager(),
factoryHelper.get... | class class_name[name] begin[{]
method[newInstance, return_type[type[ArtifactStore]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.factoryHelper], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pref... | Keyword[public] identifier[ArtifactStore] identifier[newInstance] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[factoryHelper] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operato... |
public static PID fromFilename(String filenameString)
throws MalformedPIDException {
String decoded = filenameString.replaceFirst("_", ":");
if (decoded.endsWith("%")) {
decoded = decoded.substring(0, decoded.length() - 1) + ".";
}
return new PID(decoded);
} | class class_name[name] begin[{]
method[fromFilename, return_type[type[PID]], modifier[public static], parameter[filenameString]] begin[{]
local_variable[type[String], decoded]
if[call[decoded.endsWith, parameter[literal["%"]]]] begin[{]
assign[member[.decoded], b... | Keyword[public] Keyword[static] identifier[PID] identifier[fromFilename] operator[SEP] identifier[String] identifier[filenameString] operator[SEP] Keyword[throws] identifier[MalformedPIDException] {
identifier[String] identifier[decoded] operator[=] identifier[filenameString] operator[SEP] identifier[replaceFirs... |
public boolean skipSpaces ()
{
while (m_nPos < m_sValue.length () && m_sValue.charAt (m_nPos) == ' ')
m_nPos++;
return m_nPos < m_sValue.length ();
} | class class_name[name] begin[{]
method[skipSpaces, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
while[binary_operation[binary_operation[member[.m_nPos], <, call[m_sValue.length, parameter[]]], &&, binary_operation[call[m_sValue.charAt, parameter[member[.m_nPos]]], ==, lit... | Keyword[public] Keyword[boolean] identifier[skipSpaces] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] identifier[m_nPos] operator[<] identifier[m_sValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[&&] identifier[m_sValue] operator[SEP] identifier[charAt] operator[SEP] iden... |
@Override
public List<ENTRY> removeAll(Collection<ENTRY> entries) throws MultiException, InvalidStateException {
final List<ENTRY> removedEntries = new ArrayList<>();
ExceptionStack exceptionStack = null;
registryLock.writeLock().lock();
try {
for (ENTRY entry : entries) ... | class class_name[name] begin[{]
method[removeAll, return_type[type[List]], modifier[public], parameter[entries]] begin[{]
local_variable[type[List], removedEntries]
local_variable[type[ExceptionStack], exceptionStack]
call[registryLock.writeLock, parameter[]]
TryStatemen... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[ENTRY] operator[>] identifier[removeAll] operator[SEP] identifier[Collection] operator[<] identifier[ENTRY] operator[>] identifier[entries] operator[SEP] Keyword[throws] identifier[MultiException] , identifier[InvalidStateExcept... |
protected void generateDefaultParameters(UseDefaultValues defValues){
int count = defValues.optParamIndex().length;
NativeType[] nt = defValues.nativeType();
Variant.Type[] vt = defValues.variantType();
String[] literal = defValues.literal();
for (int i = 0; i < count; i++) {
switc... | class class_name[name] begin[{]
method[generateDefaultParameters, return_type[void], modifier[protected], parameter[defValues]] begin[{]
local_variable[type[int], count]
local_variable[type[NativeType], nt]
local_variable[type[Variant], vt]
local_variable[type[String], literal]
... | Keyword[protected] Keyword[void] identifier[generateDefaultParameters] operator[SEP] identifier[UseDefaultValues] identifier[defValues] operator[SEP] {
Keyword[int] identifier[count] operator[=] identifier[defValues] operator[SEP] identifier[optParamIndex] operator[SEP] operator[SEP] operator[SEP] identifier[len... |
@SuppressWarnings("unchecked")
@Override
public void setValue(Object value) throws WidgetException {
try {
if (value instanceof String) {
selectSingle((String) value);
} else if (value instanceof List<?>) {
selectMultiple((List<String>) value);
... | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[value]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[WidgetException] {
Keyword[try] {
Key... |
private Object parseOption(UNode optionNode) {
if (optionNode.isValue()) {
return optionNode.getValue();
}
Map<String, Object> optValueMap = new HashMap<>();
for (UNode suboptNode : optionNode.getMemberList()) {
optValueMap.put(suboptNode.getName(), parseOption(su... | class class_name[name] begin[{]
method[parseOption, return_type[type[Object]], modifier[private], parameter[optionNode]] begin[{]
if[call[optionNode.isValue, parameter[]]] begin[{]
return[call[optionNode.getValue, parameter[]]]
else begin[{]
None
end[}]
local... | Keyword[private] identifier[Object] identifier[parseOption] operator[SEP] identifier[UNode] identifier[optionNode] operator[SEP] {
Keyword[if] operator[SEP] identifier[optionNode] operator[SEP] identifier[isValue] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[optionNode] opera... |
public static String escapeJavaScript(final Object target) {
if (target == null) {
return null;
}
return JavaScriptEscape.escapeJavaScript(target.toString());
} | class class_name[name] begin[{]
method[escapeJavaScript, return_type[type[String]], modifier[public static], parameter[target]] begin[{]
if[binary_operation[member[.target], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[c... | Keyword[public] Keyword[static] identifier[String] identifier[escapeJavaScript] operator[SEP] Keyword[final] identifier[Object] identifier[target] operator[SEP] {
Keyword[if] operator[SEP] identifier[target] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
... |
public static String getContainerNameFromUri(final URI resourceAddress, final boolean usePathStyleUris) {
return getResourceNameFromUri(resourceAddress, usePathStyleUris,
String.format("Invalid blob address '%s', missing container information", resourceAddress));
} | class class_name[name] begin[{]
method[getContainerNameFromUri, return_type[type[String]], modifier[public static], parameter[resourceAddress, usePathStyleUris]] begin[{]
return[call[.getResourceNameFromUri, parameter[member[.resourceAddress], member[.usePathStyleUris], call[String.format, parameter[li... | Keyword[public] Keyword[static] identifier[String] identifier[getContainerNameFromUri] operator[SEP] Keyword[final] identifier[URI] identifier[resourceAddress] , Keyword[final] Keyword[boolean] identifier[usePathStyleUris] operator[SEP] {
Keyword[return] identifier[getResourceNameFromUri] operator[SEP] identifi... |
private void removeDiscriminatorNode(Discriminator d) throws DiscriminationProcessException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "removeDiscriminatorNode: " + d);
}
if (d == null) {
DiscriminationProcessException e = new Discri... | class class_name[name] begin[{]
method[removeDiscriminatorNode, return_type[void], modifier[private], parameter[d]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, para... | Keyword[private] Keyword[void] identifier[removeDiscriminatorNode] operator[SEP] identifier[Discriminator] identifier[d] operator[SEP] Keyword[throws] identifier[DiscriminationProcessException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] oper... |
public static <TExpression> BsonField push(final String fieldName, final TExpression expression) {
return accumulator("$push", fieldName, expression);
} | class class_name[name] begin[{]
method[push, return_type[type[BsonField]], modifier[public static], parameter[fieldName, expression]] begin[{]
return[call[.accumulator, parameter[literal["$push"], member[.fieldName], member[.expression]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[TExpression] operator[>] identifier[BsonField] identifier[push] operator[SEP] Keyword[final] identifier[String] identifier[fieldName] , Keyword[final] identifier[TExpression] identifier[expression] operator[SEP] {
Keyword[return] identifier[accumulator] ope... |
@Override
protected Response serve() {
invoke();
String s = ParseTime.getTimezone().getID();
JsonObject response = new JsonObject();
response.addProperty("tz", s);
return Response.done(response);
} | class class_name[name] begin[{]
method[serve, return_type[type[Response]], modifier[protected], parameter[]] begin[{]
call[.invoke, parameter[]]
local_variable[type[String], s]
local_variable[type[JsonObject], response]
call[response.addProperty, parameter[litera... | annotation[@] identifier[Override] Keyword[protected] identifier[Response] identifier[serve] operator[SEP] operator[SEP] {
identifier[invoke] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[s] operator[=] identifier[ParseTime] operator[SEP] identifier[getTimezone] operator[SEP] operator[S... |
@Override
public void validate() {
// make sure the encoding is set..
if (this.encoding == null) {
throw new IllegalArgumentException("File encoding must not be null!");
}
//make sure it's a valid charset
Charset.forName(this.encoding);
// make... | class class_name[name] begin[{]
method[validate, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.encoding]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[validate] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[encoding] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] opera... |
public int decodeDigits(ByteArrayInputStream bis) throws ParameterException {
if (bis.available() == 0) {
throw new ParameterException("No more data to read.");
}
// FIXME: we could spare time by passing length arg - or getting it from
// bis??
int count = 0;
... | class class_name[name] begin[{]
method[decodeDigits, return_type[type[int]], modifier[public], parameter[bis]] begin[{]
if[binary_operation[call[bis.available, parameter[]], ==, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[public] Keyword[int] identifier[decodeDigits] operator[SEP] identifier[ByteArrayInputStream] identifier[bis] operator[SEP] Keyword[throws] identifier[ParameterException] {
Keyword[if] operator[SEP] identifier[bis] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[==] Other[0] opera... |
@Override
public void put(final K key, final V object, final long timeout) {
Objects.requireNonNull(object);
final long stamp = lock.writeLock();
try {
CacheObject<K,V> co = new CacheObject<>(key, object, timeout);
if (timeout != 0) {
existCustomTimeout = true;
}
if (isReallyFull(key)) {
pr... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[key, object, timeout]] begin[{]
call[Objects.requireNonNull, parameter[member[.object]]]
local_variable[type[long], stamp]
TryStatement(block=[LocalVariableDeclaration(annotations=[], decl... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] Keyword[final] identifier[K] identifier[key] , Keyword[final] identifier[V] identifier[object] , Keyword[final] Keyword[long] identifier[timeout] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNo... |
public static void eachByte(URL url, @ClosureParams(value = SimpleType.class, options = "byte") Closure closure) throws IOException {
InputStream is = url.openConnection().getInputStream();
IOGroovyMethods.eachByte(is, closure);
} | class class_name[name] begin[{]
method[eachByte, return_type[void], modifier[public static], parameter[url, closure]] begin[{]
local_variable[type[InputStream], is]
call[IOGroovyMethods.eachByte, parameter[member[.is], member[.closure]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[eachByte] operator[SEP] identifier[URL] identifier[url] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[SimpleType] operator[SEP] Keyword[class] , identifier[options] operator[=] literal[String] operator[SEP] ide... |
boolean isBuiltin(Class clazz) {
return clazz == null ? false
: builtin.contains(clazz.getName());
} | class class_name[name] begin[{]
method[isBuiltin, return_type[type[boolean]], modifier[default], parameter[clazz]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(po... | Keyword[boolean] identifier[isBuiltin] operator[SEP] identifier[Class] identifier[clazz] operator[SEP] {
Keyword[return] identifier[clazz] operator[==] Other[null] operator[?] literal[boolean] operator[:] identifier[builtin] operator[SEP] identifier[contains] operator[SEP] identifier[clazz] operator[SEP] identi... |
protected void failure(final Throwable thrwbl, final Job job, final String curQueue) {
try {
PoolUtils.doWorkInPool(this.jedisPool, new PoolWork<Jedis, Void>() {
/**
* {@inheritDoc}
*/
@Override
public Void doWork(fina... | class class_name[name] begin[{]
method[failure, return_type[void], modifier[protected], parameter[thrwbl, job, curQueue]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(me... | Keyword[protected] Keyword[void] identifier[failure] operator[SEP] Keyword[final] identifier[Throwable] identifier[thrwbl] , Keyword[final] identifier[Job] identifier[job] , Keyword[final] identifier[String] identifier[curQueue] operator[SEP] {
Keyword[try] {
identifier[PoolUtils] operator[SEP] iden... |
public static List<String> getQueries(Configuration conf) throws IOException {
return Preconditions.checkNotNull(HadoopUtils.readStringListFromConfAsBase64(QUERIES_KEY, conf),
"You must call LuceneIndexInputFormat.setQueries()");
} | class class_name[name] begin[{]
method[getQueries, return_type[type[List]], modifier[public static], parameter[conf]] begin[{]
return[call[Preconditions.checkNotNull, parameter[call[HadoopUtils.readStringListFromConfAsBase64, parameter[member[.QUERIES_KEY], member[.conf]]], literal["You must call Lucen... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[getQueries] operator[SEP] identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[Preconditions] operator[SEP] identifier[checkNotNull] oper... |
private static long delayStartingTask(JobConf conf) {
long delayMs =
conf.getLong(MAPREDUCE_TASK_DELAY_MS, MAPREDUCE_TASK_DELAY_MS_DEFAULT);
try {
Thread.sleep(delayMs);
} catch (InterruptedException e) {
LOG.info("delayStartingTask: Unexpected interruption of " +
delayMs + " m... | class class_name[name] begin[{]
method[delayStartingTask, return_type[type[long]], modifier[private static], parameter[conf]] begin[{]
local_variable[type[long], delayMs]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=delayMs, postfix_opera... | Keyword[private] Keyword[static] Keyword[long] identifier[delayStartingTask] operator[SEP] identifier[JobConf] identifier[conf] operator[SEP] {
Keyword[long] identifier[delayMs] operator[=] identifier[conf] operator[SEP] identifier[getLong] operator[SEP] identifier[MAPREDUCE_TASK_DELAY_MS] , identifier[MAPREDUC... |
public static IndriQueryerBuilder queryerForIndex(File indexDir) {
final IndriQueryerBuilder builder = new IndriQueryerBuilder();
builder.addIndex(indexDir);
return builder;
} | class class_name[name] begin[{]
method[queryerForIndex, return_type[type[IndriQueryerBuilder]], modifier[public static], parameter[indexDir]] begin[{]
local_variable[type[IndriQueryerBuilder], builder]
call[builder.addIndex, parameter[member[.indexDir]]]
return[member[.builder]]... | Keyword[public] Keyword[static] identifier[IndriQueryerBuilder] identifier[queryerForIndex] operator[SEP] identifier[File] identifier[indexDir] operator[SEP] {
Keyword[final] identifier[IndriQueryerBuilder] identifier[builder] operator[=] Keyword[new] identifier[IndriQueryerBuilder] operator[SEP] operator[SEP] o... |
public void triggerAsyncRefreshWithRandomDelay(int maxDelayMillis) {
Random rand = new Random();
int delayMillis = maxDelayMillis > 0 ? rand.nextInt(maxDelayMillis) : 0;
triggerAsyncRefreshWithDelay(delayMillis);
} | class class_name[name] begin[{]
method[triggerAsyncRefreshWithRandomDelay, return_type[void], modifier[public], parameter[maxDelayMillis]] begin[{]
local_variable[type[Random], rand]
local_variable[type[int], delayMillis]
call[.triggerAsyncRefreshWithDelay, parameter[member[.del... | Keyword[public] Keyword[void] identifier[triggerAsyncRefreshWithRandomDelay] operator[SEP] Keyword[int] identifier[maxDelayMillis] operator[SEP] {
identifier[Random] identifier[rand] operator[=] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[delayMillis] operato... |
public Class<?> getArrayOrCollectionComponentType() {
if (!isCollection() && !isArray()) {
throw new IllegalStateException();
}
if (isCollection()) {
Type type = field.getGenericType();
if (type instanceof ParameterizedType) {
return toClass((... | class class_name[name] begin[{]
method[getArrayOrCollectionComponentType, return_type[type[Class]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[.isCollection, parameter[]], &&, call[.isArray, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(argumen... | Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[getArrayOrCollectionComponentType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isCollection] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isArray] operator[SEP] operator[SEP] ope... |
@SafeVarargs
public static Map<String, Object> payloadFactory(Map.Entry<String, Object>... entries) {
Map<String, Object> map = new HashMap<>();
for (Map.Entry<String, Object> entry : entries)
map.put(entry.getKey(), entry.getValue());
return Collections.unmodifiableMap(map);
... | class class_name[name] begin[{]
method[payloadFactory, return_type[type[Map]], modifier[public static], parameter[entries]] begin[{]
local_variable[type[Map], map]
ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_... | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[payloadFactory] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] operator[...] i... |
@Override
public void removeByC_CSO(long CPDefinitionId, long CPSpecificationOptionId) {
for (CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue : findByC_CSO(
CPDefinitionId, CPSpecificationOptionId, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null)) {
remove(cpDefinitionSpecificationOpt... | class class_name[name] begin[{]
method[removeByC_CSO, return_type[void], modifier[public], parameter[CPDefinitionId, CPSpecificationOptionId]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cpDefinition... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByC_CSO] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[long] identifier[CPSpecificationOptionId] operator[SEP] {
Keyword[for] operator[SEP] identifier[CPDefinitionSpecificationOptionValue] identifier[cpDefinitio... |
public static FastMoney ofMinor(CurrencyUnit currency, long amountMinor) {
return ofMinor(currency, amountMinor, currency.getDefaultFractionDigits());
} | class class_name[name] begin[{]
method[ofMinor, return_type[type[FastMoney]], modifier[public static], parameter[currency, amountMinor]] begin[{]
return[call[.ofMinor, parameter[member[.currency], member[.amountMinor], call[currency.getDefaultFractionDigits, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[FastMoney] identifier[ofMinor] operator[SEP] identifier[CurrencyUnit] identifier[currency] , Keyword[long] identifier[amountMinor] operator[SEP] {
Keyword[return] identifier[ofMinor] operator[SEP] identifier[currency] , identifier[amountMinor] , identifier[currency] ... |
private void initExceptionsPanel() {
m_exceptionsPanel.setLegend(Messages.get().key(Messages.GUI_SERIALDATE_PANEL_EXCEPTIONS_0));
m_exceptionsPanel.addCloseHandler(this);
m_exceptionsPanel.setVisible(false);
} | class class_name[name] begin[{]
method[initExceptionsPanel, return_type[void], modifier[private], parameter[]] begin[{]
call[m_exceptionsPanel.setLegend, parameter[call[Messages.get, parameter[]]]]
call[m_exceptionsPanel.addCloseHandler, parameter[THIS[]]]
call[m... | Keyword[private] Keyword[void] identifier[initExceptionsPanel] operator[SEP] operator[SEP] {
identifier[m_exceptionsPanel] operator[SEP] identifier[setLegend] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messag... |
public Iterable<String> get(String index, String... keys) {
return get(index, Arrays.asList(keys));
} | class class_name[name] begin[{]
method[get, return_type[type[Iterable]], modifier[public], parameter[index, keys]] begin[{]
return[call[.get, parameter[member[.index], call[Arrays.asList, parameter[member[.keys]]]]]]
end[}]
END[}] | Keyword[public] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[get] operator[SEP] identifier[String] identifier[index] , identifier[String] operator[...] identifier[keys] operator[SEP] {
Keyword[return] identifier[get] operator[SEP] identifier[index] , identifier[Arrays] operator[SE... |
public void setTimestamps(java.util.Collection<java.util.Date> timestamps) {
if (timestamps == null) {
this.timestamps = null;
return;
}
this.timestamps = new com.amazonaws.internal.SdkInternalList<java.util.Date>(timestamps);
} | class class_name[name] begin[{]
method[setTimestamps, return_type[void], modifier[public], parameter[timestamps]] begin[{]
if[binary_operation[member[.timestamps], ==, literal[null]]] begin[{]
assign[THIS[member[None.timestamps]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setTimestamps] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] operator[>] identifier[timestamps] operator[SEP] {
Keyword[if] oper... |
public Iterator iterator() {
return new Iterator() {
private ObjectSinkNode currentNode = null;
private ObjectSinkNode nextNode = getFirst();
public boolean hasNext() {
return (this.nextNode != null);
}
public Object next() {
... | class class_name[name] begin[{]
method[iterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qu... | Keyword[public] identifier[Iterator] identifier[iterator] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Iterator] operator[SEP] operator[SEP] {
Keyword[private] identifier[ObjectSinkNode] identifier[currentNode] operator[=] Other[null] operator[SEP] Keyword[private] identifier[... |
public static <T> T nullIfEmpty(T value) throws IOException {
return isEmpty(value) ? null : value;
} | class class_name[name] begin[{]
method[nullIfEmpty, return_type[type[T]], modifier[public static], parameter[value]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpt... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[nullIfEmpty] operator[SEP] identifier[T] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[isEmpty] operator[SEP] identifier[value] operator[SEP] operator[?] Other[nul... |
@Override
public <E extends Exception> T getPluginFor(S delimiter, Supplier<E> ex) throws E {
Assert.notNull(delimiter, "Delimiter must not be null!");
Assert.notNull(ex, "Exception supplier must not be null!");
return getPluginFor(delimiter).orElseThrow(ex);
} | class class_name[name] begin[{]
method[getPluginFor, return_type[type[T]], modifier[public], parameter[delimiter, ex]] begin[{]
call[Assert.notNull, parameter[member[.delimiter], literal["Delimiter must not be null!"]]]
call[Assert.notNull, parameter[member[.ex], literal["Except... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[Exception] operator[>] identifier[T] identifier[getPluginFor] operator[SEP] identifier[S] identifier[delimiter] , identifier[Supplier] operator[<] identifier[E] operator[>] identifier[ex] operator[SEP] Keyword[thro... |
private static boolean getMultiDbParameter(WorkspaceEntry wsEntry) throws DBCleanException
{
try
{
return DBInitializerHelper.getDatabaseType(wsEntry).isMultiDatabase();
}
catch (RepositoryConfigurationException e)
{
throw new DBCleanException(e);
}
... | class class_name[name] begin[{]
method[getMultiDbParameter, return_type[type[boolean]], modifier[private static], parameter[wsEntry]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=wsEntry, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[private] Keyword[static] Keyword[boolean] identifier[getMultiDbParameter] operator[SEP] identifier[WorkspaceEntry] identifier[wsEntry] operator[SEP] Keyword[throws] identifier[DBCleanException] {
Keyword[try] {
Keyword[return] identifier[DBInitializerHelper] operator[SEP] identifier[getDatabas... |
public boolean containsOfType(final Class<? extends Tag> type) {
read.lock();
try {
return tags.containsKey(type);
} finally {
read.unlock();
}
} | class class_name[name] begin[{]
method[containsOfType, return_type[type[boolean]], modifier[public], parameter[type]] begin[{]
call[read.lock, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefi... | Keyword[public] Keyword[boolean] identifier[containsOfType] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Tag] operator[>] identifier[type] operator[SEP] {
identifier[read] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] ... |
public SortedSet<TypeElement> allUnnamedClasses() {
for (PackageElement pkg : allClasses.keySet()) {
if (pkg.isUnnamed()) {
return allClasses.get(pkg);
}
}
return new TreeSet<>(comparator);
} | class class_name[name] begin[{]
method[allUnnamedClasses, return_type[type[SortedSet]], modifier[public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isUnnamed, postfix_operators=[], prefix_operators=[], qual... | Keyword[public] identifier[SortedSet] operator[<] identifier[TypeElement] operator[>] identifier[allUnnamedClasses] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[PackageElement] identifier[pkg] operator[:] identifier[allClasses] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] ... |
@SuppressWarnings("deprecation")
@Override
public JobGraph getJobGraph(@Nullable JobID jobID) {
// temporarily forbid checkpointing for iterative jobs
if (isIterative() && checkpointConfig.isCheckpointingEnabled() && !checkpointConfig.isForceCheckpointing()) {
throw new UnsupportedOperationException(
"Chec... | class class_name[name] begin[{]
method[getJobGraph, return_type[type[JobGraph]], modifier[public], parameter[jobID]] begin[{]
if[binary_operation[binary_operation[call[.isIterative, parameter[]], &&, call[checkpointConfig.isCheckpointingEnabled, parameter[]]], &&, call[checkpointConfig.isForceC... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[JobGraph] identifier[getJobGraph] operator[SEP] annotation[@] identifier[Nullable] identifier[JobID] identifier[jobID] operator[SEP] {
Keyword[if] operator[SEP] ide... |
public InputStream openBufferedStream() throws IOException {
InputStream in = openStream();
return (in instanceof BufferedInputStream)
? (BufferedInputStream) in
: new BufferedInputStream(in);
} | class class_name[name] begin[{]
method[openBufferedStream, return_type[type[InputStream]], modifier[public], parameter[]] begin[{]
local_variable[type[InputStream], in]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=in, postfix_operators=[], prefix_operators=... | Keyword[public] identifier[InputStream] identifier[openBufferedStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InputStream] identifier[in] operator[=] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[in] Keyword[ins... |
public Observable<ServiceResponse<Void>> disableRecommendationForSubscriptionWithServiceResponseAsync(String name) {
if (name == null) {
throw new IllegalArgumentException("Parameter name is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
thr... | class class_name[name] begin[{]
method[disableRecommendationForSubscriptionWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[name]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] operator[>] identifier[disableRecommendationForSubscriptionWithServiceResponseAsync] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[name]... |
public String normalize(String biopaxOwlData) {
if(biopaxOwlData == null || biopaxOwlData.length() == 0)
throw new IllegalArgumentException("no data. " + description);
// quick-fix for older BioPAX L3 version (v0.9x) property 'taxonXref' (range: BioSource)
biopaxOwlData = biopaxOwlData.replaceAll("taxon... | class class_name[name] begin[{]
method[normalize, return_type[type[String]], modifier[public], parameter[biopaxOwlData]] begin[{]
if[binary_operation[binary_operation[member[.biopaxOwlData], ==, literal[null]], ||, binary_operation[call[biopaxOwlData.length, parameter[]], ==, literal[0]]]] begi... | Keyword[public] identifier[String] identifier[normalize] operator[SEP] identifier[String] identifier[biopaxOwlData] operator[SEP] {
Keyword[if] operator[SEP] identifier[biopaxOwlData] operator[==] Other[null] operator[||] identifier[biopaxOwlData] operator[SEP] identifier[length] operator[SEP] operator[SEP] oper... |
public static alluxio.grpc.LocalityTier toProto(TieredIdentity.LocalityTier localityTier) {
alluxio.grpc.LocalityTier.Builder tier =
alluxio.grpc.LocalityTier.newBuilder().setTierName(localityTier.getTierName());
if (localityTier.getValue() != null) {
tier.setValue(localityTier.getValue());
}
... | class class_name[name] begin[{]
method[toProto, return_type[type[alluxio]], modifier[public static], parameter[localityTier]] begin[{]
local_variable[type[alluxio], tier]
if[binary_operation[call[localityTier.getValue, parameter[]], !=, literal[null]]] begin[{]
c... | Keyword[public] Keyword[static] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[LocalityTier] identifier[toProto] operator[SEP] identifier[TieredIdentity] operator[SEP] identifier[LocalityTier] identifier[localityTier] operator[SEP] {
identifier[alluxio] operator[SEP] identifier[grpc]... |
private void writeHeader(int fileLength, int elementCount, int firstPosition, int lastPosition)
throws IOException {
writeInt(buffer, 0, fileLength);
writeInt(buffer, 4, elementCount);
writeInt(buffer, 8, firstPosition);
writeInt(buffer, 12, lastPosition);
raf.seek(0);
raf.write(buffer);
... | class class_name[name] begin[{]
method[writeHeader, return_type[void], modifier[private], parameter[fileLength, elementCount, firstPosition, lastPosition]] begin[{]
call[.writeInt, parameter[member[.buffer], literal[0], member[.fileLength]]]
call[.writeInt, parameter[member[.buf... | Keyword[private] Keyword[void] identifier[writeHeader] operator[SEP] Keyword[int] identifier[fileLength] , Keyword[int] identifier[elementCount] , Keyword[int] identifier[firstPosition] , Keyword[int] identifier[lastPosition] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writeInt] operato... |
public String toXML()
{
RepositoryTags tags = RepositoryTags.getInstance();
String eol = SystemUtils.LINE_SEPARATOR;
//opening tag + attributes
StringBuffer result = new StringBuffer( 1024 );
result.append( " " );
result.append( tags.getOpeningTagNonClos... | class class_name[name] begin[{]
method[toXML, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[RepositoryTags], tags]
local_variable[type[String], eol]
local_variable[type[StringBuffer], result]
call[result.append, parameter[literal[... | Keyword[public] identifier[String] identifier[toXML] operator[SEP] operator[SEP] {
identifier[RepositoryTags] identifier[tags] operator[=] identifier[RepositoryTags] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[eol] operator[=] identifier[SystemUti... |
public void setSFExtHi(Integer newSFExtHi) {
Integer oldSFExtHi = sfExtHi;
sfExtHi = newSFExtHi;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.OBJECT_STRUCTURED_FIELD_EXTENT__SF_EXT_HI, oldSFExtHi, sfExtHi));
} | class class_name[name] begin[{]
method[setSFExtHi, return_type[void], modifier[public], parameter[newSFExtHi]] begin[{]
local_variable[type[Integer], oldSFExtHi]
assign[member[.sfExtHi], member[.newSFExtHi]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setSFExtHi] operator[SEP] identifier[Integer] identifier[newSFExtHi] operator[SEP] {
identifier[Integer] identifier[oldSFExtHi] operator[=] identifier[sfExtHi] operator[SEP] identifier[sfExtHi] operator[=] identifier[newSFExtHi] operator[SEP] Keyword[if] operator[SEP] ide... |
@JsonIgnore
public String getSigningCertificateDecoded() {
if (EncodingUtils.isBase64(signingCertificate)) {
return EncodingUtils.decodeBase64ToString(signingCertificate);
}
return signingCertificate;
} | class class_name[name] begin[{]
method[getSigningCertificateDecoded, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[call[EncodingUtils.isBase64, parameter[member[.signingCertificate]]]] begin[{]
return[call[EncodingUtils.decodeBase64ToString, parameter[member[... | annotation[@] identifier[JsonIgnore] Keyword[public] identifier[String] identifier[getSigningCertificateDecoded] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[EncodingUtils] operator[SEP] identifier[isBase64] operator[SEP] identifier[signingCertificate] operator[SEP] operator[SEP] {
... |
public static boolean unzip(String zipFilePath, String folderPath, String... pwd) {
ZipFile zipFile;
try {
//创建压缩对象
zipFile = new ZipFile(new File(zipFilePath));
if (!zipFile.isValidZipFile()) {
//压缩文件校验可用性失败
new ZipException("Invali... | class class_name[name] begin[{]
method[unzip, return_type[type[boolean]], modifier[public static], parameter[zipFilePath, folderPath, pwd]] begin[{]
local_variable[type[ZipFile], zipFile]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=zipFile, p... | Keyword[public] Keyword[static] Keyword[boolean] identifier[unzip] operator[SEP] identifier[String] identifier[zipFilePath] , identifier[String] identifier[folderPath] , identifier[String] operator[...] identifier[pwd] operator[SEP] {
identifier[ZipFile] identifier[zipFile] operator[SEP] Keyword[try] {
... |
@Override
public NamingEnumeration<SearchResult> search(Name name, String filterExpr,
Object[] filterArgs, SearchControls cons) throws NamingException {
throw new UnsupportedOperationException(NOT_IMPLEMENTED);
} | class class_name[name] begin[{]
method[search, return_type[type[NamingEnumeration]], modifier[public], parameter[name, filterExpr, filterArgs, cons]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_IMPLEMENTED, postfix_operators=[], prefix_operators=[], qualifier=,... | annotation[@] identifier[Override] Keyword[public] identifier[NamingEnumeration] operator[<] identifier[SearchResult] operator[>] identifier[search] operator[SEP] identifier[Name] identifier[name] , identifier[String] identifier[filterExpr] , identifier[Object] operator[SEP] operator[SEP] identifier[filterArgs] , id... |
public NodeType getNodeType(final String nodeTypeName) throws NoSuchNodeTypeException, RepositoryException
{
NodeTypeData ntdata = typesManager.getNodeType(locationFactory.parseJCRName(nodeTypeName).getInternalName());
if (ntdata != null)
{
return new NodeTypeImpl(ntdata, typesManager, thi... | class class_name[name] begin[{]
method[getNodeType, return_type[type[NodeType]], modifier[public], parameter[nodeTypeName]] begin[{]
local_variable[type[NodeTypeData], ntdata]
if[binary_operation[member[.ntdata], !=, literal[null]]] begin[{]
return[ClassCreator(arguments=[Me... | Keyword[public] identifier[NodeType] identifier[getNodeType] operator[SEP] Keyword[final] identifier[String] identifier[nodeTypeName] operator[SEP] Keyword[throws] identifier[NoSuchNodeTypeException] , identifier[RepositoryException] {
identifier[NodeTypeData] identifier[ntdata] operator[=] identifier[typesMana... |
private String removeTrailingSlash(String originalPath) {
String trailingSlash = "/";
String requestPath = originalPath;
if (requestPath != null && !requestPath.isEmpty() && !requestPath.equals(trailingSlash)) {
requestPath = requestPath.endsWith(trailingSlash) ? requestPath.substrin... | class class_name[name] begin[{]
method[removeTrailingSlash, return_type[type[String]], modifier[private], parameter[originalPath]] begin[{]
local_variable[type[String], trailingSlash]
local_variable[type[String], requestPath]
if[binary_operation[binary_operation[binary_operation... | Keyword[private] identifier[String] identifier[removeTrailingSlash] operator[SEP] identifier[String] identifier[originalPath] operator[SEP] {
identifier[String] identifier[trailingSlash] operator[=] literal[String] operator[SEP] identifier[String] identifier[requestPath] operator[=] identifier[originalPath] oper... |
public static <U> Stream<U> reverse(final Stream<U> stream) {
return ReactiveSeq.of(1).flatMap(i->reversedStream(stream.collect(java.util.stream.Collectors.toList())));
} | class class_name[name] begin[{]
method[reverse, return_type[type[Stream]], modifier[public static], parameter[stream]] begin[{]
return[call[ReactiveSeq.of, parameter[literal[1]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[U] operator[>] identifier[Stream] operator[<] identifier[U] operator[>] identifier[reverse] operator[SEP] Keyword[final] identifier[Stream] operator[<] identifier[U] operator[>] identifier[stream] operator[SEP] {
Keyword[return] identifier[ReactiveSeq] opera... |
public Observable<ServiceResponse<List<ImagePerformance>>> getImagePerformancesWithServiceResponseAsync(UUID projectId, UUID iterationId, GetImagePerformancesOptionalParameter getImagePerformancesOptionalParameter) {
if (projectId == null) {
throw new IllegalArgumentException("Parameter projectId is... | class class_name[name] begin[{]
method[getImagePerformancesWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[projectId, iterationId, getImagePerformancesOptionalParameter]] begin[{]
if[binary_operation[member[.projectId], ==, literal[null]]] begin[{]
... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[ImagePerformance] operator[>] operator[>] operator[>] identifier[getImagePerformancesWithServiceResponseAsync] operator[SEP] identifier[UUID] identifier[projectId] , identifier[UUID] ident... |
public JavaType constructJavaTypeFromCanonicalString(String canonicalString) {
try {
return TypeFactory.defaultInstance().constructFromCanonical(canonicalString);
} catch (IllegalArgumentException e) {
throw LOG.unableToConstructJavaType(canonicalString, e);
}
} | class class_name[name] begin[{]
method[constructJavaTypeFromCanonicalString, return_type[type[JavaType]], modifier[public], parameter[canonicalString]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=defaultInstance, postfix_operators=[], prefix_operators=[... | Keyword[public] identifier[JavaType] identifier[constructJavaTypeFromCanonicalString] operator[SEP] identifier[String] identifier[canonicalString] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[TypeFactory] operator[SEP] identifier[defaultInstance] operator[SEP] operator[SEP] operator[SEP] ... |
protected static String getPartialEndedWord(String str, int pos){
assert(pos < str.length() && pos >= 0);
if( posIsAtWord(str, pos) ){
int prevSpace = findLastNonLetterOrDigit(str, pos);
return str.substring(prevSpace+1, pos+1);
}
return null;
} | class class_name[name] begin[{]
method[getPartialEndedWord, return_type[type[String]], modifier[static protected], parameter[str, pos]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[protected] Keyword[static] identifier[String] identifier[getPartialEndedWord] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[pos] operator[SEP] {
Keyword[assert] operator[SEP] identifier[pos] operator[<] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[... |
private String createActionKey(Class<? extends Controller> controllerClass,
Method method, String controllerKey) {
String methodName = method.getName();
String actionKey;
ActionKey ak = method.getAnnotation(ActionKey.class);
if (ak != null) {
... | class class_name[name] begin[{]
method[createActionKey, return_type[type[String]], modifier[private], parameter[controllerClass, method, controllerKey]] begin[{]
local_variable[type[String], methodName]
local_variable[type[String], actionKey]
local_variable[type[ActionKey], ak]
... | Keyword[private] identifier[String] identifier[createActionKey] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Controller] operator[>] identifier[controllerClass] , identifier[Method] identifier[method] , identifier[String] identifier[controllerKey] operator[SEP] {
identifi... |
public static String getFullUrl(HttpServletRequest request, String relativeUrl) {
StringBuilder baseUrl = getBaseRequestUrl(request, false);
String contextPath = request.getContextPath();
String servletPath = request.getServletPath();
if (contextPath.equals("/")) {
contextPa... | class class_name[name] begin[{]
method[getFullUrl, return_type[type[String]], modifier[public static], parameter[request, relativeUrl]] begin[{]
local_variable[type[StringBuilder], baseUrl]
local_variable[type[String], contextPath]
local_variable[type[String], servletPath]
... | Keyword[public] Keyword[static] identifier[String] identifier[getFullUrl] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[relativeUrl] operator[SEP] {
identifier[StringBuilder] identifier[baseUrl] operator[=] identifier[getBaseRequestUrl] operator[SEP] identifier... |
public RoamController mapTypeControl(String key, Boolean value) {
if (this.mapTypeControl == null) {
this.mapTypeControl = new HashMap<String, Boolean>();
}
this.mapTypeControl.put(key, value);
return this;
} | class class_name[name] begin[{]
method[mapTypeControl, return_type[type[RoamController]], modifier[public], parameter[key, value]] begin[{]
if[binary_operation[THIS[member[None.mapTypeControl]], ==, literal[null]]] begin[{]
assign[THIS[member[None.mapTypeControl]], Class... | Keyword[public] identifier[RoamController] identifier[mapTypeControl] operator[SEP] identifier[String] identifier[key] , identifier[Boolean] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[mapTypeControl] operator[==] Other[null] operator[SEP] {
Keyw... |
public void setOnselect(java.lang.String onselect) {
getStateHelper().put(PropertyKeys.onselect, onselect);
handleAttribute("onselect", onselect);
} | class class_name[name] begin[{]
method[setOnselect, return_type[void], modifier[public], parameter[onselect]] begin[{]
call[.getStateHelper, parameter[]]
call[.handleAttribute, parameter[literal["onselect"], member[.onselect]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setOnselect] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[onselect] operator[SEP] {
identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PropertyKeys] ope... |
@Override
public int getHeight() {
View view = viewRef.get();
if (view != null) {
final ViewGroup.LayoutParams params = view.getLayoutParams();
int height = 0;
if (checkActualViewSize && params != null && params.height != ViewGroup.LayoutParams.WRAP_CONTENT) {
height = view.getHeight(); // Get actual ... | class class_name[name] begin[{]
method[getHeight, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[View], view]
if[binary_operation[member[.view], !=, literal[null]]] begin[{]
local_variable[type[ViewGroup], params]
local_variab... | annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[getHeight] operator[SEP] operator[SEP] {
identifier[View] identifier[view] operator[=] identifier[viewRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[view] operator[!=] Oth... |
protected Object loadListener(String lClassName) throws InjectionException, Throwable //596191 :: PK97815
{
Object listener = null;
try {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
logger.logp(Level.FINE, CLASS_NAME, "loadL... | class class_name[name] begin[{]
method[loadListener, return_type[type[Object]], modifier[protected], parameter[lClassName]] begin[{]
local_variable[type[Object], listener]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnable... | Keyword[protected] identifier[Object] identifier[loadListener] operator[SEP] identifier[String] identifier[lClassName] operator[SEP] Keyword[throws] identifier[InjectionException] , identifier[Throwable] {
identifier[Object] identifier[listener] operator[=] Other[null] operator[SEP] Keyword[try] {
Ke... |
@Override
public MapColor getMapColor(Block block, IBlockState state, IBlockAccess world, BlockPos pos)
{
return MapColor.getBlockColor(state.getValue(getProperty()));
} | class class_name[name] begin[{]
method[getMapColor, return_type[type[MapColor]], modifier[public], parameter[block, state, world, pos]] begin[{]
return[call[MapColor.getBlockColor, parameter[call[state.getValue, parameter[call[.getProperty, parameter[]]]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[MapColor] identifier[getMapColor] operator[SEP] identifier[Block] identifier[block] , identifier[IBlockState] identifier[state] , identifier[IBlockAccess] identifier[world] , identifier[BlockPos] identifier[pos] operator[SEP] {
Keyword[return] iden... |
@SuppressWarnings("unchecked")
@Override
protected StartElement createStartElement(QName name, Iterator<?> attr,
Iterator<?> ns, NamespaceContext ctxt)
{
return SimpleStartElement.construct(mLocation, name,
(Iterator<Attribute>) attr,
(Iterator<Namespace>)... | class class_name[name] begin[{]
method[createStartElement, return_type[type[StartElement]], modifier[protected], parameter[name, attr, ns, ctxt]] begin[{]
return[call[SimpleStartElement.construct, parameter[member[.mLocation], member[.name], Cast(expression=MemberReference(member=attr, postfix_operator... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[protected] identifier[StartElement] identifier[createStartElement] operator[SEP] identifier[QName] identifier[name] , identifier[Iterator] operator[<] operator[?] operator[>] identifier[att... |
private void checkMergeBtnEnabledState() {
FeaturesSupported layer = (FeaturesSupported) mapPresenter.getLayersModel().getLayer(1);
mergeBtn.setEnabled(layer.getSelectedFeatures() != null && layer.getSelectedFeatures().size() > 1);
} | class class_name[name] begin[{]
method[checkMergeBtnEnabledState, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[FeaturesSupported], layer]
call[mergeBtn.setEnabled, parameter[binary_operation[binary_operation[call[layer.getSelectedFeatures, parameter[]]... | Keyword[private] Keyword[void] identifier[checkMergeBtnEnabledState] operator[SEP] operator[SEP] {
identifier[FeaturesSupported] identifier[layer] operator[=] operator[SEP] identifier[FeaturesSupported] operator[SEP] identifier[mapPresenter] operator[SEP] identifier[getLayersModel] operator[SEP] operator[SEP] op... |
public ServiceFuture<Void> moveAsync(String resourceGroupName, String workflowName, WorkflowInner move, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(moveWithServiceResponseAsync(resourceGroupName, workflowName, move), serviceCallback);
} | class class_name[name] begin[{]
method[moveAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, workflowName, move, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.moveWithServiceResponseAsync, parameter[member[.resourceGroupName], m... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[moveAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workflowName] , identifier[WorkflowInner] identifier[move] , Keyword[final] identifier[ServiceCallback] operator[<] i... |
public static PlanVersionBean unmarshallPlanVersion(Map<String, Object> source) {
if (source == null) {
return null;
}
PlanVersionBean bean = new PlanVersionBean();
bean.setVersion(asString(source.get("version")));
bean.setStatus(asEnum(source.get("status"), PlanStatu... | class class_name[name] begin[{]
method[unmarshallPlanVersion, return_type[type[PlanVersionBean]], modifier[public static], parameter[source]] begin[{]
if[binary_operation[member[.source], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[PlanVersionBean] identifier[unmarshallPlanVersion] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[source] operator[SEP] {
Keyword[if] operator[SEP] identifier[source] operator[==] Other[null] operator[SEP] {
... |
@Nonnull
public <V1 extends T1, V2 extends T2, V3 extends T3> LTriConsumerBuilder<T1, T2, T3> aCase(Class<V1> argC1, Class<V2> argC2, Class<V3> argC3, LTriConsumer<V1, V2, V3> function) {
PartialCase.The pc = partialCaseFactoryMethod((a1, a2, a3) -> (argC1 == null || argC1.isInstance(a1)) && (argC2 == null || argC2.... | class class_name[name] begin[{]
method[aCase, return_type[type[LTriConsumerBuilder]], modifier[public], parameter[argC1, argC2, argC3, function]] begin[{]
local_variable[type[PartialCase], pc]
call[pc.evaluate, parameter[member[.function]]]
return[call[.self, parameter[]]]
e... | annotation[@] identifier[Nonnull] Keyword[public] operator[<] identifier[V1] Keyword[extends] identifier[T1] , identifier[V2] Keyword[extends] identifier[T2] , identifier[V3] Keyword[extends] identifier[T3] operator[>] identifier[LTriConsumerBuilder] operator[<] identifier[T1] , identifier[T2] , identifier[T3] oper... |
public String getAuthority(HttpUrl url) {
String scheme = url.scheme();
String host = url.host();
int port = url.port();
StringBuilder builder = new StringBuilder();
if (scheme != null) {
builder.append(scheme).append("://");
}
builder.append(host);
... | class class_name[name] begin[{]
method[getAuthority, return_type[type[String]], modifier[public], parameter[url]] begin[{]
local_variable[type[String], scheme]
local_variable[type[String], host]
local_variable[type[int], port]
local_variable[type[StringBuilder], builder]
... | Keyword[public] identifier[String] identifier[getAuthority] operator[SEP] identifier[HttpUrl] identifier[url] operator[SEP] {
identifier[String] identifier[scheme] operator[=] identifier[url] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[host] operator[=... |
public void mayActivateSnapshotDaemon() {
SnapshotSchedule schedule = m_catalogContext.get().database.getSnapshotschedule().get("default");
if (schedule != null)
{
final ListenableFuture<Void> future = m_snapshotDaemon.mayGoActiveOrInactive(schedule);
future.addListener(n... | class class_name[name] begin[{]
method[mayActivateSnapshotDaemon, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[SnapshotSchedule], schedule]
if[binary_operation[member[.schedule], !=, literal[null]]] begin[{]
local_variable[type[ListenableFut... | Keyword[public] Keyword[void] identifier[mayActivateSnapshotDaemon] operator[SEP] operator[SEP] {
identifier[SnapshotSchedule] identifier[schedule] operator[=] identifier[m_catalogContext] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[database] operator[SEP] identifier[getSna... |
private static void processNetwork(ShowInfo showInfo, Element eShowInfo) {
NodeList nlNetwork = eShowInfo.getElementsByTagName("network");
for (int nodeLoop = 0; nodeLoop < nlNetwork.getLength(); nodeLoop++) {
Node nShowInfo = nlNetwork.item(nodeLoop);
if (nShowInfo.getNodeType()... | class class_name[name] begin[{]
method[processNetwork, return_type[void], modifier[private static], parameter[showInfo, eShowInfo]] begin[{]
local_variable[type[NodeList], nlNetwork]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[V... | Keyword[private] Keyword[static] Keyword[void] identifier[processNetwork] operator[SEP] identifier[ShowInfo] identifier[showInfo] , identifier[Element] identifier[eShowInfo] operator[SEP] {
identifier[NodeList] identifier[nlNetwork] operator[=] identifier[eShowInfo] operator[SEP] identifier[getElementsByTagName... |
public @Nonnull Optional<ResourceLoader> getSupportingLoader(@Nonnull String prefix) {
ArgumentUtils.requireNonNull("prefix", prefix);
return resourceLoaders.stream()
.filter(rl -> rl.supportsPrefix(prefix))
.findFirst();
} | class class_name[name] begin[{]
method[getSupportingLoader, return_type[type[Optional]], modifier[public], parameter[prefix]] begin[{]
call[ArgumentUtils.requireNonNull, parameter[literal["prefix"], member[.prefix]]]
return[call[resourceLoaders.stream, parameter[]]]
end[}]
END[}] | Keyword[public] annotation[@] identifier[Nonnull] identifier[Optional] operator[<] identifier[ResourceLoader] operator[>] identifier[getSupportingLoader] operator[SEP] annotation[@] identifier[Nonnull] identifier[String] identifier[prefix] operator[SEP] {
identifier[ArgumentUtils] operator[SEP] identifier[requir... |
public void println(float f) throws IOException
{
String value = Float.toString(f);
this.output.write(value.getBytes(), 0, value.length());
this.output.write(CRLF, 0, 2);
} | class class_name[name] begin[{]
method[println, return_type[void], modifier[public], parameter[f]] begin[{]
local_variable[type[String], value]
THIS[member[None.output]call[None.write, parameter[call[value.getBytes, parameter[]], literal[0], call[value.length, parameter[]]]]]
... | Keyword[public] Keyword[void] identifier[println] operator[SEP] Keyword[float] identifier[f] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[value] operator[=] identifier[Float] operator[SEP] identifier[toString] operator[SEP] identifier[f] operator[SEP] operator[SEP] Keywor... |
public int readTag() throws IOException {
byte b = (byte) this.read();
this.tagClass = (b & Tag.CLASS_MASK) >> 6;
this.pCBit = (b & Tag.PC_MASK) >> 5;
this.tag = b & Tag.TAG_MASK;
// For larger tag values, the first octet has all ones in bits 5 to 1,
// and the tag value is then encoded in
//... | class class_name[name] begin[{]
method[readTag, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[byte], b]
assign[THIS[member[None.tagClass]], binary_operation[binary_operation[member[.b], &, member[Tag.CLASS_MASK]], >>, literal[6]]]
as... | Keyword[public] Keyword[int] identifier[readTag] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] identifier[b] operator[=] operator[SEP] Keyword[byte] operator[SEP] Keyword[this] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SE... |
public String getProteinSequenceString() {
if (sequence != null)
return sequence.toString();
StringBuilder builder = new StringBuilder();
for (Atom a : reprAtoms)
// This method preferred over getChemComp.getOneLetterCode because
// it returns always X for Unknown residues
builder.append(StructureTo... | class class_name[name] begin[{]
method[getProteinSequenceString, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.sequence], !=, literal[null]]] begin[{]
return[call[sequence.toString, parameter[]]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[String] identifier[getProteinSequenceString] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[sequence] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[sequence] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[... |
private static void flipAround(SceneStructureMetric structure, SceneObservations observations) {
// The first view will be identity
for (int i = 1; i < structure.views.length; i++) {
Se3_F64 w2v = structure.views[i].worldToView;
w2v.set(w2v.invert(null));
}
triangulatePoints(structure,observations);
} | class class_name[name] begin[{]
method[flipAround, return_type[void], modifier[private static], parameter[structure, observations]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Membe... | Keyword[private] Keyword[static] Keyword[void] identifier[flipAround] operator[SEP] identifier[SceneStructureMetric] identifier[structure] , identifier[SceneObservations] identifier[observations] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[... |
public Object execute(final Map<Object, Object> iArgs) {
if (attribute == null)
throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
final OCluster cluster = getCluster();
if (cluster == null)
throw new OCommandExecutionException("Cluste... | class class_name[name] begin[{]
method[execute, return_type[type[Object]], modifier[public], parameter[iArgs]] begin[{]
if[binary_operation[member[.attribute], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], quali... | Keyword[public] identifier[Object] identifier[execute] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[iArgs] operator[SEP] {
Keyword[if] operator[SEP] identifier[attribute] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new]... |
public Entry insertAfter(Entry newEntry, Entry insertAfter)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "insertAfter", new Object[] { newEntry, insertAfter });
Entry insertedEntry = null;
//check that the params are not null, if either is, there is nothing to do.
if(newEntry != null &&
... | class class_name[name] begin[{]
method[insertAfter, return_type[type[Entry]], modifier[public], parameter[newEntry, insertAfter]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["insertAfter"], ArrayCreator(dimensions=[None... | Keyword[public] identifier[Entry] identifier[insertAfter] operator[SEP] identifier[Entry] identifier[newEntry] , identifier[Entry] identifier[insertAfter] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr]... |
public static boolean allJSONArrays(JSONArray array) throws JSONException {
for (int i = 0; i < array.length(); ++i) {
if (!(array.get(i) instanceof JSONArray)) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[allJSONArrays, return_type[type[boolean]], modifier[public static], parameter[array]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_ope... | Keyword[public] Keyword[static] Keyword[boolean] identifier[allJSONArrays] operator[SEP] identifier[JSONArray] identifier[array] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[... |
public void logAttributeWarning(PathAddress address, Set<String> attributes) {
logAttributeWarning(address, null, null, attributes);
} | class class_name[name] begin[{]
method[logAttributeWarning, return_type[void], modifier[public], parameter[address, attributes]] begin[{]
call[.logAttributeWarning, parameter[member[.address], literal[null], literal[null], member[.attributes]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[logAttributeWarning] operator[SEP] identifier[PathAddress] identifier[address] , identifier[Set] operator[<] identifier[String] operator[>] identifier[attributes] operator[SEP] {
identifier[logAttributeWarning] operator[SEP] identifier[address] , Other[null] , Other[nu... |
public void assertDoesNotContain(Description description, List<?> actual, Object value, Index index) {
assertNotNull(description, actual);
if (actual.isEmpty() || index.value >= actual.size()) {
return;
}
Object actualElement = actual.get(index.value);
if (areEqual(actualElement, value)) {
... | class class_name[name] begin[{]
method[assertDoesNotContain, return_type[void], modifier[public], parameter[description, actual, value, index]] begin[{]
call[.assertNotNull, parameter[member[.description], member[.actual]]]
if[binary_operation[call[actual.isEmpty, parameter[]], ... | Keyword[public] Keyword[void] identifier[assertDoesNotContain] operator[SEP] identifier[Description] identifier[description] , identifier[List] operator[<] operator[?] operator[>] identifier[actual] , identifier[Object] identifier[value] , identifier[Index] identifier[index] operator[SEP] {
identifier[assertN... |
public void process(List<T> objects, boolean sync) {
for (T message : objects) {
// If this batcher has been shutdown, do not accept any more
// messages
if (isShutDown) {
return;
}
if (sync) {
processSync(message);
... | class class_name[name] begin[{]
method[process, return_type[void], modifier[public], parameter[objects, sync]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isShutDown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]),... | Keyword[public] Keyword[void] identifier[process] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[objects] , Keyword[boolean] identifier[sync] operator[SEP] {
Keyword[for] operator[SEP] identifier[T] identifier[message] operator[:] identifier[objects] operator[SEP] {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.