code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String getFullClassName(String packageName, String className) {
return ClassServiceUtility.getFullClassName(null, packageName, className);
} | class class_name[name] begin[{]
method[getFullClassName, return_type[type[String]], modifier[public static], parameter[packageName, className]] begin[{]
return[call[ClassServiceUtility.getFullClassName, parameter[literal[null], member[.packageName], member[.className]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getFullClassName] operator[SEP] identifier[String] identifier[packageName] , identifier[String] identifier[className] operator[SEP] {
Keyword[return] identifier[ClassServiceUtility] operator[SEP] identifier[getFullClassName] operator[SEP] Other[null]... |
public Response deleteDeptUser(String corpNum) throws PopbillException{
if (corpNum == null || corpNum.isEmpty())
throw new PopbillException(-99999999, "μ°λνμ μ¬μ
μλ²νΈ(corpNum)κ° μ
λ ₯λμ§ μμμ΅λλ€.");
return httppost("/HomeTax/Taxinvoice/DeptUser", corpNum, null, null, "DELETE", Response.class);
} | class class_name[name] begin[{]
method[deleteDeptUser, return_type[type[Response]], modifier[public], parameter[corpNum]] begin[{]
if[binary_operation[binary_operation[member[.corpNum], ==, literal[null]], ||, call[corpNum.isEmpty, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(... | Keyword[public] identifier[Response] identifier[deleteDeptUser] operator[SEP] identifier[String] identifier[corpNum] operator[SEP] Keyword[throws] identifier[PopbillException] {
Keyword[if] operator[SEP] identifier[corpNum] operator[==] Other[null] operator[||] identifier[corpNum] operator[SEP] identifier[isEmpt... |
@DoesServiceRequest
public ResultSegment<CloudFileShare> listSharesSegmented(final String prefix,
final EnumSet<ShareListingDetails> detailsIncluded, final Integer maxResults,
final ResultContinuation continuationToken, final FileRequestOptions options,
final OperationContext opC... | class class_name[name] begin[{]
method[listSharesSegmented, return_type[type[ResultSegment]], modifier[public], parameter[prefix, detailsIncluded, maxResults, continuationToken, options, opContext]] begin[{]
return[THIS[call[None.listSharesWithPrefixSegmented, parameter[member[.prefix], member[.details... | annotation[@] identifier[DoesServiceRequest] Keyword[public] identifier[ResultSegment] operator[<] identifier[CloudFileShare] operator[>] identifier[listSharesSegmented] operator[SEP] Keyword[final] identifier[String] identifier[prefix] , Keyword[final] identifier[EnumSet] operator[<] identifier[ShareListingDetails] o... |
public void executeChildTemplates(
ElemTemplateElement elem, org.w3c.dom.Node context, QName mode, ContentHandler handler)
throws TransformerException
{
XPathContext xctxt = m_xcontext;
try
{
if(null != mode)
pushMode(mode);
xctxt.pushCurrentNode(xctxt.getDTMHan... | class class_name[name] begin[{]
method[executeChildTemplates, return_type[void], modifier[public], parameter[elem, context, mode, handler]] begin[{]
local_variable[type[XPathContext], xctxt]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_... | Keyword[public] Keyword[void] identifier[executeChildTemplates] operator[SEP] identifier[ElemTemplateElement] identifier[elem] , identifier[org] operator[SEP] identifier[w3c] operator[SEP] identifier[dom] operator[SEP] identifier[Node] identifier[context] , identifier[QName] identifier[mode] , identifier[ContentHand... |
public void marshall(ObjectAttributeAction objectAttributeAction, ProtocolMarshaller protocolMarshaller) {
if (objectAttributeAction == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(objectAttributeA... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[objectAttributeAction, protocolMarshaller]] begin[{]
if[binary_operation[member[.objectAttributeAction], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Lit... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ObjectAttributeAction] identifier[objectAttributeAction] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[objectAttributeAction] operator[==] Other[null] operator[SEP] ... |
public static LocationPair getBlockLocation(Codec codec, FileSystem srcFs,
Path srcFile, int blockIdxInFile, Configuration conf,
List<FileStatus> lfs) throws IOException {
int stripeIdx = 0;
int blockIdxInStripe = 0;
int blockIdx = blockIdxInFile;
if (codec.isDirRaid) {
Path parentP... | class class_name[name] begin[{]
method[getBlockLocation, return_type[type[LocationPair]], modifier[public static], parameter[codec, srcFs, srcFile, blockIdxInFile, conf, lfs]] begin[{]
local_variable[type[int], stripeIdx]
local_variable[type[int], blockIdxInStripe]
local_variable[type[i... | Keyword[public] Keyword[static] identifier[LocationPair] identifier[getBlockLocation] operator[SEP] identifier[Codec] identifier[codec] , identifier[FileSystem] identifier[srcFs] , identifier[Path] identifier[srcFile] , Keyword[int] identifier[blockIdxInFile] , identifier[Configuration] identifier[conf] , identifi... |
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeInt(iItemStateId);
out.writeInt(iValueDataId);
} | class class_name[name] begin[{]
method[writeExternal, return_type[void], modifier[public], parameter[out]] begin[{]
call[out.writeInt, parameter[member[.iItemStateId]]]
call[out.writeInt, parameter[member[.iValueDataId]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[writeExternal] operator[SEP] identifier[ObjectOutput] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[iItemStateId] operator[SEP] operator[SEP] identifier[out] operator[SEP... |
public EncryptionKey generateAndSaveKeyProtectedByPassword(String password) {
EncryptionKey dpk = null;
if (password == null || password.equals("")) {
throw new IllegalArgumentException("password is required to be a non-null/non-empty " +
"string");
}
try ... | class class_name[name] begin[{]
method[generateAndSaveKeyProtectedByPassword, return_type[type[EncryptionKey]], modifier[public], parameter[password]] begin[{]
local_variable[type[EncryptionKey], dpk]
if[binary_operation[binary_operation[member[.password], ==, literal[null]], ||, call[p... | Keyword[public] identifier[EncryptionKey] identifier[generateAndSaveKeyProtectedByPassword] operator[SEP] identifier[String] identifier[password] operator[SEP] {
identifier[EncryptionKey] identifier[dpk] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[password] operator[==] Other[null]... |
public static HttpResponseStatus parseLine(String line) {
try {
int space = line.indexOf(' ');
return space == -1 ? valueOf(parseInt(line)) :
valueOf(parseInt(line.substring(0, space)), line.substring(space + 1));
} catch (Exception e) {
throw new ... | class class_name[name] begin[{]
method[parseLine, return_type[type[HttpResponseStatus]], modifier[public static], parameter[line]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix... | Keyword[public] Keyword[static] identifier[HttpResponseStatus] identifier[parseLine] operator[SEP] identifier[String] identifier[line] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[space] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP... |
public Attribute addGroupAttribute(Group g, Attribute att) {
if (!defineMode) throw new UnsupportedOperationException("not in define mode");
if (!isValidObjectName(att.getShortName())) {
String attName = createValidObjectName(att.getShortName());
log.warn("illegal attribute name= " + att.getSh... | class class_name[name] begin[{]
method[addGroupAttribute, return_type[type[Attribute]], modifier[public], parameter[g, att]] begin[{]
if[member[.defineMode]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[... | Keyword[public] identifier[Attribute] identifier[addGroupAttribute] operator[SEP] identifier[Group] identifier[g] , identifier[Attribute] identifier[att] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[defineMode] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationExceptio... |
public void marshall(UpdateFleetCapacityRequest updateFleetCapacityRequest, ProtocolMarshaller protocolMarshaller) {
if (updateFleetCapacityRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(u... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[updateFleetCapacityRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.updateFleetCapacityRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[UpdateFleetCapacityRequest] identifier[updateFleetCapacityRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[updateFleetCapacityRequest] operator[==] Other[null]... |
public static Boolean toBoolean(Object object) {
if(object == null) {
return false;
}
if(object instanceof Boolean) {
return (Boolean)object;
}
if(object instanceof String) {
return object.toString().equalsIgnoreCase("true");
}
if(object instanceof Byte) {
return (Byte)object > 0;
}
if(obj... | class class_name[name] begin[{]
method[toBoolean, return_type[type[Boolean]], modifier[public static], parameter[object]] begin[{]
if[binary_operation[member[.object], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[bi... | Keyword[public] Keyword[static] identifier[Boolean] identifier[toBoolean] operator[SEP] identifier[Object] identifier[object] operator[SEP] {
Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if]... |
public Type inferType(Term term) {
if (term instanceof Constant || term instanceof Linear || term instanceof Function) {
return Type.TakagiSugeno;
}
return Type.Tsukamoto;
} | class class_name[name] begin[{]
method[inferType, return_type[type[Type]], modifier[public], parameter[term]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.term], instanceof, type[Constant]], ||, binary_operation[member[.term], instanceof, type[Linear]]], ||, binary_ope... | Keyword[public] identifier[Type] identifier[inferType] operator[SEP] identifier[Term] identifier[term] operator[SEP] {
Keyword[if] operator[SEP] identifier[term] Keyword[instanceof] identifier[Constant] operator[||] identifier[term] Keyword[instanceof] identifier[Linear] operator[||] identifier[term] Keyword[ins... |
private void resize() {
width = getWidth() - getInsets().getLeft() - getInsets().getRight();
height = getHeight() - getInsets().getTop() - getInsets().getBottom();
size = width < height ? width : height;
double center = size * 0.5;
if (width > 0 && height > 0) {
... | class class_name[name] begin[{]
method[resize, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.width], binary_operation[binary_operation[call[.getWidth, parameter[]], -, call[.getInsets, parameter[]]], -, call[.getInsets, parameter[]]]]
assign[member[.... | Keyword[private] Keyword[void] identifier[resize] operator[SEP] operator[SEP] {
identifier[width] operator[=] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[getInsets] operator[SEP] operator[SEP] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[-] identifier[getInse... |
@Override
protected final void acknowledgeIDs(long checkpointId, Set<UId> uniqueIds) {
LOG.debug("Acknowledging ids for checkpoint {}", checkpointId);
Iterator<Tuple2<Long, List<SessionId>>> iterator = sessionIdsPerSnapshot.iterator();
while (iterator.hasNext()) {
final Tuple2<Long, List<SessionId>> next = it... | class class_name[name] begin[{]
method[acknowledgeIDs, return_type[void], modifier[final protected], parameter[checkpointId, uniqueIds]] begin[{]
call[LOG.debug, parameter[literal["Acknowledging ids for checkpoint {}"], member[.checkpointId]]]
local_variable[type[Iterator], iterator]
... | annotation[@] identifier[Override] Keyword[protected] Keyword[final] Keyword[void] identifier[acknowledgeIDs] operator[SEP] Keyword[long] identifier[checkpointId] , identifier[Set] operator[<] identifier[UId] operator[>] identifier[uniqueIds] operator[SEP] {
identifier[LOG] operator[SEP] identifier[debug] opera... |
public IconDao getIconDao() {
IconDao iconDao = null;
if (geoPackage.isTable(IconTable.TABLE_NAME)) {
iconDao = new IconDao(
relatedTables.getUserDao(IconTable.TABLE_NAME));
relatedTables.setContents(iconDao.getTable());
}
return iconDao;
} | class class_name[name] begin[{]
method[getIconDao, return_type[type[IconDao]], modifier[public], parameter[]] begin[{]
local_variable[type[IconDao], iconDao]
if[call[geoPackage.isTable, parameter[member[IconTable.TABLE_NAME]]]] begin[{]
assign[member[.iconDao], C... | Keyword[public] identifier[IconDao] identifier[getIconDao] operator[SEP] operator[SEP] {
identifier[IconDao] identifier[iconDao] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[geoPackage] operator[SEP] identifier[isTable] operator[SEP] identifier[IconTable] operator[SEP] identifier[TA... |
public ShareableResource setConsumption(VM vm, int val) {
if (val < 0) {
throw new IllegalArgumentException(String.format("The '%s' consumption of VM '%s' must be >= 0", rcId, vm));
}
vmsConsumption.put(vm, val);
return this;
} | class class_name[name] begin[{]
method[setConsumption, return_type[type[ShareableResource]], modifier[public], parameter[vm, val]] begin[{]
if[binary_operation[member[.val], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Litera... | Keyword[public] identifier[ShareableResource] identifier[setConsumption] operator[SEP] identifier[VM] identifier[vm] , Keyword[int] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] identifier[val] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentExce... |
public static String sqlEscapeString(final String str) {
StringBuilder buffer = new StringBuilder(str.length() * 2);
boolean neededEscaping = false;
for (int i = 0; i < str.length(); i++) {
final char c = str.charAt(i);
if (needsEscaping((byte) c)) {
neede... | class class_name[name] begin[{]
method[sqlEscapeString, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[StringBuilder], buffer]
local_variable[type[boolean], neededEscaping]
ForStatement(body=BlockStatement(label=None, statements=[LocalVa... | Keyword[public] Keyword[static] identifier[String] identifier[sqlEscapeString] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] {
identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[str] operator[SEP] identifier[len... |
private ScheduledFuture<?> scheduleWriterMetricsUpdater(ScheduledThreadPoolExecutor writerMetricsUpdater,
long scheduleInterval) {
return writerMetricsUpdater.scheduleAtFixedRate(new WriterMetricsUpdater(), scheduleInterval, scheduleInterval,
TimeUnit.MILLISECONDS);
} | class class_name[name] begin[{]
method[scheduleWriterMetricsUpdater, return_type[type[ScheduledFuture]], modifier[private], parameter[writerMetricsUpdater, scheduleInterval]] begin[{]
return[call[writerMetricsUpdater.scheduleAtFixedRate, parameter[ClassCreator(arguments=[], body=None, constructor_type_... | Keyword[private] identifier[ScheduledFuture] operator[<] operator[?] operator[>] identifier[scheduleWriterMetricsUpdater] operator[SEP] identifier[ScheduledThreadPoolExecutor] identifier[writerMetricsUpdater] , Keyword[long] identifier[scheduleInterval] operator[SEP] {
Keyword[return] identifier[writerMetricsUp... |
public static ProcessExecutionResult getResultFromProcess(String[] args) {
try {
Process process = Runtime.getRuntime().exec(args);
StringBuilder outputSb = new StringBuilder();
try (BufferedReader processOutputReader = new BufferedReader(
new InputStreamReader(process.getInputStream()))... | class class_name[name] begin[{]
method[getResultFromProcess, return_type[type[ProcessExecutionResult]], modifier[public static], parameter[args]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[... | Keyword[public] Keyword[static] identifier[ProcessExecutionResult] identifier[getResultFromProcess] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[try] {
identifier[Process] identifier[process] operator[=] identifier[Runtime] operator[SEP] identif... |
public boolean setPublicAddress(String host, int port) {
try {
// set 'sentBy' in the listening point for outbound messages
parent.getSipProvider().getListeningPoints()[0].setSentBy(host + ":" + port);
// update my contact info
SipURI my_uri = (SipURI) contactInfo.getContactHeader().getAddr... | class class_name[name] begin[{]
method[setPublicAddress, return_type[type[boolean]], modifier[public], parameter[host, port]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getSipProvider, postfix_operators=[], prefix_operators=[], qualifier=parent, se... | Keyword[public] Keyword[boolean] identifier[setPublicAddress] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] {
Keyword[try] {
identifier[parent] operator[SEP] identifier[getSipProvider] operator[SEP] operator[SEP] operator[SEP] identifier[getListeningP... |
public final void setOrginaleValues() {
for (final AbstractField<?> field : allComponents) {
Object value = field.getValue();
if (field instanceof Table) {
value = ((Table) field).getContainerDataSource().getItemIds();
}
orginalValues.put(field, v... | class class_name[name] begin[{]
method[setOrginaleValues, return_type[void], modifier[final public], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argume... | Keyword[public] Keyword[final] Keyword[void] identifier[setOrginaleValues] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[AbstractField] operator[<] operator[?] operator[>] identifier[field] operator[:] identifier[allComponents] operator[SEP] {
identifier[Object] i... |
static public String unparseTokens(final List<ICmdLineArg<?>> args)
{
final StringBuilder out = new StringBuilder();
unparseTokens("", args, out);
return out.toString();
} | class class_name[name] begin[{]
method[unparseTokens, return_type[type[String]], modifier[public static], parameter[args]] begin[{]
local_variable[type[StringBuilder], out]
call[.unparseTokens, parameter[literal[""], member[.args], member[.out]]]
return[call[out.toString, parame... | Keyword[static] Keyword[public] identifier[String] identifier[unparseTokens] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[ICmdLineArg] operator[<] operator[?] operator[>] operator[>] identifier[args] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[out] operator[=] Keyw... |
public void marshall(SystemControl systemControl, ProtocolMarshaller protocolMarshaller) {
if (systemControl == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(systemControl.getNamespace(), NAMESPACE_... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[systemControl, protocolMarshaller]] begin[{]
if[binary_operation[member[.systemControl], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[SystemControl] identifier[systemControl] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[systemControl] operator[==] Other[null] operator[SEP] {
Keyword[thr... |
@JsonIgnore
public Map<String,List<String>> getAttributesMap() {
Map<String,List<String>> rslt = new HashMap<>();
for (NotificationAttribute a : attributes) {
rslt.put(a.getName(), a.getValues());
}
return rslt;
} | class class_name[name] begin[{]
method[getAttributesMap, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], rslt]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments... | annotation[@] identifier[JsonIgnore] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[getAttributesMap] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] ... |
public boolean evaluate(T t)
{
// Start by assuming that the candidate will be a member of the predicate.
boolean passed = true;
// Loop through all predicates and fail if any one of them does.
for (UnaryPredicate<T> predicate : chain)
{
if (!predicate.evaluate(t... | class class_name[name] begin[{]
method[evaluate, return_type[type[boolean]], modifier[public], parameter[t]] begin[{]
local_variable[type[boolean], passed]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=t, postfi... | Keyword[public] Keyword[boolean] identifier[evaluate] operator[SEP] identifier[T] identifier[t] operator[SEP] {
Keyword[boolean] identifier[passed] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[UnaryPredicate] operator[<] identifier[T] operator[>] identifier[predicate] operator... |
private static final void splitSamplesToBytes(int[] samples, int totalSamples,
int bytesPerSample, byte[] dataMD5) {
int destIndexBase = 0;
int i = 0;
switch(bytesPerSample) {
case 3:
for(; i < totalSamples; i++) {
dataMD5[destIndexBase++] = (byte)(samples[i]);
dataMD5... | class class_name[name] begin[{]
method[splitSamplesToBytes, return_type[void], modifier[final private static], parameter[samples, totalSamples, bytesPerSample, dataMD5]] begin[{]
local_variable[type[int], destIndexBase]
local_variable[type[int], i]
SwitchStatement(cases=[SwitchStatement... | Keyword[private] Keyword[static] Keyword[final] Keyword[void] identifier[splitSamplesToBytes] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[samples] , Keyword[int] identifier[totalSamples] , Keyword[int] identifier[bytesPerSample] , Keyword[byte] operator[SEP] operator[SEP] identifier[dataMD5] op... |
@Ready
public void onReady(final AtmosphereResource r) {
logger.info("Browser {} connected.", r.uuid());
logger.info("Injected Factory {} connected.", factory.getClass().getName());
} | class class_name[name] begin[{]
method[onReady, return_type[void], modifier[public], parameter[r]] begin[{]
call[logger.info, parameter[literal["Browser {} connected."], call[r.uuid, parameter[]]]]
call[logger.info, parameter[literal["Injected Factory {} connected."], call[facto... | annotation[@] identifier[Ready] Keyword[public] Keyword[void] identifier[onReady] operator[SEP] Keyword[final] identifier[AtmosphereResource] identifier[r] operator[SEP] {
identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[r] operator[SEP] identifier[uuid] operator[SEP]... |
MessageType parseType(String text) {
int commentStart = text.indexOf("(");
if (commentStart != -1) {
//remove optional comment
text = text.substring(0, commentStart);
}
text = text.substring(text.indexOf(": ") + 2);
String[] alternatives = text.split(" " +... | class class_name[name] begin[{]
method[parseType, return_type[type[MessageType]], modifier[default], parameter[text]] begin[{]
local_variable[type[int], commentStart]
if[binary_operation[member[.commentStart], !=, literal[1]]] begin[{]
assign[member[.text], call[... | identifier[MessageType] identifier[parseType] operator[SEP] identifier[String] identifier[text] operator[SEP] {
Keyword[int] identifier[commentStart] operator[=] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comme... |
public void setWarningLevel(int level) {
if (level < WarningMessage.NONE || level > WarningMessage.PARANOIA) {
this.warningLevel = WarningMessage.LIKELY_ERRORS;
}
else {
this.warningLevel = level;
}
} | class class_name[name] begin[{]
method[setWarningLevel, return_type[void], modifier[public], parameter[level]] begin[{]
if[binary_operation[binary_operation[member[.level], <, member[WarningMessage.NONE]], ||, binary_operation[member[.level], >, member[WarningMessage.PARANOIA]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setWarningLevel] operator[SEP] Keyword[int] identifier[level] operator[SEP] {
Keyword[if] operator[SEP] identifier[level] operator[<] identifier[WarningMessage] operator[SEP] identifier[NONE] operator[||] identifier[level] operator[>] identifier[WarningMessage] operator[S... |
public com.squareup.okhttp.Call getCharactersCharacterIdClonesAsync(Integer characterId, String datasource,
String ifNoneMatch, String token, final ApiCallback<CharacterClonesResponse> callback) throws ApiException {
com.squareup.okhttp.Call call = getCharactersCharacterIdClonesValidateBeforeCall(c... | class class_name[name] begin[{]
method[getCharactersCharacterIdClonesAsync, return_type[type[com]], modifier[public], parameter[characterId, datasource, ifNoneMatch, token, callback]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
call[ap... | Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getCharactersCharacterIdClonesAsync] operator[SEP] identifier[Integer] identifier[characterId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNon... |
public static void refreshBLZList(InputStream in)
throws IOException {
LoggerFactory.getLogger(HBCIUtils.class).debug("trying to load BLZ data");
Properties blzs = new Properties();
blzs.load(in);
banks.clear();
for (Entry<Object, Object> e : blzs.entrySet()) {
... | class class_name[name] begin[{]
method[refreshBLZList, return_type[void], modifier[public static], parameter[in]] begin[{]
call[LoggerFactory.getLogger, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=No... | Keyword[public] Keyword[static] Keyword[void] identifier[refreshBLZList] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[LoggerFactory] operator[SEP] identifier[getLogger] operator[SEP] identifier[HBCIUtils] operator[SEP] Keyword[class] oper... |
public DAPNode cloneDAG(CloneMap map)
throws CloneNotSupportedException
{
DAS das = (DAS) super.cloneDAG(map);
return das;
} | class class_name[name] begin[{]
method[cloneDAG, return_type[type[DAPNode]], modifier[public], parameter[map]] begin[{]
local_variable[type[DAS], das]
return[member[.das]]
end[}]
END[}] | Keyword[public] identifier[DAPNode] identifier[cloneDAG] operator[SEP] identifier[CloneMap] identifier[map] operator[SEP] Keyword[throws] identifier[CloneNotSupportedException] {
identifier[DAS] identifier[das] operator[=] operator[SEP] identifier[DAS] operator[SEP] Keyword[super] operator[SEP] identifier[cloneD... |
public MeterIdPrefix appendWithTags(String suffix, String... tags) {
return new MeterIdPrefix(name(suffix), sortedImmutableTags(tags));
} | class class_name[name] begin[{]
method[appendWithTags, return_type[type[MeterIdPrefix]], modifier[public], parameter[suffix, tags]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=suffix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], m... | Keyword[public] identifier[MeterIdPrefix] identifier[appendWithTags] operator[SEP] identifier[String] identifier[suffix] , identifier[String] operator[...] identifier[tags] operator[SEP] {
Keyword[return] Keyword[new] identifier[MeterIdPrefix] operator[SEP] identifier[name] operator[SEP] identifier[suffix] oper... |
public static String jsonEncode(final String val) {
if ((val == null) || (val.length() == 0)) {
return "\"\"";
}
StringBuilder sb = new StringBuilder();
/* \n newline
* \t tab
* \b backspace
* \f form feed
* \r return
* \" " (double quote)
* \\ \ ... | class class_name[name] begin[{]
method[jsonEncode, return_type[type[String]], modifier[public static], parameter[val]] begin[{]
if[binary_operation[binary_operation[member[.val], ==, literal[null]], ||, binary_operation[call[val.length, parameter[]], ==, literal[0]]]] begin[{]
retur... | Keyword[public] Keyword[static] identifier[String] identifier[jsonEncode] operator[SEP] Keyword[final] identifier[String] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[val] operator[SEP] identif... |
public static boolean isSunday(int column, int firstDayOfWeek) {
return (firstDayOfWeek == Time.SUNDAY && column == 0)
|| (firstDayOfWeek == Time.MONDAY && column == 6)
|| (firstDayOfWeek == Time.SATURDAY && column == 1);
} | class class_name[name] begin[{]
method[isSunday, return_type[type[boolean]], modifier[public static], parameter[column, firstDayOfWeek]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[member[.firstDayOfWeek], ==, member[Time.SUNDAY]], &&, binary_operation[member[.co... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSunday] operator[SEP] Keyword[int] identifier[column] , Keyword[int] identifier[firstDayOfWeek] operator[SEP] {
Keyword[return] operator[SEP] identifier[firstDayOfWeek] operator[==] identifier[Time] operator[SEP] identifier[SUNDAY] operator[&&] ident... |
public static Pattern filterPattern(String inputRegexp) {
if (inputRegexp.equals("*")) {
inputRegexp = ".*";
} else if (inputRegexp.startsWith("!")) {
inputRegexp = inputRegexp.substring(1);
}
return Pattern.compile(inputRegexp); // Catch incorrect patterns..
... | class class_name[name] begin[{]
method[filterPattern, return_type[type[Pattern]], modifier[public static], parameter[inputRegexp]] begin[{]
if[call[inputRegexp.equals, parameter[literal["*"]]]] begin[{]
assign[member[.inputRegexp], literal[".*"]]
else begin[{]
... | Keyword[public] Keyword[static] identifier[Pattern] identifier[filterPattern] operator[SEP] identifier[String] identifier[inputRegexp] operator[SEP] {
Keyword[if] operator[SEP] identifier[inputRegexp] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifi... |
@Activate
protected void activate(BundleContext cc, Map<String, Object> properties) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
Tr.event(tc, "JNDIMBeanRuntime activated", properties);
}
this.context = cc;
String serverName = locationAdmin.getSer... | class class_name[name] begin[{]
method[activate, return_type[void], modifier[protected], parameter[cc, properties]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{]
call[Tr.event, para... | annotation[@] identifier[Activate] Keyword[protected] Keyword[void] identifier[activate] operator[SEP] identifier[BundleContext] identifier[cc] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComp... |
private void initIndex() throws Exception {
// 0. Add the tasklog template
GetIndexTemplatesResponse result = elasticSearchClient.admin()
.indices()
.prepareGetTemplates("tasklog_template")
.execute()
.actionGet();
if (result.getIndexTemplates().... | class class_name[name] begin[{]
method[initIndex, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[GetIndexTemplatesResponse], result]
if[call[result.getIndexTemplates, parameter[]]] begin[{]
call[logger.info, parameter[literal["Cre... | Keyword[private] Keyword[void] identifier[initIndex] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[GetIndexTemplatesResponse] identifier[result] operator[=] identifier[elasticSearchClient] operator[SEP] identifier[admin] operator[SEP] operator[SEP] operator[SEP] identifier[indice... |
private void initComponents() {
pnlSummary = new javax.swing.JPanel();
lblSummary = new javax.swing.JLabel();
lblSummaryValue = new javax.swing.JLabel();
pnlEmptiesSummary = new javax.swing.JPanel();
jScrollConcepts = new javax.swing.JScrollPane();
jScrollRoles = new javax.swing.JScrollPane();
setFont(n... | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.pnlSummary], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=Ref... | Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[pnlSummary] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[lblSummary] operator[=] Keyword[new] iden... |
public <R> Choice<R> thenChoose(final Function<? super T, Choice<R>> function) {
checkNotNull(function);
if (Thread.interrupted()) {
throw new RuntimeException(new InterruptedException());
}
final Choice<T> thisChoice = this;
return new Choice<R>() {
@Override
protected Iterator<R>... | class class_name[name] begin[{]
method[thenChoose, return_type[type[Choice]], modifier[public], parameter[function]] begin[{]
call[.checkNotNull, parameter[member[.function]]]
if[call[Thread.interrupted, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(a... | Keyword[public] operator[<] identifier[R] operator[>] identifier[Choice] operator[<] identifier[R] operator[>] identifier[thenChoose] operator[SEP] Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , identifier[Choice] operator[<] identifier[R] operator[>] operator[>] identifier[... |
void parseSql(final String sqlString) {
rootNP = null;
final int stringLength = sqlString.length();
final StringBuilder pureSql = new StringBuilder(stringLength);
boolean inQuote = false;
int index = 0;
int paramCount = 0;
while (index < stringLength) {
char c = sqlString.charAt(index);
if (inQuote... | class class_name[name] begin[{]
method[parseSql, return_type[void], modifier[default], parameter[sqlString]] begin[{]
assign[member[.rootNP], literal[null]]
local_variable[type[int], stringLength]
local_variable[type[StringBuilder], pureSql]
local_variable[type[boolean],... | Keyword[void] identifier[parseSql] operator[SEP] Keyword[final] identifier[String] identifier[sqlString] operator[SEP] {
identifier[rootNP] operator[=] Other[null] operator[SEP] Keyword[final] Keyword[int] identifier[stringLength] operator[=] identifier[sqlString] operator[SEP] identifier[length] operator[SEP] o... |
public TldFernFeature lookupFern( int value ) {
TldFernFeature found = table[value];
if( found == null ) {
found = createFern();
found.init(value);
table[value] = found;
}
return found;
} | class class_name[name] begin[{]
method[lookupFern, return_type[type[TldFernFeature]], modifier[public], parameter[value]] begin[{]
local_variable[type[TldFernFeature], found]
if[binary_operation[member[.found], ==, literal[null]]] begin[{]
assign[member[.found], ... | Keyword[public] identifier[TldFernFeature] identifier[lookupFern] operator[SEP] Keyword[int] identifier[value] operator[SEP] {
identifier[TldFernFeature] identifier[found] operator[=] identifier[table] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operato... |
@SuppressWarnings("unchecked")
public void putAsPostAsync(SocializeSession session, String endpoint, T object, SocializeActionListener listener) {
AsyncPutter poster = new AsyncPutter(session, listener);
SocializePutRequest<T> request = new SocializePutRequest<T>();
request.setRequestType(RequestType.PUT_AS_POST... | class class_name[name] begin[{]
method[putAsPostAsync, return_type[void], modifier[public], parameter[session, endpoint, object, listener]] begin[{]
local_variable[type[AsyncPutter], poster]
local_variable[type[SocializePutRequest], request]
call[request.setRequestType, paramete... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[putAsPostAsync] operator[SEP] identifier[SocializeSession] identifier[session] , identifier[String] identifier[endpoint] , identifier[T] identifier[object] , identifier[SocializeActionListe... |
private String[] propertyDefs( Node node ) throws RepositoryException {
ArrayList<String> list = new ArrayList<>();
NodeType primaryType = node.getPrimaryNodeType();
PropertyDefinition[] defs = primaryType.getPropertyDefinitions();
for (PropertyDefinition def : defs) {
if (... | class class_name[name] begin[{]
method[propertyDefs, return_type[type[String]], modifier[private], parameter[node]] begin[{]
local_variable[type[ArrayList], list]
local_variable[type[NodeType], primaryType]
local_variable[type[PropertyDefinition], defs]
ForStatement(body=BlockSt... | Keyword[private] identifier[String] operator[SEP] operator[SEP] identifier[propertyDefs] operator[SEP] identifier[Node] identifier[node] operator[SEP] Keyword[throws] identifier[RepositoryException] {
identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] ident... |
private void sendHandshake() throws InvalidHandshakeException {
String path;
String part1 = uri.getRawPath();
String part2 = uri.getRawQuery();
if( part1 == null || part1.length() == 0 )
path = "/";
else
path = part1;
if( part2 != null )
path += '?' + part2;
int port = getPort();
String host = ... | class class_name[name] begin[{]
method[sendHandshake, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], path]
local_variable[type[String], part1]
local_variable[type[String], part2]
if[binary_operation[binary_operation[member[.part1... | Keyword[private] Keyword[void] identifier[sendHandshake] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidHandshakeException] {
identifier[String] identifier[path] operator[SEP] identifier[String] identifier[part1] operator[=] identifier[uri] operator[SEP] identifier[getRawPath] operator[SEP] operat... |
public Certificate get(KeyStoreChooser keyStoreChooser, CertificateChooserByAlias certificateChooserByAlias) {
CacheCert cacheCert = new CacheCert(keyStoreChooser.getKeyStoreName(), certificateChooserByAlias.getAlias());
Certificate retrievedCertificate = cache.get(cacheCert);
if (retrievedCert... | class class_name[name] begin[{]
method[get, return_type[type[Certificate]], modifier[public], parameter[keyStoreChooser, certificateChooserByAlias]] begin[{]
local_variable[type[CacheCert], cacheCert]
local_variable[type[Certificate], retrievedCertificate]
if[binary_operation[me... | Keyword[public] identifier[Certificate] identifier[get] operator[SEP] identifier[KeyStoreChooser] identifier[keyStoreChooser] , identifier[CertificateChooserByAlias] identifier[certificateChooserByAlias] operator[SEP] {
identifier[CacheCert] identifier[cacheCert] operator[=] Keyword[new] identifier[CacheCert] o... |
protected List<Segment> segment() {
List<Segment> segments = new ArrayList<>();
List<Recipe> recipeStack = new ArrayList<>();
recipeStack.add(this);
_segment(new Recipe(), recipeStack, null, segments);
return segments;
} | class class_name[name] begin[{]
method[segment, return_type[type[List]], modifier[protected], parameter[]] begin[{]
local_variable[type[List], segments]
local_variable[type[List], recipeStack]
call[recipeStack.add, parameter[THIS[]]]
call[._segment, parameter[Cla... | Keyword[protected] identifier[List] operator[<] identifier[Segment] operator[>] identifier[segment] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Segment] operator[>] identifier[segments] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] op... |
public static String format(XMLGregorianCalendar cal, String format) {
if (cal == null)
return null;
if (format == null)
format = DATE_FORMAT;
SimpleDateFormat df = new SimpleDateFormat(format);
return df.format(cal.toGregorianCalendar().getTime());
} | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public static], parameter[cal, format]] begin[{]
if[binary_operation[member[.cal], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[binary_operation[... | Keyword[public] Keyword[static] identifier[String] identifier[format] operator[SEP] identifier[XMLGregorianCalendar] identifier[cal] , identifier[String] identifier[format] operator[SEP] {
Keyword[if] operator[SEP] identifier[cal] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] ... |
public static void streamCopy(InputStream input, Writer output) throws IOException
{
if (input == null)
throw new IllegalArgumentException("Must provide something to read from");
if (output == null)
throw new IllegalArgumentException("Must provide something to write to");
streamCopy(new InputStreamReader(... | class class_name[name] begin[{]
method[streamCopy, return_type[void], modifier[public static], parameter[input, output]] begin[{]
if[binary_operation[member[.input], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[],... | Keyword[public] Keyword[static] Keyword[void] identifier[streamCopy] operator[SEP] identifier[InputStream] identifier[input] , identifier[Writer] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] Keyword[... |
private Version versionOf(int major, int minor, int patch) {
return Version.forIntegers(major, minor, patch);
} | class class_name[name] begin[{]
method[versionOf, return_type[type[Version]], modifier[private], parameter[major, minor, patch]] begin[{]
return[call[Version.forIntegers, parameter[member[.major], member[.minor], member[.patch]]]]
end[}]
END[}] | Keyword[private] identifier[Version] identifier[versionOf] operator[SEP] Keyword[int] identifier[major] , Keyword[int] identifier[minor] , Keyword[int] identifier[patch] operator[SEP] {
Keyword[return] identifier[Version] operator[SEP] identifier[forIntegers] operator[SEP] identifier[major] , identifier[minor... |
public Element attribute(String attribute, Object value)
{
if (attributeMap==null)
attributeMap=new Hashtable(10);
if (value!=null)
{
if (value instanceof String && ((String)value).indexOf('"')!=-1)
{
String s=(String)value;
... | class class_name[name] begin[{]
method[attribute, return_type[type[Element]], modifier[public], parameter[attribute, value]] begin[{]
if[binary_operation[member[.attributeMap], ==, literal[null]]] begin[{]
assign[member[.attributeMap], ClassCreator(arguments=[Literal(postfix_operato... | Keyword[public] identifier[Element] identifier[attribute] operator[SEP] identifier[String] identifier[attribute] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[attributeMap] operator[==] Other[null] operator[SEP] identifier[attributeMap] operator[=] Keyword[new] iden... |
@Override
public String getDescription(final Object table, final Object entry) {
if (table instanceof TableWithNullOption && entry == null) {
return ((TableWithNullOption) table).getNullDescription();
} else if (entry instanceof TableEntry) {
return ((TableEntry) entry).getDesc();
}
return null;
} | class class_name[name] begin[{]
method[getDescription, return_type[type[String]], modifier[public], parameter[table, entry]] begin[{]
if[binary_operation[binary_operation[member[.table], instanceof, type[TableWithNullOption]], &&, binary_operation[member[.entry], ==, literal[null]]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getDescription] operator[SEP] Keyword[final] identifier[Object] identifier[table] , Keyword[final] identifier[Object] identifier[entry] operator[SEP] {
Keyword[if] operator[SEP] identifier[table] Keyword[instanceof] identifier[Tabl... |
public ResourceInjection byLookup(final String lookup) {
final ResourceLiteral resource = new ResourceLiteral();
resource.setLookup(lookup);
matchingResources.add(resource);
return this;
} | class class_name[name] begin[{]
method[byLookup, return_type[type[ResourceInjection]], modifier[public], parameter[lookup]] begin[{]
local_variable[type[ResourceLiteral], resource]
call[resource.setLookup, parameter[member[.lookup]]]
call[matchingResources.add, parameter... | Keyword[public] identifier[ResourceInjection] identifier[byLookup] operator[SEP] Keyword[final] identifier[String] identifier[lookup] operator[SEP] {
Keyword[final] identifier[ResourceLiteral] identifier[resource] operator[=] Keyword[new] identifier[ResourceLiteral] operator[SEP] operator[SEP] operator[SEP] iden... |
public static DateTimeZone readFrom(DataInput in, String id) throws IOException {
switch (in.readUnsignedByte()) {
case 'F':
DateTimeZone fixed = new FixedDateTimeZone
(id, in.readUTF(), (int)readMillis(in), (int)readMillis(in));
if (fixed.equals(DateTimeZone.UTC)... | class class_name[name] begin[{]
method[readFrom, return_type[type[DateTimeZone]], modifier[public static], parameter[in, id]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='F')], statements=[LocalVariable... | Keyword[public] Keyword[static] identifier[DateTimeZone] identifier[readFrom] operator[SEP] identifier[DataInput] identifier[in] , identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[switch] operator[SEP] identifier[in] operator[SEP] identifier[readUnsignedByte] ope... |
public void deleteMax() {
if (isEmpty())
throw new NoSuchElementException("BST underflow");
// if both children of root are black, set root to red
if (!isRed(root.getLeft()) && !isRed(root.getRight()))
root.setColor(RED);
root = deleteMax(root);
if (!isEmpty()) {
root.setParent(null);
root.se... | class class_name[name] begin[{]
method[deleteMax, return_type[void], modifier[public], parameter[]] begin[{]
if[call[.isEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BST und... | Keyword[public] Keyword[void] identifier[deleteMax] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchElementException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[S... |
public ByteBuf remove(int bytes, ChannelPromise aggregatePromise) {
return remove(channel.alloc(), bytes, aggregatePromise);
} | class class_name[name] begin[{]
method[remove, return_type[type[ByteBuf]], modifier[public], parameter[bytes, aggregatePromise]] begin[{]
return[call[.remove, parameter[call[channel.alloc, parameter[]], member[.bytes], member[.aggregatePromise]]]]
end[}]
END[}] | Keyword[public] identifier[ByteBuf] identifier[remove] operator[SEP] Keyword[int] identifier[bytes] , identifier[ChannelPromise] identifier[aggregatePromise] operator[SEP] {
Keyword[return] identifier[remove] operator[SEP] identifier[channel] operator[SEP] identifier[alloc] operator[SEP] operator[SEP] , identi... |
public int read(byte []buf, int offset, int length)
throws IOException
{
try {
if (_s == null || _is == null)
return -1;
int readLength = _is.read(buf, offset, length);
if (readLength >= 0)
_totalReadBytes += readLength;
return readLength;
} catch (InterruptedIOE... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[buf, offset, length]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_s, postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[_s] op... |
public void updateCmsObject(CmsObject cms) {
try {
m_cms = OpenCms.initCmsObject(cms);
} catch (CmsException e) {
LOG.error(e.getLocalizedMessage(), e);
m_cms = cms;
}
} | class class_name[name] begin[{]
method[updateCmsObject, return_type[void], modifier[public], parameter[cms]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, val... | Keyword[public] Keyword[void] identifier[updateCmsObject] operator[SEP] identifier[CmsObject] identifier[cms] operator[SEP] {
Keyword[try] {
identifier[m_cms] operator[=] identifier[OpenCms] operator[SEP] identifier[initCmsObject] operator[SEP] identifier[cms] operator[SEP] operator[SEP]
}
... |
public static TimingInfo newTimingInfoFullSupport(
long startEpochTimeMilli, long startTimeNano, long endTimeNano) {
return new TimingInfoFullSupport(Long.valueOf(startEpochTimeMilli), startTimeNano, Long.valueOf(endTimeNano));
} | class class_name[name] begin[{]
method[newTimingInfoFullSupport, return_type[type[TimingInfo]], modifier[public static], parameter[startEpochTimeMilli, startTimeNano, endTimeNano]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=startEpochTimeMilli, postfix_op... | Keyword[public] Keyword[static] identifier[TimingInfo] identifier[newTimingInfoFullSupport] operator[SEP] Keyword[long] identifier[startEpochTimeMilli] , Keyword[long] identifier[startTimeNano] , Keyword[long] identifier[endTimeNano] operator[SEP] {
Keyword[return] Keyword[new] identifier[TimingInfoFullSupport... |
private CompletableFuture<Boolean> handleProbeRequest(ImmutableMember member) {
CompletableFuture<Boolean> future = new CompletableFuture<>();
swimScheduler.execute(() -> {
LOGGER.trace("{} - Probing {}", localMember.id(), member);
bootstrapService.getMessagingService().sendAndReceive(
mem... | class class_name[name] begin[{]
method[handleProbeRequest, return_type[type[CompletableFuture]], modifier[private], parameter[member]] begin[{]
local_variable[type[CompletableFuture], future]
call[swimScheduler.execute, parameter[LambdaExpression(body=[StatementExpression(expression=Met... | Keyword[private] identifier[CompletableFuture] operator[<] identifier[Boolean] operator[>] identifier[handleProbeRequest] operator[SEP] identifier[ImmutableMember] identifier[member] operator[SEP] {
identifier[CompletableFuture] operator[<] identifier[Boolean] operator[>] identifier[future] operator[=] Keyword[n... |
public static Bitmap createTintTransformationMap(Bitmap bitmap, int tintColor) {
// tint color
int[] t = new int[] {
Color.red(tintColor),
Color.green(tintColor),
Color.blue(tintColor) };
int width = bitmap.getWidth();
int height = bitmap.getHeight();
int[] pixels = new int[width * height];
b... | class class_name[name] begin[{]
method[createTintTransformationMap, return_type[type[Bitmap]], modifier[public static], parameter[bitmap, tintColor]] begin[{]
local_variable[type[int], t]
local_variable[type[int], width]
local_variable[type[int], height]
local_variable[type[int]... | Keyword[public] Keyword[static] identifier[Bitmap] identifier[createTintTransformationMap] operator[SEP] identifier[Bitmap] identifier[bitmap] , Keyword[int] identifier[tintColor] operator[SEP] {
Keyword[int] operator[SEP] operator[SEP] identifier[t] operator[=] Keyword[new] Keyword[int] operator[SEP] operator[... |
public <T> void changeItem(MenuItem<T> item, MenuState<T> menuState) {
menuStates.put(item.getId(), menuState);
} | class class_name[name] begin[{]
method[changeItem, return_type[void], modifier[public], parameter[item, menuState]] begin[{]
call[menuStates.put, parameter[call[item.getId, parameter[]], member[.menuState]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[changeItem] operator[SEP] identifier[MenuItem] operator[<] identifier[T] operator[>] identifier[item] , identifier[MenuState] operator[<] identifier[T] operator[>] identifier[menuState] operator[SEP] {
identifier[menuStates] operator... |
private ModeOfInheritance getInheritanceModel(List<ReferenceAssertionType.AttributeSet> attributeSetList,
Map<String, String> sourceInheritableTrait)
throws JsonProcessingException {
Set<String> inheritanceModelSet = new HashSet<>();
// for (T... | class class_name[name] begin[{]
method[getInheritanceModel, return_type[type[ModeOfInheritance]], modifier[private], parameter[attributeSetList, sourceInheritableTrait]] begin[{]
local_variable[type[Set], inheritanceModelSet]
if[binary_operation[member[.attributeSetList], !=, literal[nu... | Keyword[private] identifier[ModeOfInheritance] identifier[getInheritanceModel] operator[SEP] identifier[List] operator[<] identifier[ReferenceAssertionType] operator[SEP] identifier[AttributeSet] operator[>] identifier[attributeSetList] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>]... |
public Matrix4d rotateAroundLocal(Quaterniondc quat, double ox, double oy, double oz) {
return rotateAroundLocal(quat, ox, oy, oz, this);
} | class class_name[name] begin[{]
method[rotateAroundLocal, return_type[type[Matrix4d]], modifier[public], parameter[quat, ox, oy, oz]] begin[{]
return[call[.rotateAroundLocal, parameter[member[.quat], member[.ox], member[.oy], member[.oz], THIS[]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix4d] identifier[rotateAroundLocal] operator[SEP] identifier[Quaterniondc] identifier[quat] , Keyword[double] identifier[ox] , Keyword[double] identifier[oy] , Keyword[double] identifier[oz] operator[SEP] {
Keyword[return] identifier[rotateAroundLocal] operator[SEP] identifier[q... |
public static XmlParser.Node select(XmlParser.Node rootNode, String xpath) {
XPath xp = XPath.parse(xpath);
return xp.select(rootNode);
} | class class_name[name] begin[{]
method[select, return_type[type[XmlParser]], modifier[public static], parameter[rootNode, xpath]] begin[{]
local_variable[type[XPath], xp]
return[call[xp.select, parameter[member[.rootNode]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[XmlParser] operator[SEP] identifier[Node] identifier[select] operator[SEP] identifier[XmlParser] operator[SEP] identifier[Node] identifier[rootNode] , identifier[String] identifier[xpath] operator[SEP] {
identifier[XPath] identifier[xp] operator[=] identifier[XPath] op... |
private final static Class convertToJavaClass(String name,
ClassLoader cl)
throws ClassNotFoundException
{
int arraySize = 0;
while (name.endsWith("[]"))
{
name = name.substring(0, name.length() - 2);
arraySize++;
}
... | class class_name[name] begin[{]
method[convertToJavaClass, return_type[type[Class]], modifier[final private static], parameter[name, cl]] begin[{]
local_variable[type[int], arraySize]
while[call[name.endsWith, parameter[literal["[]"]]]] begin[{]
assign[member[.na... | Keyword[private] Keyword[final] Keyword[static] identifier[Class] identifier[convertToJavaClass] operator[SEP] identifier[String] identifier[name] , identifier[ClassLoader] identifier[cl] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
Keyword[int] identifier[arraySize] operator[=] Other[0] o... |
public CommandLine createCommandLine() {
CommandLine commandLine = new CommandLine(this);
if (commandLine.getCommandName().equals("<main class>")) { // only if user did not specify @Command(name) attribute
commandLine.setCommandName(this.getClass().getSimpleName());
}
return ... | class class_name[name] begin[{]
method[createCommandLine, return_type[type[CommandLine]], modifier[public], parameter[]] begin[{]
local_variable[type[CommandLine], commandLine]
if[call[commandLine.getCommandName, parameter[]]] begin[{]
call[commandLine.setCommand... | Keyword[public] identifier[CommandLine] identifier[createCommandLine] operator[SEP] operator[SEP] {
identifier[CommandLine] identifier[commandLine] operator[=] Keyword[new] identifier[CommandLine] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commandLine] operator[S... |
public String format(Style style, TimeZone tz, long date, Output<TimeType> timeType) {
String result = null;
if (timeType != null) {
timeType.value = TimeType.UNKNOWN;
}
boolean noOffsetFormatFallback = false;
switch (style) {
case GENERIC_LOCATION:
... | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public], parameter[style, tz, date, timeType]] begin[{]
local_variable[type[String], result]
if[binary_operation[member[.timeType], !=, literal[null]]] begin[{]
assign[member[timeT... | Keyword[public] identifier[String] identifier[format] operator[SEP] identifier[Style] identifier[style] , identifier[TimeZone] identifier[tz] , Keyword[long] identifier[date] , identifier[Output] operator[<] identifier[TimeType] operator[>] identifier[timeType] operator[SEP] {
identifier[String] identifier[re... |
@Override
public List<CPDAvailabilityEstimate> findByCommerceAvailabilityEstimateId(
long commerceAvailabilityEstimateId) {
return findByCommerceAvailabilityEstimateId(commerceAvailabilityEstimateId,
QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findByCommerceAvailabilityEstimateId, return_type[type[List]], modifier[public], parameter[commerceAvailabilityEstimateId]] begin[{]
return[call[.findByCommerceAvailabilityEstimateId, parameter[member[.commerceAvailabilityEstimateId], member[QueryUtil.ALL_POS], me... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDAvailabilityEstimate] operator[>] identifier[findByCommerceAvailabilityEstimateId] operator[SEP] Keyword[long] identifier[commerceAvailabilityEstimateId] operator[SEP] {
Keyword[return] identifier[findByCommerceAvailabi... |
public static void safeClose(final Closeable c) {
if (c != null) {
try {
c.close();
} catch (Exception e) {
VFSLogger.ROOT_LOGGER.trace("Failed to close resource", e);
}
}
} | class class_name[name] begin[{]
method[safeClose, return_type[void], modifier[public static], parameter[c]] begin[{]
if[binary_operation[member[.c], !=, literal[null]]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_o... | Keyword[public] Keyword[static] Keyword[void] identifier[safeClose] operator[SEP] Keyword[final] identifier[Closeable] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[c] operator[SEP] identifier[clo... |
public static String convertPatternToPerlRegex(@Nonnull final Pattern pattern) {
Check.notNull(pattern, "pattern");
final String modifiers = Flag.convertToModifiers(Flag.parse(pattern.flags()));
return String.format(PATTERN_TO_REGEX_TEMPLATE, pattern.pattern(), modifiers);
} | class class_name[name] begin[{]
method[convertPatternToPerlRegex, return_type[type[String]], modifier[public static], parameter[pattern]] begin[{]
call[Check.notNull, parameter[member[.pattern], literal["pattern"]]]
local_variable[type[String], modifiers]
return[call[String.form... | Keyword[public] Keyword[static] identifier[String] identifier[convertPatternToPerlRegex] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Pattern] identifier[pattern] operator[SEP] {
identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[pattern] , literal[String] ... |
public String getFileName() {
CmsMacroResolver resolver = new CmsMacroResolver();
resolver.addMacro("version", OpenCms.getModuleManager().getModule(m_moduleName).getVersionStr());
return resolver.resolveMacros(m_fileName);
} | class class_name[name] begin[{]
method[getFileName, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[CmsMacroResolver], resolver]
call[resolver.addMacro, parameter[literal["version"], call[OpenCms.getModuleManager, parameter[]]]]
return[call... | Keyword[public] identifier[String] identifier[getFileName] operator[SEP] operator[SEP] {
identifier[CmsMacroResolver] identifier[resolver] operator[=] Keyword[new] identifier[CmsMacroResolver] operator[SEP] operator[SEP] operator[SEP] identifier[resolver] operator[SEP] identifier[addMacro] operator[SEP] literal[... |
private boolean isCrossed(Point2d beg1, Point2d end1, Point2d beg2, Point2d end2) {
return Line2D.linesIntersect(beg1.x, beg1.y, end1.x, end1.y, beg2.x, beg2.y, end2.x, end2.y);
} | class class_name[name] begin[{]
method[isCrossed, return_type[type[boolean]], modifier[private], parameter[beg1, end1, beg2, end2]] begin[{]
return[call[Line2D.linesIntersect, parameter[member[beg1.x], member[beg1.y], member[end1.x], member[end1.y], member[beg2.x], member[beg2.y], member[end2.x], membe... | Keyword[private] Keyword[boolean] identifier[isCrossed] operator[SEP] identifier[Point2d] identifier[beg1] , identifier[Point2d] identifier[end1] , identifier[Point2d] identifier[beg2] , identifier[Point2d] identifier[end2] operator[SEP] {
Keyword[return] identifier[Line2D] operator[SEP] identifier[linesInter... |
public static BigDecimal sinh(BigDecimal x, MathContext mathContext) {
checkMathContext(mathContext);
MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode());
BigDecimal result = SinhCalculator.INSTANCE.calculate(x, mc);
return round(result, mathContext);
} | class class_name[name] begin[{]
method[sinh, return_type[type[BigDecimal]], modifier[public static], parameter[x, mathContext]] begin[{]
call[.checkMathContext, parameter[member[.mathContext]]]
local_variable[type[MathContext], mc]
local_variable[type[BigDecimal], result]
... | Keyword[public] Keyword[static] identifier[BigDecimal] identifier[sinh] operator[SEP] identifier[BigDecimal] identifier[x] , identifier[MathContext] identifier[mathContext] operator[SEP] {
identifier[checkMathContext] operator[SEP] identifier[mathContext] operator[SEP] operator[SEP] identifier[MathContext] iden... |
public static PlainDate of(
int year,
int month,
int dayOfMonth
) {
return PlainDate.create(year, month, dayOfMonth, null, true);
} | class class_name[name] begin[{]
method[of, return_type[type[PlainDate]], modifier[public static], parameter[year, month, dayOfMonth]] begin[{]
return[call[PlainDate.create, parameter[member[.year], member[.month], member[.dayOfMonth], literal[null], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[PlainDate] identifier[of] operator[SEP] Keyword[int] identifier[year] , Keyword[int] identifier[month] , Keyword[int] identifier[dayOfMonth] operator[SEP] {
Keyword[return] identifier[PlainDate] operator[SEP] identifier[create] operator[SEP] identifier[year] , identi... |
public static <T> List<T> sort(Collection<T> collection, Comparator<? super T> comparator) {
List<T> list = new ArrayList<T>(collection);
Collections.sort(list, comparator);
return list;
} | class class_name[name] begin[{]
method[sort, return_type[type[List]], modifier[public static], parameter[collection, comparator]] begin[{]
local_variable[type[List], list]
call[Collections.sort, parameter[member[.list], member[.comparator]]]
return[member[.list]]
end[}]
END[... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[sort] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[collection] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] o... |
final public void decrement(long val) {
if (!enabled)
return;
lastSampleTime = System.currentTimeMillis();
if (!sync) {
count -= val;
} else {
synchronized (this) {
count -= val;
}
}
} | class class_name[name] begin[{]
method[decrement, return_type[void], modifier[final public], parameter[val]] begin[{]
if[member[.enabled]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[member[.lastSampleTime], call[System.currentTimeMillis, parameter[]]]... | Keyword[final] Keyword[public] Keyword[void] identifier[decrement] operator[SEP] Keyword[long] identifier[val] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[enabled] operator[SEP] Keyword[return] operator[SEP] identifier[lastSampleTime] operator[=] identifier[System] operator[SEP] identifier[c... |
public void marshall(DeletePolicyVersionRequest deletePolicyVersionRequest, ProtocolMarshaller protocolMarshaller) {
if (deletePolicyVersionRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(d... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deletePolicyVersionRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deletePolicyVersionRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeletePolicyVersionRequest] identifier[deletePolicyVersionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deletePolicyVersionRequest] operator[==] Other[null]... |
public void setPrimaryKey(int primaryKey)
throws IllegalArgumentException
{
if (primaryKey <= NULL)
{
this.primaryKey = Data.NULL;
}
else
{
this.primaryKey = primaryKey;
//resetNew();
return;
}
} | class class_name[name] begin[{]
method[setPrimaryKey, return_type[void], modifier[public], parameter[primaryKey]] begin[{]
if[binary_operation[member[.primaryKey], <=, member[.NULL]]] begin[{]
assign[THIS[member[None.primaryKey]], member[Data.NULL]]
else begin[{]... | Keyword[public] Keyword[void] identifier[setPrimaryKey] operator[SEP] Keyword[int] identifier[primaryKey] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] identifier[primaryKey] operator[<=] identifier[NULL] operator[SEP] {
Keyword[this] operator[SEP] iden... |
public void close() throws IOException
{
if (tc.isEntryEnabled()) Tr.entry(tc, "close", new Object[]{this, _file});
// By locking on the class rather than the object, and removing
// the inner lock on the class, this seems to resolve the problems
// reported in d347231 that file handles ... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[Tr.entry, parameter[member[.tc], literal["close"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializer... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier... |
public Method resolveFunction(String prefix, String localName) {
FunctionMapperSpi functionMapperSpi = findFunctionMapperSpi(prefix);
return functionMapperSpi.resolveFunction(localName);
} | class class_name[name] begin[{]
method[resolveFunction, return_type[type[Method]], modifier[public], parameter[prefix, localName]] begin[{]
local_variable[type[FunctionMapperSpi], functionMapperSpi]
return[call[functionMapperSpi.resolveFunction, parameter[member[.localName]]]]
end[}]
END[}] | Keyword[public] identifier[Method] identifier[resolveFunction] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[localName] operator[SEP] {
identifier[FunctionMapperSpi] identifier[functionMapperSpi] operator[=] identifier[findFunctionMapperSpi] operator[SEP] identifier[prefix]... |
public static FileLog createFileLogHolder(FileLog oldLog,
File logDirectory,
String newFileName,
int maxFiles,
long maxSizeBytes) {
... | class class_name[name] begin[{]
method[createFileLogHolder, return_type[type[FileLog]], modifier[public static], parameter[oldLog, logDirectory, newFileName, maxFiles, maxSizeBytes]] begin[{]
local_variable[type[FileLog], logHolder]
local_variable[type[int], lio]
if[binary_opera... | Keyword[public] Keyword[static] identifier[FileLog] identifier[createFileLogHolder] operator[SEP] identifier[FileLog] identifier[oldLog] , identifier[File] identifier[logDirectory] , identifier[String] identifier[newFileName] , Keyword[int] identifier[maxFiles] , Keyword[long] identifier[maxSizeBytes] operator[SEP]... |
public void put(K key, V value)
{
this.lock.writeLock().lock();
try {
this.map.put(key, new SoftReference<>(value));
} finally {
this.lock.writeLock().unlock();
}
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[key, value]] begin[{]
THIS[member[None.lock]call[None.writeLock, parameter[]]call[None.lock, parameter[]]]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_oper... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[V] identifier[value] operator[SEP] {
Keyword[this] operator[SEP] identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] oper... |
public ServiceFuture<ServiceEndpointPolicyInner> beginUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, Map<String, String> tags, final ServiceCallback<ServiceEndpointPolicyInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, se... | class class_name[name] begin[{]
method[beginUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, serviceEndpointPolicyName, tags, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginUpdateWithServiceResponseAsync, parameter[me... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[ServiceEndpointPolicyInner] operator[>] identifier[beginUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serviceEndpointPolicyName] , identifier[Map] operator[<] identifier[String] , identifier... |
protected ModelNode parseConfig(XMLExtendedStreamReader reader, ModelElement xmlElement, String key, ModelNode lastNode,
List<SimpleAttributeDefinition> attributes, List<ModelNode> addOperations) throws XMLStreamException {
if (!reader.getLocalName().equals(xmlElement.getName())) {
return nu... | class class_name[name] begin[{]
method[parseConfig, return_type[type[ModelNode]], modifier[protected], parameter[reader, xmlElement, key, lastNode, attributes, addOperations]] begin[{]
if[call[reader.getLocalName, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
No... | Keyword[protected] identifier[ModelNode] identifier[parseConfig] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[ModelElement] identifier[xmlElement] , identifier[String] identifier[key] , identifier[ModelNode] identifier[lastNode] , identifier[List] operator[<] identifier[SimpleAt... |
@PreAuthorize("hasRole('ROLE_TWE_ADMIN')")
@RequestMapping(method = RequestMethod.POST, value = "/workflow/instances/{woinRefNum}")
public String performActionOnInstance( RedirectAttributes model, @PathVariable long woinRefNum, @RequestParam() String action ){
if( "abort".equals( action ) || "suspend".e... | class class_name[name] begin[{]
method[performActionOnInstance, return_type[type[String]], modifier[public], parameter[model, woinRefNum, action]] begin[{]
if[binary_operation[binary_operation[binary_operation[literal["abort"], ||, literal["suspend"]], ||, literal["resume"]], ||, literal["retry... | annotation[@] identifier[PreAuthorize] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[RequestMapping] operator[SEP] identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] , identifier[value] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Stri... |
public void setData (Collection<?> data)
{
_data.clear();
_data.addAll(data);
_model.fireTableDataChanged();
} | class class_name[name] begin[{]
method[setData, return_type[void], modifier[public], parameter[data]] begin[{]
call[_data.clear, parameter[]]
call[_data.addAll, parameter[member[.data]]]
call[_model.fireTableDataChanged, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setData] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[data] operator[SEP] {
identifier[_data] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[_data] operator[SEP] identifier[addAll] operator[SEP] ... |
public void setDateHeader(String name, long value)
{
try{_httpResponse.setDateField(name,value);}
catch(IllegalStateException e){LogSupport.ignore(log,e);}
} | class class_name[name] begin[{]
method[setDateHeader, return_type[void], modifier[public], parameter[name, value]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), M... | Keyword[public] Keyword[void] identifier[setDateHeader] operator[SEP] identifier[String] identifier[name] , Keyword[long] identifier[value] operator[SEP] {
Keyword[try] {
identifier[_httpResponse] operator[SEP] identifier[setDateField] operator[SEP] identifier[name] , identifier[value] operator[SEP]... |
protected Pair<SamlRegisteredService, SamlRegisteredServiceServiceProviderMetadataFacade> getRegisteredServiceAndFacade(final AuthnRequest request) {
val issuer = SamlIdPUtils.getIssuerFromSamlObject(request);
LOGGER.debug("Located issuer [{}] from authentication context", issuer);
val register... | class class_name[name] begin[{]
method[getRegisteredServiceAndFacade, return_type[type[Pair]], modifier[protected], parameter[request]] begin[{]
local_variable[type[val], issuer]
call[LOGGER.debug, parameter[literal["Located issuer [{}] from authentication context"], member[.issuer]]]
... | Keyword[protected] identifier[Pair] operator[<] identifier[SamlRegisteredService] , identifier[SamlRegisteredServiceServiceProviderMetadataFacade] operator[>] identifier[getRegisteredServiceAndFacade] operator[SEP] Keyword[final] identifier[AuthnRequest] identifier[request] operator[SEP] {
identifier[val] ident... |
void updateGetRegistration(boolean advertise)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "updateGetRegistration", new Boolean(advertise));
destinationHandler.updateGetRegistration(advertise);
if (TraceComponent.isAnyTracingEnabled() && tc... | class class_name[name] begin[{]
method[updateGetRegistration, return_type[void], modifier[default], parameter[advertise]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, paramet... | Keyword[void] identifier[updateGetRegistration] operator[SEP] Keyword[boolean] identifier[advertise] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] ... |
@Override
public List<CommerceDiscountUsageEntry> findAll(int start, int end) {
return findAll(start, end, null);
} | class class_name[name] begin[{]
method[findAll, return_type[type[List]], modifier[public], parameter[start, end]] begin[{]
return[call[.findAll, parameter[member[.start], member[.end], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceDiscountUsageEntry] operator[>] identifier[findAll] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[findAll] operator[SEP] identifier[start] ,... |
public Future<AuthenticationResult> acquireTokenByAuthorizationCode(
final String authorizationCode, final String resource,
final String clientId, final URI redirectUri,
final AuthenticationCallback callback) {
final ClientAuthentication clientAuth = new ClientAuthentic... | class class_name[name] begin[{]
method[acquireTokenByAuthorizationCode, return_type[type[Future]], modifier[public], parameter[authorizationCode, resource, clientId, redirectUri, callback]] begin[{]
local_variable[type[ClientAuthentication], clientAuth]
THIS[call[None.validateAuthCodeRe... | Keyword[public] identifier[Future] operator[<] identifier[AuthenticationResult] operator[>] identifier[acquireTokenByAuthorizationCode] operator[SEP] Keyword[final] identifier[String] identifier[authorizationCode] , Keyword[final] identifier[String] identifier[resource] , Keyword[final] identifier[String] identifier[... |
public ApiResponse<TokenInfoSuccessResponse> tokenInfoWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = tokenInfoValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<TokenInfoSuccessResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);... | class class_name[name] begin[{]
method[tokenInfoWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member[.call], member[.localVarRe... | Keyword[public] identifier[ApiResponse] operator[<] identifier[TokenInfoSuccessResponse] operator[>] identifier[tokenInfoWithHttpInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifie... |
public static <T, K, D, A, M extends Map<K, D>>
Collector<T, ?, M> groupingBy(Function<? super T, ? extends K> classifier,
Supplier<M> mapFactory,
Collector<? super T, A, D> downstream) {
Supplier<A> downstreamSupplier = downstream.supplier... | class class_name[name] begin[{]
method[groupingBy, return_type[type[Collector]], modifier[public static], parameter[classifier, mapFactory, downstream]] begin[{]
local_variable[type[Supplier], downstreamSupplier]
local_variable[type[BiConsumer], downstreamAccumulator]
local_variable[typ... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] , identifier[D] , identifier[A] , identifier[M] Keyword[extends] identifier[Map] operator[<] identifier[K] , identifier[D] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[M] operator[>] id... |
public static String getMimeTypeFromExtension(String extension) {
if (extension == null || extension.length() == 0) {
return null;
}
return extensionToMimeTypeMap.get(extension);
} | class class_name[name] begin[{]
method[getMimeTypeFromExtension, return_type[type[String]], modifier[public static], parameter[extension]] begin[{]
if[binary_operation[binary_operation[member[.extension], ==, literal[null]], ||, binary_operation[call[extension.length, parameter[]], ==, literal[... | Keyword[public] Keyword[static] identifier[String] identifier[getMimeTypeFromExtension] operator[SEP] identifier[String] identifier[extension] operator[SEP] {
Keyword[if] operator[SEP] identifier[extension] operator[==] Other[null] operator[||] identifier[extension] operator[SEP] identifier[length] operator[SEP]... |
@UiThread
public void notifyChildChanged(int parentPosition, int childPosition) {
P parent = mParentList.get(parentPosition);
int flatParentPosition = getFlatParentPosition(parentPosition);
ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
parentWrapper.s... | class class_name[name] begin[{]
method[notifyChildChanged, return_type[void], modifier[public], parameter[parentPosition, childPosition]] begin[{]
local_variable[type[P], parent]
local_variable[type[int], flatParentPosition]
local_variable[type[ExpandableWrapper], parentWrapper]
... | annotation[@] identifier[UiThread] Keyword[public] Keyword[void] identifier[notifyChildChanged] operator[SEP] Keyword[int] identifier[parentPosition] , Keyword[int] identifier[childPosition] operator[SEP] {
identifier[P] identifier[parent] operator[=] identifier[mParentList] operator[SEP] identifier[get] operat... |
public static void validateReservedDatastreams(DOReader reader)
throws ValidationException {
try {
for (Datastream ds: reader.GetDatastreams(null, null)) {
if ("X".equals(ds.DSControlGrp) || "M".equals(ds.DSControlGrp)) {
validateReservedDatastream(PID... | class class_name[name] begin[{]
method[validateReservedDatastreams, return_type[void], modifier[public static], parameter[reader]] begin[{]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_op... | Keyword[public] Keyword[static] Keyword[void] identifier[validateReservedDatastreams] operator[SEP] identifier[DOReader] identifier[reader] operator[SEP] Keyword[throws] identifier[ValidationException] {
Keyword[try] {
Keyword[for] operator[SEP] identifier[Datastream] identifier[ds] operator[:] ident... |
private void calcRmsd(Point3d[] x, Point3d[] y) {
if (centered) {
innerProduct(y, x);
} else {
// translate to origin
xref = CalcPoint.clonePoint3dArray(x);
xtrans = CalcPoint.centroid(xref);
logger.debug("x centroid: " + xtrans);
xtrans.negate();
CalcPoint.translate(new Vector3d(xtrans), xref)... | class class_name[name] begin[{]
method[calcRmsd, return_type[void], modifier[private], parameter[x, y]] begin[{]
if[member[.centered]] begin[{]
call[.innerProduct, parameter[member[.y], member[.x]]]
else begin[{]
assign[member[.xref], call... | Keyword[private] Keyword[void] identifier[calcRmsd] operator[SEP] identifier[Point3d] operator[SEP] operator[SEP] identifier[x] , identifier[Point3d] operator[SEP] operator[SEP] identifier[y] operator[SEP] {
Keyword[if] operator[SEP] identifier[centered] operator[SEP] {
identifier[innerProduct] opera... |
public List<String> listTypes() throws AtlasServiceException {
final JSONObject jsonObject = callAPIWithQueryParams(API.LIST_TYPES, null);
return extractResults(jsonObject, AtlasClient.RESULTS, new ExtractOperation<String, String>());
} | class class_name[name] begin[{]
method[listTypes, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[JSONObject], jsonObject]
return[call[.extractResults, parameter[member[.jsonObject], member[AtlasClient.RESULTS], ClassCreator(arguments=[], body=None, construc... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[listTypes] operator[SEP] operator[SEP] Keyword[throws] identifier[AtlasServiceException] {
Keyword[final] identifier[JSONObject] identifier[jsonObject] operator[=] identifier[callAPIWithQueryParams] operator[SEP] identifier[AP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.