code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String[] getByJNDI() {
try {
Class<?> dirContext =
Class.forName("javax.naming.directory.DirContext");
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory... | class class_name[name] begin[{]
method[getByJNDI, return_type[type[String]], modifier[public static], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getByJNDI] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[Class] operator[<] operator[?] operator[>] identifier[dirContext] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] l... |
public void updateSession(BackedSession backedSess) {
if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[UPDATE_SESSION]);
}
if (!backedSess.i... | class class_name[name] begin[{]
method[updateSession, return_type[void], modifier[public], parameter[backedSess]] begin[{]
if[binary_operation[call[com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_WAS.isLoggable, parameter[member[Level.... | Keyword[public] Keyword[void] identifier[updateSession] operator[SEP] identifier[BackedSession] identifier[backedSess] operator[SEP] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[websphere] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent]... |
public void marshall(Blueprint blueprint, ProtocolMarshaller protocolMarshaller) {
if (blueprint == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(blueprint.getBlueprintId(), BLUEPRINTID_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[blueprint, protocolMarshaller]] begin[{]
if[binary_operation[member[.blueprint], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Blueprint] identifier[blueprint] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[blueprint] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[... |
public void initializePackageContents()
{
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPack... | class class_name[name] begin[{]
method[initializePackageContents, return_type[void], modifier[public], parameter[]] begin[{]
if[member[.isInitialized]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[member[.isInitialized], literal[true]]
c... | Keyword[public] Keyword[void] identifier[initializePackageContents] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isInitialized] operator[SEP] Keyword[return] operator[SEP] identifier[isInitialized] operator[=] literal[boolean] operator[SEP] identifier[setName] operator[SEP] identifier[eNAME... |
public static int searchNzRowsInX(DMatrixSparseCSC G, DMatrixSparseCSC B, int colB, int pinv[],
int xi[], int w[]) {
int X_rows = G.numCols;
if (xi.length < X_rows)
throw new IllegalArgumentException("xi must be at least G.numCols=" + G.numCols);
... | class class_name[name] begin[{]
method[searchNzRowsInX, return_type[type[int]], modifier[public static], parameter[G, B, colB, pinv, xi, w]] begin[{]
local_variable[type[int], X_rows]
if[binary_operation[member[xi.length], <, member[.X_rows]]] begin[{]
ThrowStatement(expression=ClassCre... | Keyword[public] Keyword[static] Keyword[int] identifier[searchNzRowsInX] operator[SEP] identifier[DMatrixSparseCSC] identifier[G] , identifier[DMatrixSparseCSC] identifier[B] , Keyword[int] identifier[colB] , Keyword[int] identifier[pinv] operator[SEP] operator[SEP] , Keyword[int] identifier[xi] operator[SEP] opera... |
public FallbackMethod getFallbackMethod(Class<?> enclosingType, Method commandMethod, boolean extended) {
if (commandMethod.isAnnotationPresent(HystrixCommand.class)) {
return FALLBACK_METHOD_FINDER.find(enclosingType, commandMethod, extended);
}
return FallbackMethod.ABSENT;
} | class class_name[name] begin[{]
method[getFallbackMethod, return_type[type[FallbackMethod]], modifier[public], parameter[enclosingType, commandMethod, extended]] begin[{]
if[call[commandMethod.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, s... | Keyword[public] identifier[FallbackMethod] identifier[getFallbackMethod] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[enclosingType] , identifier[Method] identifier[commandMethod] , Keyword[boolean] identifier[extended] operator[SEP] {
Keyword[if] operator[SEP] identifier[comm... |
boolean reconstructFile(Path srcPath, Context context)
throws IOException, InterruptedException {
Progressable progress = context;
if (progress == null) {
progress = RaidUtils.NULL_PROGRESSABLE;
}
FileSystem fs = srcPath.getFileSystem(getConf());
FileStatus srcStat = null;
try {... | class class_name[name] begin[{]
method[reconstructFile, return_type[type[boolean]], modifier[default], parameter[srcPath, context]] begin[{]
local_variable[type[Progressable], progress]
if[binary_operation[member[.progress], ==, literal[null]]] begin[{]
assign[me... | Keyword[boolean] identifier[reconstructFile] operator[SEP] identifier[Path] identifier[srcPath] , identifier[Context] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
identifier[Progressable] identifier[progress] operator[=] identifier[context] oper... |
public boolean isDemo() {
if (!isSignedIn()) {
return false;
}
Settings settings = storageService.getSettings();
String baseUrl = settings.getBaseUrl();
return getUser().getName().equals("demo")
&& "http://demo.next-reports.com".equals(baseUrl);
} | class class_name[name] begin[{]
method[isDemo, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[call[.isSignedIn, parameter[]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Settings], settings]
lo... | Keyword[public] Keyword[boolean] identifier[isDemo] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isSignedIn] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[Settings] identifier[settings] operator[=... |
public static void invoke(final Object listener, final Class listenerType) {
if (listenerType == Init.class) {
((Init) listener).init();
return;
}
if (listenerType == Start.class) {
((Start) listener).start();
return;
}
if (listenerType == Ready.class) {
((Ready) listener).ready();
return;
... | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public static], parameter[listener, listenerType]] begin[{]
if[binary_operation[member[.listenerType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=... | Keyword[public] Keyword[static] Keyword[void] identifier[invoke] operator[SEP] Keyword[final] identifier[Object] identifier[listener] , Keyword[final] identifier[Class] identifier[listenerType] operator[SEP] {
Keyword[if] operator[SEP] identifier[listenerType] operator[==] identifier[Init] operator[SEP] Keyword... |
public int readUInt16() throws IOException {
int b1 = in.read();
if (b1 < 0) {
return 0;
}
int b2 = in.read();
if (b2 < 0) {
throw new IOException("Missing byte 2 to read uint16");
}
return unshift2bytes(b1, b2);
} | class class_name[name] begin[{]
method[readUInt16, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], b1]
if[binary_operation[member[.b1], <, literal[0]]] begin[{]
return[literal[0]]
else begin[{]
None
end[}]
loc... | Keyword[public] Keyword[int] identifier[readUInt16] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[int] identifier[b1] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b1] operator[<] Other[0] o... |
protected T newSession(IoSessionInitializer<? extends IoFuture> initializer, IoFuture future, Callable<T> sessionCreator) throws Exception {
T session;
IoProcessorEx<T> processor = getProcessor();
synchronized (processor) {
session = sessionCreator.call();
processor.add(... | class class_name[name] begin[{]
method[newSession, return_type[type[T]], modifier[protected], parameter[initializer, future, sessionCreator]] begin[{]
local_variable[type[T], session]
local_variable[type[IoProcessorEx], processor]
SYNCHRONIZED[member[.processor]] BEGIN[{]
... | Keyword[protected] identifier[T] identifier[newSession] operator[SEP] identifier[IoSessionInitializer] operator[<] operator[?] Keyword[extends] identifier[IoFuture] operator[>] identifier[initializer] , identifier[IoFuture] identifier[future] , identifier[Callable] operator[<] identifier[T] operator[>] identifier[ses... |
public long getCertCacheLifetime()
throws NumberFormatException {
long value = 60*1000;
String property = getProperty(CERT_CACHE_LIFETIME);
if (property != null && property.length() > 0) {
long parsedValue = Long.parseLong(property);
if (parsedValue > 0) {
... | class class_name[name] begin[{]
method[getCertCacheLifetime, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[long], value]
local_variable[type[String], property]
if[binary_operation[binary_operation[member[.property], !=, literal[null]], &&, ... | Keyword[public] Keyword[long] identifier[getCertCacheLifetime] operator[SEP] operator[SEP] Keyword[throws] identifier[NumberFormatException] {
Keyword[long] identifier[value] operator[=] Other[60] operator[*] Other[1000] operator[SEP] identifier[String] identifier[property] operator[=] identifier[getProperty] op... |
private static void unwrapArgs(final Class<?>[] types, final Object[] args) {
if (args == null) {
return;
}
try {
for (int i = 0; i < args.length; ++i) {
args[i] = ReflectionHelper.unwrap(types[i], args[i]);
}
} catch (Exception e) {
... | class class_name[name] begin[{]
method[unwrapArgs, return_type[void], modifier[private static], parameter[types, args]] begin[{]
if[binary_operation[member[.args], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[ForStat... | Keyword[private] Keyword[static] Keyword[void] identifier[unwrapArgs] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[types] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
Keyword[if] oper... |
public void setUtterances(java.util.Collection<UtteranceData> utterances) {
if (utterances == null) {
this.utterances = null;
return;
}
this.utterances = new java.util.ArrayList<UtteranceData>(utterances);
} | class class_name[name] begin[{]
method[setUtterances, return_type[void], modifier[public], parameter[utterances]] begin[{]
if[binary_operation[member[.utterances], ==, literal[null]]] begin[{]
assign[THIS[member[None.utterances]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setUtterances] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[UtteranceData] operator[>] identifier[utterances] operator[SEP] {
Keyword[if] operator[SEP] identifier[utterances] operator[==] Other[n... |
private static String matchPathLists(List<String> basePath, List<String> filePath) {
// start at the beginning of the lists
// iterate while both lists are equal
final StringBuilder relativePath = new StringBuilder();
final ListIterator<String> basePathItr = basePath.listIterator(basePat... | class class_name[name] begin[{]
method[matchPathLists, return_type[type[String]], modifier[private static], parameter[basePath, filePath]] begin[{]
local_variable[type[StringBuilder], relativePath]
local_variable[type[ListIterator], basePathItr]
local_variable[type[ListIterator], filePa... | Keyword[private] Keyword[static] identifier[String] identifier[matchPathLists] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[basePath] , identifier[List] operator[<] identifier[String] operator[>] identifier[filePath] operator[SEP] {
Keyword[final] identifier[StringBuilder... |
public static void addAttributes(final Map<String, Object> attributes, AttributesBuilder attributesBuilder) {
// TODO Figure out how to reliably set other values (like boolean values, dates, times, etc)
for (Map.Entry<String, Object> attributeEntry : attributes.entrySet()) {
addAttribute(att... | class class_name[name] begin[{]
method[addAttributes, return_type[void], modifier[public static], parameter[attributes, attributesBuilder]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=... | Keyword[public] Keyword[static] Keyword[void] identifier[addAttributes] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[attributes] , identifier[AttributesBuilder] identifier[attributesBuilder] operator[SEP] {
Keyword[for] operator[SEP] id... |
@Override
public void accept(final T t) {
if (parallel) {
consumerList.parallelStream().forEach(consumer -> consumer.accept(t));
}
else {
consumerList.forEach(consumer -> consumer.accept(t));
}
} | class class_name[name] begin[{]
method[accept, return_type[void], modifier[public], parameter[t]] begin[{]
if[member[.parallel]] begin[{]
call[consumerList.parallelStream, parameter[]]
else begin[{]
call[consumerList.forEach, parameter[Lam... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[accept] operator[SEP] Keyword[final] identifier[T] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[parallel] operator[SEP] {
identifier[consumerList] operator[SEP] identifier[parallelStream] operator[SEP] op... |
private static List<Validate> createAdminObject(Connector cmd,
List<Failure> failures, ResourceBundle rb, ClassLoader cl)
{
List<Validate> result = new ArrayList<Validate>();
if (cmd.getVersion() != Version.V_10 &&
cmd.getResourceadapter() != null &&
cmd.getResourceadapter()... | class class_name[name] begin[{]
method[createAdminObject, return_type[type[List]], modifier[private static], parameter[cmd, failures, rb, cl]] begin[{]
local_variable[type[List], result]
if[binary_operation[binary_operation[binary_operation[call[cmd.getVersion, parameter[]], !=, member[... | Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Validate] operator[>] identifier[createAdminObject] operator[SEP] identifier[Connector] identifier[cmd] , identifier[List] operator[<] identifier[Failure] operator[>] identifier[failures] , identifier[ResourceBundle] identifier[rb] , identifier... |
synchronized void messagingEngineTerminated(
final SibRaMessagingEngineConnection connection) {
final String methodName = "messagingEngineTerminated";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(this, TRACE, methodName, connection);
... | class class_name[name] begin[{]
method[messagingEngineTerminated, return_type[void], modifier[synchronized], parameter[connection]] begin[{]
local_variable[type[String], methodName]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled,... | Keyword[synchronized] Keyword[void] identifier[messagingEngineTerminated] operator[SEP] Keyword[final] identifier[SibRaMessagingEngineConnection] identifier[connection] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] ide... |
public void awaitForStatePredicate(Predicate<JobExecutionState> predicate, long timeoutMs)
throws InterruptedException, TimeoutException {
Preconditions.checkArgument(timeoutMs >= 0);
if (0 == timeoutMs) {
timeoutMs = Long.MAX_VALUE;
}
long startTimeMs = System.currentTimeMillis();
l... | class class_name[name] begin[{]
method[awaitForStatePredicate, return_type[void], modifier[public], parameter[predicate, timeoutMs]] begin[{]
call[Preconditions.checkArgument, parameter[binary_operation[member[.timeoutMs], >=, literal[0]]]]
if[binary_operation[literal[0], ==, me... | Keyword[public] Keyword[void] identifier[awaitForStatePredicate] operator[SEP] identifier[Predicate] operator[<] identifier[JobExecutionState] operator[>] identifier[predicate] , Keyword[long] identifier[timeoutMs] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[TimeoutException] {
... |
public Set<OWLClassExpression> getNestedClassExpressions() {
Set<OWLClassExpression> subConcepts = new HashSet<OWLClassExpression>();
for (OWLAxiom ax : justification) {
subConcepts.addAll(ax.getNestedClassExpressions());
}
return subConcepts;
} | class class_name[name] begin[{]
method[getNestedClassExpressions, return_type[type[Set]], modifier[public], parameter[]] begin[{]
local_variable[type[Set], subConcepts]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvo... | Keyword[public] identifier[Set] operator[<] identifier[OWLClassExpression] operator[>] identifier[getNestedClassExpressions] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[OWLClassExpression] operator[>] identifier[subConcepts] operator[=] Keyword[new] identifier[HashSet] operator[<] identi... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
String name) {
GLOSSARY_PATH_TEMPLATE.validate(name, "deleteGlossary");
DeleteGlossaryRequest reque... | class class_name[name] begin[{]
method[deleteGlossaryAsync, return_type[type[OperationFuture]], modifier[final public], parameter[name]] begin[{]
call[GLOSSARY_PATH_TEMPLATE.validate, parameter[member[.name], literal["deleteGlossary"]]]
local_variable[type[DeleteGlossaryRequest], reques... | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[DeleteGlossaryResponse] , identifier[DeleteGlossaryMetadata] operator[>] identifier[deleteGlossaryAsync] operator[SEP] identifier[String] identifier[name] oper... |
public int getPublicPort() {
if (publicPort == -1) {
String sport = System.getenv("PUBLIC_WEB_PORT");
if (!Str.isEmpty(sport)) {
publicPort = Integer.parseInt(sport);
}
}
if (publicPort == -1) {
publicPort = getPort();
}
... | class class_name[name] begin[{]
method[getPublicPort, return_type[type[int]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.publicPort], ==, literal[1]]] begin[{]
local_variable[type[String], sport]
if[call[Str.isEmpty, parameter[member[... | Keyword[public] Keyword[int] identifier[getPublicPort] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[publicPort] operator[==] operator[-] Other[1] operator[SEP] {
identifier[String] identifier[sport] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] lit... |
private boolean isSp3Carbon(IAtom atom, int deg) {
Integer elem = atom.getAtomicNumber();
Integer hcnt = atom.getImplicitHydrogenCount();
if (elem == null || hcnt == null) return false;
if (elem == 6 && hcnt <= 1 && deg + hcnt == 4) {
// more expensive check, look one out and... | class class_name[name] begin[{]
method[isSp3Carbon, return_type[type[boolean]], modifier[private], parameter[atom, deg]] begin[{]
local_variable[type[Integer], elem]
local_variable[type[Integer], hcnt]
if[binary_operation[binary_operation[member[.elem], ==, literal[null]], ||, b... | Keyword[private] Keyword[boolean] identifier[isSp3Carbon] operator[SEP] identifier[IAtom] identifier[atom] , Keyword[int] identifier[deg] operator[SEP] {
identifier[Integer] identifier[elem] operator[=] identifier[atom] operator[SEP] identifier[getAtomicNumber] operator[SEP] operator[SEP] operator[SEP] identifi... |
private String getDataSource(Set<Provenance> provenances)
{
if(provenances.isEmpty()) return "N/A";
Set<String> dsNames = new TreeSet<String>();
for (Provenance provenance : provenances)
{
String name = provenance.getDisplayName();
if(name == null)
name = provenance.getStandardName();
if(name ... | class class_name[name] begin[{]
method[getDataSource, return_type[type[String]], modifier[private], parameter[provenances]] begin[{]
if[call[provenances.isEmpty, parameter[]]] begin[{]
return[literal["N/A"]]
else begin[{]
None
end[}]
local_variable[type[Set], dsNames]
... | Keyword[private] identifier[String] identifier[getDataSource] operator[SEP] identifier[Set] operator[<] identifier[Provenance] operator[>] identifier[provenances] operator[SEP] {
Keyword[if] operator[SEP] identifier[provenances] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[... |
@Override
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) {
return (Point2D) srcPt.clone();
} | class class_name[name] begin[{]
method[getPoint2D, return_type[type[Point2D]], modifier[public], parameter[srcPt, dstPt]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=srcPt, selectors=[], type_arguments=None), type=Ref... | annotation[@] identifier[Override] Keyword[public] identifier[Point2D] identifier[getPoint2D] operator[SEP] identifier[Point2D] identifier[srcPt] , identifier[Point2D] identifier[dstPt] operator[SEP] {
Keyword[return] operator[SEP] identifier[Point2D] operator[SEP] identifier[srcPt] operator[SEP] identifier[clo... |
public static <T> T eachLine(URL url, int firstLine, @ClosureParams(value = FromString.class, options = {"String", "String,Integer"}) Closure<T> closure) throws IOException {
return IOGroovyMethods.eachLine(url.openConnection().getInputStream(), firstLine, closure);
} | class class_name[name] begin[{]
method[eachLine, return_type[type[T]], modifier[public static], parameter[url, firstLine, closure]] begin[{]
return[call[IOGroovyMethods.eachLine, parameter[call[url.openConnection, parameter[]], member[.firstLine], member[.closure]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[eachLine] operator[SEP] identifier[URL] identifier[url] , Keyword[int] identifier[firstLine] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[FromString] operator[SEP] Keyword... |
private void drawYLabel(Graphics2D chartGraphics) {
if (yAxisLabel != null) {
// Strings are drawn from the baseline position of the leftmost char.
int yPosYAxisLabel = heatMapC.y + (yAxisLabelSize.width / 2);
int xPosYAxisLabel = (margin / 2) + yAxisLabelAscent;
chartGraphics.setFont(axisL... | class class_name[name] begin[{]
method[drawYLabel, return_type[void], modifier[private], parameter[chartGraphics]] begin[{]
if[binary_operation[member[.yAxisLabel], !=, literal[null]]] begin[{]
local_variable[type[int], yPosYAxisLabel]
local_variable[type[int], xPosYAxis... | Keyword[private] Keyword[void] identifier[drawYLabel] operator[SEP] identifier[Graphics2D] identifier[chartGraphics] operator[SEP] {
Keyword[if] operator[SEP] identifier[yAxisLabel] operator[!=] Other[null] operator[SEP] {
Keyword[int] identifier[yPosYAxisLabel] operator[=] identifier[heatMapC] operat... |
public void submitContextAndServiceString(final String evaluatorConfigurationString,
final String contextConfigurationString,
final String serviceConfigurationString) {
if (evaluatorConfigurationString.isEmpty()) {
throw n... | class class_name[name] begin[{]
method[submitContextAndServiceString, return_type[void], modifier[public], parameter[evaluatorConfigurationString, contextConfigurationString, serviceConfigurationString]] begin[{]
if[call[evaluatorConfigurationString.isEmpty, parameter[]]] begin[{]
T... | Keyword[public] Keyword[void] identifier[submitContextAndServiceString] operator[SEP] Keyword[final] identifier[String] identifier[evaluatorConfigurationString] , Keyword[final] identifier[String] identifier[contextConfigurationString] , Keyword[final] identifier[String] identifier[serviceConfigurationString] operato... |
@Override
public boolean delete()
{
String path = PrivilegedFileHelper.getAbsolutePath(this);
WeakReference<SwapFile> currentValue = CURRENT_SWAP_FILES.get(path);
if (currentValue == null || (currentValue.get() == this || currentValue.get() == null))
{
CURRENT_SWAP_FILES.remove(pa... | class class_name[name] begin[{]
method[delete, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
local_variable[type[String], path]
local_variable[type[WeakReference], currentValue]
if[binary_operation[binary_operation[member[.currentValue], ==, literal[null]],... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[delete] operator[SEP] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[PrivilegedFileHelper] operator[SEP] identifier[getAbsolutePath] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[WeakRe... |
protected URL transformURL(URL link, ReferenceContext references) {
if (URISchemeType.FILE.isURL(link)) {
File filename = FileSystem.convertURLToFile(link);
if (Strings.isEmpty(filename.getName())) {
// This is a link to the local document.
final String anchor = transformURLAnchor(filename, link.getRef(... | class class_name[name] begin[{]
method[transformURL, return_type[type[URL]], modifier[protected], parameter[link, references]] begin[{]
if[call[URISchemeType.FILE.isURL, parameter[member[.link]]]] begin[{]
local_variable[type[File], filename]
if[call[Strings.... | Keyword[protected] identifier[URL] identifier[transformURL] operator[SEP] identifier[URL] identifier[link] , identifier[ReferenceContext] identifier[references] operator[SEP] {
Keyword[if] operator[SEP] identifier[URISchemeType] operator[SEP] identifier[FILE] operator[SEP] identifier[isURL] operator[SEP] identi... |
protected Job postJobWithDescription(JSONObject jobDescription, long notBeforeRealtimeElapsed) {
String jobId = UUID.randomUUID().toString();
InternalJob job = new InternalJob(jobId, jobDescription, notBeforeRealtimeElapsed);
return post(job);
} | class class_name[name] begin[{]
method[postJobWithDescription, return_type[type[Job]], modifier[protected], parameter[jobDescription, notBeforeRealtimeElapsed]] begin[{]
local_variable[type[String], jobId]
local_variable[type[InternalJob], job]
return[call[.post, parameter[member[.job]]... | Keyword[protected] identifier[Job] identifier[postJobWithDescription] operator[SEP] identifier[JSONObject] identifier[jobDescription] , Keyword[long] identifier[notBeforeRealtimeElapsed] operator[SEP] {
identifier[String] identifier[jobId] operator[=] identifier[UUID] operator[SEP] identifier[randomUUID] operat... |
public org.valkyriercp.binding.validation.ValidationResults validate(Object object, String propertyName) {
// Forms can have different types of objects, so when type of object
// changes, messages that are already listed on the previous type must
// be removed. If evaluating the whole object (propertyName == null... | class class_name[name] begin[{]
method[validate, return_type[type[org]], modifier[public], parameter[object, propertyName]] begin[{]
if[binary_operation[binary_operation[member[.propertyName], ==, literal[null]], ||, binary_operation[binary_operation[member[.objectClass], !=, literal[null]], &&... | Keyword[public] identifier[org] operator[SEP] identifier[valkyriercp] operator[SEP] identifier[binding] operator[SEP] identifier[validation] operator[SEP] identifier[ValidationResults] identifier[validate] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[propertyName] operator[SEP] ... |
boolean isStarvedForFairShare(JobInfo info, TaskType type) {
int desiredFairShare = (int) Math.floor(Math.min(
(fairTasks(info, type) + 1) / 2, runnableTasks(info, type)));
return (runningTasks(info, type) < desiredFairShare);
} | class class_name[name] begin[{]
method[isStarvedForFairShare, return_type[type[boolean]], modifier[default], parameter[info, type]] begin[{]
local_variable[type[int], desiredFairShare]
return[binary_operation[call[.runningTasks, parameter[member[.info], member[.type]]], <, member[.desiredFairSh... | Keyword[boolean] identifier[isStarvedForFairShare] operator[SEP] identifier[JobInfo] identifier[info] , identifier[TaskType] identifier[type] operator[SEP] {
Keyword[int] identifier[desiredFairShare] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[floor] operator[S... |
public static boolean loadPropertiesFromClasspath(String _propertiesFile, Properties _properties) {
if (_properties == null) {
throw new IllegalArgumentException("Properties object required");
}
try {
Properties loaded = loadPropertiesFromClasspath(_propertiesFile);
... | class class_name[name] begin[{]
method[loadPropertiesFromClasspath, return_type[type[boolean]], modifier[public static], parameter[_propertiesFile, _properties]] begin[{]
if[binary_operation[member[._properties], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(ar... | Keyword[public] Keyword[static] Keyword[boolean] identifier[loadPropertiesFromClasspath] operator[SEP] identifier[String] identifier[_propertiesFile] , identifier[Properties] identifier[_properties] operator[SEP] {
Keyword[if] operator[SEP] identifier[_properties] operator[==] Other[null] operator[SEP] {
... |
public static String lambdaParameterName( Serializable lambda )
{
SerializedLambda serialized = serializedLambda( lambda );
Parameter[] parameters = lambdaMethod( serialized ).getParameters();
int bound;
switch ( serialized.getImplMethodKind() )
{
case REF_invokeStati... | class class_name[name] begin[{]
method[lambdaParameterName, return_type[type[String]], modifier[public static], parameter[lambda]] begin[{]
local_variable[type[SerializedLambda], serialized]
local_variable[type[Parameter], parameters]
local_variable[type[int], bound]
SwitchState... | Keyword[public] Keyword[static] identifier[String] identifier[lambdaParameterName] operator[SEP] identifier[Serializable] identifier[lambda] operator[SEP] {
identifier[SerializedLambda] identifier[serialized] operator[=] identifier[serializedLambda] operator[SEP] identifier[lambda] operator[SEP] operator[SEP] id... |
public static <T extends MethodDescription> ElementMatcher.Junction<T> isOverriddenFromGeneric(ElementMatcher<? super TypeDescription.Generic> matcher) {
return new MethodOverrideMatcher<T>(matcher);
} | class class_name[name] begin[{]
method[isOverriddenFromGeneric, return_type[type[ElementMatcher]], modifier[public static], parameter[matcher]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=matcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, const... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[MethodDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isOverriddenFromGeneric] operator[SEP] identifier[ElementMatcher] operator[<] operator[?] Ke... |
public static <T> T readAsObjectOf(Class<T> clazz, String value) {
final ObjectMapper mapper = new ObjectMapper();
try {
return mapper.readValue(value, clazz);
} catch (IOException e) {
LOGGER.error(e.getMessage(), e.fillInStackTrace());
}
return null;
... | class class_name[name] begin[{]
method[readAsObjectOf, return_type[type[T]], modifier[public static], parameter[clazz, value]] begin[{]
local_variable[type[ObjectMapper], mapper]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[readAsObjectOf] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[String] identifier[value] operator[SEP] {
Keyword[final] identifier[ObjectMapper] identifier[mapper]... |
public static <S1, I1, T1, SP, TP, S2, I2, T2> Mapping<S1, S2> copy(AutomatonCopyMethod method,
UniversalAutomaton<S1, ? super I1, T1, ? extends SP, ? extends TP> in,
Collectio... | class class_name[name] begin[{]
method[copy, return_type[type[Mapping]], modifier[public static], parameter[method, in, inputs, out, inputsMapping, stateFilter, transFilter]] begin[{]
return[call[.copy, parameter[member[.method], member[.in], member[.inputs], member[.out], member[.inputsMapping], Lambd... | Keyword[public] Keyword[static] operator[<] identifier[S1] , identifier[I1] , identifier[T1] , identifier[SP] , identifier[TP] , identifier[S2] , identifier[I2] , identifier[T2] operator[>] identifier[Mapping] operator[<] identifier[S1] , identifier[S2] operator[>] identifier[copy] operator[SEP] identifier[Auto... |
public PartialResponseChangesType<WebFacesPartialResponseDescriptor> getOrCreateChanges()
{
Node node = model.getOrCreate("changes");
PartialResponseChangesType<WebFacesPartialResponseDescriptor> changes = new PartialResponseChangesTypeImpl<WebFacesPartialResponseDescriptor>(this, "changes", model, node)... | class class_name[name] begin[{]
method[getOrCreateChanges, return_type[type[PartialResponseChangesType]], modifier[public], parameter[]] begin[{]
local_variable[type[Node], node]
local_variable[type[PartialResponseChangesType], changes]
return[member[.changes]]
end[}]
END[}] | Keyword[public] identifier[PartialResponseChangesType] operator[<] identifier[WebFacesPartialResponseDescriptor] operator[>] identifier[getOrCreateChanges] operator[SEP] operator[SEP] {
identifier[Node] identifier[node] operator[=] identifier[model] operator[SEP] identifier[getOrCreate] operator[SEP] literal[Str... |
private Method[] getTimerMethods(BeanMetaData bmd) {
List<TimerMethodData> timerMethodList = bmd.ivInitData.ivTimerMethods;
Method[] timerMethods;
if (timerMethodList == null) {
Method timeoutMethod = getTimeoutMethod(bmd);
timerMethods = timeoutMethod == null ? null : n... | class class_name[name] begin[{]
method[getTimerMethods, return_type[type[Method]], modifier[private], parameter[bmd]] begin[{]
local_variable[type[List], timerMethodList]
local_variable[type[Method], timerMethods]
if[binary_operation[member[.timerMethodList], ==, literal[null]]]... | Keyword[private] identifier[Method] operator[SEP] operator[SEP] identifier[getTimerMethods] operator[SEP] identifier[BeanMetaData] identifier[bmd] operator[SEP] {
identifier[List] operator[<] identifier[TimerMethodData] operator[>] identifier[timerMethodList] operator[=] identifier[bmd] operator[SEP] identifier[... |
public static void setExpiresHours(@NotNull HttpServletResponse response, int hours) {
Date expiresDate = DateUtils.addHours(new Date(), hours);
setExpires(response, expiresDate);
} | class class_name[name] begin[{]
method[setExpiresHours, return_type[void], modifier[public static], parameter[response, hours]] begin[{]
local_variable[type[Date], expiresDate]
call[.setExpires, parameter[member[.response], member[.expiresDate]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[setExpiresHours] operator[SEP] annotation[@] identifier[NotNull] identifier[HttpServletResponse] identifier[response] , Keyword[int] identifier[hours] operator[SEP] {
identifier[Date] identifier[expiresDate] operator[=] identifier[DateUtils] operator[SEP]... |
private String formatElement(final StackTraceElement element, final Map<String, String> classMap) {
StringBuilder buf = new StringBuilder("\tat ");
buf.append(element);
String className = element.getClassName();
String classDetails = classMap.get(className);
if (classDetails == n... | class class_name[name] begin[{]
method[formatElement, return_type[type[String]], modifier[private], parameter[element, classMap]] begin[{]
local_variable[type[StringBuilder], buf]
call[buf.append, parameter[member[.element]]]
local_variable[type[String], className]
local... | Keyword[private] identifier[String] identifier[formatElement] operator[SEP] Keyword[final] identifier[StackTraceElement] identifier[element] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[classMap] operator[SEP] {
identifier[StringBuilder] identifier... |
public void updateTitle(boolean truncating) {
String title = getTitle(truncating);
Element element = getElement();
if (title == null) {
element.removeAttribute(CmsDomUtil.Attribute.title.name());
} else {
element.setAttribute(CmsDomUtil.Attribute.title.name(), ti... | class class_name[name] begin[{]
method[updateTitle, return_type[void], modifier[public], parameter[truncating]] begin[{]
local_variable[type[String], title]
local_variable[type[Element], element]
if[binary_operation[member[.title], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[void] identifier[updateTitle] operator[SEP] Keyword[boolean] identifier[truncating] operator[SEP] {
identifier[String] identifier[title] operator[=] identifier[getTitle] operator[SEP] identifier[truncating] operator[SEP] operator[SEP] identifier[Element] identifier[element] operator[=] id... |
Object resolveTypeReference(TypeMirror type) {
Object result = Void.TYPE;
if (type.getKind().isPrimitive()) {
result = resolvePrimitiveTypeReference(type);
} else if (type.getKind() == ARRAY) {
ArrayType arrayType = (ArrayType) type;
TypeMirror componentType =... | class class_name[name] begin[{]
method[resolveTypeReference, return_type[type[Object]], modifier[default], parameter[type]] begin[{]
local_variable[type[Object], result]
if[call[type.getKind, parameter[]]] begin[{]
assign[member[.result], call[.resolvePrimitiveTy... | identifier[Object] identifier[resolveTypeReference] operator[SEP] identifier[TypeMirror] identifier[type] operator[SEP] {
identifier[Object] identifier[result] operator[=] identifier[Void] operator[SEP] identifier[TYPE] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[getKind] op... |
public FastItemAdapter<Item> set(int position, Item item) {
getItemAdapter().set(position, item);
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[FastItemAdapter]], modifier[public], parameter[position, item]] begin[{]
call[.getItemAdapter, parameter[]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[FastItemAdapter] operator[<] identifier[Item] operator[>] identifier[set] operator[SEP] Keyword[int] identifier[position] , identifier[Item] identifier[item] operator[SEP] {
identifier[getItemAdapter] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[p... |
public static Messaging getMessaging(final Jaxb2Marshaller jaxb2Marshaller, final WebServiceMessage message) {
SoapHeader soapHeader = ((SoapMessage) message).getSoapHeader();
if (soapHeader == null) {
throw new RuntimeException("The ebMS header is missing (no SOAP header found in SOAP requ... | class class_name[name] begin[{]
method[getMessaging, return_type[type[Messaging]], modifier[public static], parameter[jaxb2Marshaller, message]] begin[{]
local_variable[type[SoapHeader], soapHeader]
if[binary_operation[member[.soapHeader], ==, literal[null]]] begin[{]
ThrowS... | Keyword[public] Keyword[static] identifier[Messaging] identifier[getMessaging] operator[SEP] Keyword[final] identifier[Jaxb2Marshaller] identifier[jaxb2Marshaller] , Keyword[final] identifier[WebServiceMessage] identifier[message] operator[SEP] {
identifier[SoapHeader] identifier[soapHeader] operator[=] operato... |
public static FastDateFormat getTimeInstance(final int style, final TimeZone timeZone, final Locale locale) {
return cache.getTimeInstance(style, timeZone, locale);
} | class class_name[name] begin[{]
method[getTimeInstance, return_type[type[FastDateFormat]], modifier[public static], parameter[style, timeZone, locale]] begin[{]
return[call[cache.getTimeInstance, parameter[member[.style], member[.timeZone], member[.locale]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[FastDateFormat] identifier[getTimeInstance] operator[SEP] Keyword[final] Keyword[int] identifier[style] , Keyword[final] identifier[TimeZone] identifier[timeZone] , Keyword[final] identifier[Locale] identifier[locale] operator[SEP] {
Keyword[return] identifier[cache] ... |
public static RedisConnectionException create(SocketAddress remoteAddress, Throwable cause) {
return create(remoteAddress == null ? null : remoteAddress.toString(), cause);
} | class class_name[name] begin[{]
method[create, return_type[type[RedisConnectionException]], modifier[public static], parameter[remoteAddress, cause]] begin[{]
return[call[.create, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=remoteAddress, postfix_operators=[], ... | Keyword[public] Keyword[static] identifier[RedisConnectionException] identifier[create] operator[SEP] identifier[SocketAddress] identifier[remoteAddress] , identifier[Throwable] identifier[cause] operator[SEP] {
Keyword[return] identifier[create] operator[SEP] identifier[remoteAddress] operator[==] Other[null] ... |
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.BFM__FM_NAME:
return getFMName();
case AfplibPackage.BFM__TRIPLETS:
return getTriplets();
}
return super.eGet(featureID, resolve, coreType);
} | class class_name[name] begin[{]
method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BFM__FM_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
K... |
public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("webhook", slackNotifications.getWebhook(), true)
.withParam("username", slackNotifications.getUsern... | class class_name[name] begin[{]
method[updateSlackService, return_type[type[SlackService]], modifier[public], parameter[projectIdOrPath, slackNotifications]] begin[{]
local_variable[type[GitLabApiForm], formData]
local_variable[type[Response], response]
return[call[response.readEntity, ... | Keyword[public] identifier[SlackService] identifier[updateSlackService] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[SlackService] identifier[slackNotifications] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
identifier[GitLabApiForm] identifier[formData] operator[=]... |
@Override
public PType defaultPType(PType type, Newquestion question)
throws AnalysisException
{
type.setResolved(true);
return type;
} | class class_name[name] begin[{]
method[defaultPType, return_type[type[PType]], modifier[public], parameter[type, question]] begin[{]
call[type.setResolved, parameter[literal[true]]]
return[member[.type]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[PType] identifier[defaultPType] operator[SEP] identifier[PType] identifier[type] , identifier[Newquestion] identifier[question] operator[SEP] Keyword[throws] identifier[AnalysisException] {
identifier[type] operator[SEP] identifier[setResolved] opera... |
public static void getFreeSlots(Map<String, SupervisorInfo> supervisorInfos,
StormClusterState stormClusterState) throws Exception {
Map<String, Assignment> assignments = Cluster.get_all_assignment(stormClusterState, null);
for (Entry<String, Assignment> entry : assig... | class class_name[name] begin[{]
method[getFreeSlots, return_type[void], modifier[public static], parameter[supervisorInfos, stormClusterState]] begin[{]
local_variable[type[Map], assignments]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], decla... | Keyword[public] Keyword[static] Keyword[void] identifier[getFreeSlots] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[SupervisorInfo] operator[>] identifier[supervisorInfos] , identifier[StormClusterState] identifier[stormClusterState] operator[SEP] Keyword[throws] identifier[Exception] {
... |
public boolean removeParameter(String paramName)
throws IllegalArgumentException {
log.trace("enter PostMethod.removeParameter(String)");
if (paramName == null) {
throw new IllegalArgumentException(
"Argument passed to removeParameter(String) cannot be null");
... | class class_name[name] begin[{]
method[removeParameter, return_type[type[boolean]], modifier[public], parameter[paramName]] begin[{]
call[log.trace, parameter[literal["enter PostMethod.removeParameter(String)"]]]
if[binary_operation[member[.paramName], ==, literal[null]]] begin[... | Keyword[public] Keyword[boolean] identifier[removeParameter] operator[SEP] identifier[String] identifier[paramName] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[S... |
@Override
public NIOClientSocketHandler createClientHandler(NIOTcpMultiplexer multiplexer, SocketChannel socketChannel)
{
try
{
String clientId = UUIDProvider.getInstance().getShortUUID();
NIOTcpPacketTransport transport = new NIOTcpPacketTransport(clientId,multiplexer,socketChannel,settings);
ClientP... | class class_name[name] begin[{]
method[createClientHandler, return_type[type[NIOClientSocketHandler]], modifier[public], parameter[multiplexer, socketChannel]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocati... | annotation[@] identifier[Override] Keyword[public] identifier[NIOClientSocketHandler] identifier[createClientHandler] operator[SEP] identifier[NIOTcpMultiplexer] identifier[multiplexer] , identifier[SocketChannel] identifier[socketChannel] operator[SEP] {
Keyword[try] {
identifier[String] identifier[... |
public void put(String subscript, Object value) {
if (value == null) {
values.remove(subscript);
} else {
values.put(subscript, value);
}
} | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[subscript, value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[values.remove, parameter[member[.subscript]]]
else begin[{]
... | Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[subscript] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
identifier[values] operator[SEP] identifier[remove] operator... |
public static String currentDate(String dateFormat, TestContext context) {
return new CurrentDateFunction().execute(Collections.singletonList(dateFormat), context);
} | class class_name[name] begin[{]
method[currentDate, return_type[type[String]], modifier[public static], parameter[dateFormat, context]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvo... | Keyword[public] Keyword[static] identifier[String] identifier[currentDate] operator[SEP] identifier[String] identifier[dateFormat] , identifier[TestContext] identifier[context] operator[SEP] {
Keyword[return] Keyword[new] identifier[CurrentDateFunction] operator[SEP] operator[SEP] operator[SEP] identifier[execu... |
public void setLabelAnimator(LabelAnimator labelAnimator) {
if (labelAnimator == null) {
this.labelAnimator = new DefaultLabelAnimator();
} else {
if (this.labelAnimator != null) {
labelAnimator.setLabelAnchored(getInputWidget(), getFloatingLabel(), this.labelAnim... | class class_name[name] begin[{]
method[setLabelAnimator, return_type[void], modifier[public], parameter[labelAnimator]] begin[{]
if[binary_operation[member[.labelAnimator], ==, literal[null]]] begin[{]
assign[THIS[member[None.labelAnimator]], ClassCreator(arguments=[], b... | Keyword[public] Keyword[void] identifier[setLabelAnimator] operator[SEP] identifier[LabelAnimator] identifier[labelAnimator] operator[SEP] {
Keyword[if] operator[SEP] identifier[labelAnimator] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[labelAnimator] operator[=] Ke... |
private void collectConfigs(GroupHierarchyConfig hierarchyConfig, List<CreateServerConfig> serverConfigs) {
hierarchyConfig.getSubitems().stream().forEach(config -> {
if (config instanceof ServerConfig) {
serverConfigs.addAll(Arrays.asList(((ServerConfig)config).getServerConfig()));
... | class class_name[name] begin[{]
method[collectConfigs, return_type[void], modifier[private], parameter[hierarchyConfig, serverConfigs]] begin[{]
call[hierarchyConfig.getSubitems, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[collectConfigs] operator[SEP] identifier[GroupHierarchyConfig] identifier[hierarchyConfig] , identifier[List] operator[<] identifier[CreateServerConfig] operator[>] identifier[serverConfigs] operator[SEP] {
identifier[hierarchyConfig] operator[SEP] identifier[getSubitem... |
public boolean addTag(String tagName, String tagValue) {
boolean result = false;
if (firstIFD != null) {
if (firstIFD.containsTagId(TiffTags.getTagId(tagName))) {
firstIFD.removeTag(tagName);
}
firstIFD.addTag(tagName, tagValue);
createMetadataDictionary();
}
return resul... | class class_name[name] begin[{]
method[addTag, return_type[type[boolean]], modifier[public], parameter[tagName, tagValue]] begin[{]
local_variable[type[boolean], result]
if[binary_operation[member[.firstIFD], !=, literal[null]]] begin[{]
if[call[firstIFD.contains... | Keyword[public] Keyword[boolean] identifier[addTag] operator[SEP] identifier[String] identifier[tagName] , identifier[String] identifier[tagValue] operator[SEP] {
Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[firstIFD] operator[!=] Other[null... |
@Override
public void unregisterBroadcastListener(String broadcastName, BroadcastListener broadcastListener) {
List<BroadcastListener> listeners = broadcastListeners.get(broadcastName);
if (listeners == null) {
LOG.error("trying to unregister a listener for broadcast \"" + broadcastName
... | class class_name[name] begin[{]
method[unregisterBroadcastListener, return_type[void], modifier[public], parameter[broadcastName, broadcastListener]] begin[{]
local_variable[type[List], listeners]
if[binary_operation[member[.listeners], ==, literal[null]]] begin[{]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[unregisterBroadcastListener] operator[SEP] identifier[String] identifier[broadcastName] , identifier[BroadcastListener] identifier[broadcastListener] operator[SEP] {
identifier[List] operator[<] identifier[BroadcastListener] operator[>]... |
static public BigDecimal multiplyRound(final BigDecimal x, final BigInteger n) {
BigDecimal resul = x.multiply(new BigDecimal(n));
/* The estimation of the absolute error in the result is |n*err(x)|
*/
MathContext mc = new MathContext(n.compareTo(BigInteger.ZERO) != 0 ? x.precision() : ... | class class_name[name] begin[{]
method[multiplyRound, return_type[type[BigDecimal]], modifier[public static], parameter[x, n]] begin[{]
local_variable[type[BigDecimal], resul]
local_variable[type[MathContext], mc]
return[call[resul.round, parameter[member[.mc]]]]
end[}]
END[}] | Keyword[static] Keyword[public] identifier[BigDecimal] identifier[multiplyRound] operator[SEP] Keyword[final] identifier[BigDecimal] identifier[x] , Keyword[final] identifier[BigInteger] identifier[n] operator[SEP] {
identifier[BigDecimal] identifier[resul] operator[=] identifier[x] operator[SEP] identifier[mul... |
static String expandHiveAuxJarsPath(String original) throws IOException {
if (original == null || original.contains(".jar"))
return original;
File[] files = new File(original).listFiles();
if (files == null || files.length == 0) {
LOG.info("No files in to expand in aux jar path. Returning orig... | class class_name[name] begin[{]
method[expandHiveAuxJarsPath, return_type[type[String]], modifier[static], parameter[original]] begin[{]
if[binary_operation[binary_operation[member[.original], ==, literal[null]], ||, call[original.contains, parameter[literal[".jar"]]]]] begin[{]
return[member[.... | Keyword[static] identifier[String] identifier[expandHiveAuxJarsPath] operator[SEP] identifier[String] identifier[original] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[original] operator[==] Other[null] operator[||] identifier[original] operator[SEP] identifier[con... |
private boolean checkArrivedY(double extrp, double sy, double dy)
{
final double y = transformable.getY();
if (sy < 0 && y <= dy || sy >= 0 && y >= dy)
{
transformable.moveLocation(extrp, 0, dy - y);
return true;
}
return false;
} | class class_name[name] begin[{]
method[checkArrivedY, return_type[type[boolean]], modifier[private], parameter[extrp, sy, dy]] begin[{]
local_variable[type[double], y]
if[binary_operation[binary_operation[binary_operation[member[.sy], <, literal[0]], &&, binary_operation[member[.y], <=,... | Keyword[private] Keyword[boolean] identifier[checkArrivedY] operator[SEP] Keyword[double] identifier[extrp] , Keyword[double] identifier[sy] , Keyword[double] identifier[dy] operator[SEP] {
Keyword[final] Keyword[double] identifier[y] operator[=] identifier[transformable] operator[SEP] identifier[getY] operato... |
private void isScrolledTo(String action, String expected) {
WebElement webElement = getWebElement();
long elementPosition = webElement.getLocation().getY();
JavascriptExecutor js = (JavascriptExecutor) driver;
int scrollHeight = ((Number) js.executeScript("return document.documentElement... | class class_name[name] begin[{]
method[isScrolledTo, return_type[void], modifier[private], parameter[action, expected]] begin[{]
local_variable[type[WebElement], webElement]
local_variable[type[long], elementPosition]
local_variable[type[JavascriptExecutor], js]
local_variable[t... | Keyword[private] Keyword[void] identifier[isScrolledTo] operator[SEP] identifier[String] identifier[action] , identifier[String] identifier[expected] operator[SEP] {
identifier[WebElement] identifier[webElement] operator[=] identifier[getWebElement] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identi... |
public static boolean isSubset(Collection<Dimension> subset, Collection<Dimension> set) {
for (Dimension d : subset) {
if (!(set.contains(d)))
return false;
}
return true;
} | class class_name[name] begin[{]
method[isSubset, return_type[type[boolean]], modifier[public static], parameter[subset, set]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operat... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSubset] operator[SEP] identifier[Collection] operator[<] identifier[Dimension] operator[>] identifier[subset] , identifier[Collection] operator[<] identifier[Dimension] operator[>] identifier[set] operator[SEP] {
Keyword[for] operator[SEP] identifier... |
private void accessBallModel(final JRebirthEvent event) {
switch (event.eventType()) {
case ACCESS_COMMAND:
case ACCESS_CONTROLLER:
case ACCESS_MODEL:
case ACCESS_SERVICE:
case ACCESS_VIEW:
// final BallModel ballModel = getModel... | class class_name[name] begin[{]
method[accessBallModel, return_type[void], modifier[private], parameter[event]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['ACCESS_COMMAND', 'ACCESS_CONTROLLER', 'ACCESS_MODEL', 'ACCESS_SERVICE', 'ACCESS_VIEW'], statements=[StatementExpression(expression=M... | Keyword[private] Keyword[void] identifier[accessBallModel] operator[SEP] Keyword[final] identifier[JRebirthEvent] identifier[event] operator[SEP] {
Keyword[switch] operator[SEP] identifier[event] operator[SEP] identifier[eventType] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[A... |
public void setARGB(int a, int r, int g, int b){
setValue(Pixel.argb(a, r, g, b));
} | class class_name[name] begin[{]
method[setARGB, return_type[void], modifier[public], parameter[a, r, g, b]] begin[{]
call[.setValue, parameter[call[Pixel.argb, parameter[member[.a], member[.r], member[.g], member[.b]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setARGB] operator[SEP] Keyword[int] identifier[a] , Keyword[int] identifier[r] , Keyword[int] identifier[g] , Keyword[int] identifier[b] operator[SEP] {
identifier[setValue] operator[SEP] identifier[Pixel] operator[SEP] identifier[argb] operator[SEP] identifier[a] , i... |
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TypesPackage.JVM_COMPONENT_TYPE__ARRAY_TYPE:
return arrayType != null;
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_COMPONENT_TYPE__ARRAY_TYPE, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selector... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_COMPONENT_TYPE... |
public boolean verifyMessageSignature(String message, PublicKey publicKey) {
// extract the type and signature parameters
Map<String, String> parsed = parseJSON(message);
return verifySignature(parsed, publicKey);
} | class class_name[name] begin[{]
method[verifyMessageSignature, return_type[type[boolean]], modifier[public], parameter[message, publicKey]] begin[{]
local_variable[type[Map], parsed]
return[call[.verifySignature, parameter[member[.parsed], member[.publicKey]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[verifyMessageSignature] operator[SEP] identifier[String] identifier[message] , identifier[PublicKey] identifier[publicKey] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parsed] operator[=] identifier[parseJ... |
public void setValue(Expression newValue)
{
if (newValue != value)
{
NotificationChain msgs = null;
if (value != null)
msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SimpleAntlrPackage.NOT_EXPRESSION__VALUE, null, msgs);
if (newValue != null)
ms... | class class_name[name] begin[{]
method[setValue, return_type[void], modifier[public], parameter[newValue]] begin[{]
if[binary_operation[member[.newValue], !=, member[.value]]] begin[{]
local_variable[type[NotificationChain], msgs]
if[binary_operation[member[.... | Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[Expression] identifier[newValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[newValue] operator[!=] identifier[value] operator[SEP] {
identifier[NotificationChain] identifier[msgs] operator[=] Other[null] operator[SEP... |
public static CPInstance fetchByC_ST_Last(long CPDefinitionId, int status,
OrderByComparator<CPInstance> orderByComparator) {
return getPersistence()
.fetchByC_ST_Last(CPDefinitionId, status, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByC_ST_Last, return_type[type[CPInstance]], modifier[public static], parameter[CPDefinitionId, status, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPInstance] identifier[fetchByC_ST_Last] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[int] identifier[status] , identifier[OrderByComparator] operator[<] identifier[CPInstance] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[retur... |
PdfChunk split(float width) {
newlineSplit = false;
if (image != null) {
if (image.getScaledWidth() > width) {
PdfChunk pc = new PdfChunk(Chunk.OBJECT_REPLACEMENT_CHARACTER, this);
value = "";
attributes = new HashMap();
image =... | class class_name[name] begin[{]
method[split, return_type[type[PdfChunk]], modifier[default], parameter[width]] begin[{]
assign[member[.newlineSplit], literal[false]]
if[binary_operation[member[.image], !=, literal[null]]] begin[{]
if[binary_operation[cal... | identifier[PdfChunk] identifier[split] operator[SEP] Keyword[float] identifier[width] operator[SEP] {
identifier[newlineSplit] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[image] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[image] ope... |
public String toPigScript(Descriptor msgDescriptor, String loaderClassName) {
StringBuffer sb = new StringBuffer();
final int initialTabOffset = 3;
sb.append("raw_data = load '$INPUT_FILES' using " + loaderClassName + "()").append("\n");
sb.append(tabs(initialTabOffset)).append("as (").append("\n");
... | class class_name[name] begin[{]
method[toPigScript, return_type[type[String]], modifier[public], parameter[msgDescriptor, loaderClassName]] begin[{]
local_variable[type[StringBuffer], sb]
local_variable[type[int], initialTabOffset]
call[sb.append, parameter[binary_operation[bina... | Keyword[public] identifier[String] identifier[toPigScript] operator[SEP] identifier[Descriptor] identifier[msgDescriptor] , identifier[String] identifier[loaderClassName] operator[SEP] {
identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operato... |
public List<Layer<?>> getLayersByServerId(String serverLayerId) {
List<Layer<?>> l = new ArrayList<Layer<?>>();
if (layers != null) {
for (Layer<?> layer : layers) {
if (layer.getServerLayerId().equals(serverLayerId)) {
l.add(layer);
}
}
}
return l;
} | class class_name[name] begin[{]
method[getLayersByServerId, return_type[type[List]], modifier[public], parameter[serverLayerId]] begin[{]
local_variable[type[List], l]
if[binary_operation[member[.layers], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=No... | Keyword[public] identifier[List] operator[<] identifier[Layer] operator[<] operator[?] operator[>] operator[>] identifier[getLayersByServerId] operator[SEP] identifier[String] identifier[serverLayerId] operator[SEP] {
identifier[List] operator[<] identifier[Layer] operator[<] operator[?] operator[>] operator[>] ... |
public void init(Range annotation, PropertyMetadata propertyMetadata)
{
m_maxExclusive = getValue(annotation.maxExclusive());
m_minExclusive = getValue(annotation.minExclusive());
m_maxInclusive = getValue(annotation.maxInclusive());
m_minInclusive = getValue(annotation.minInclusive(... | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[annotation, propertyMetadata]] begin[{]
assign[member[.m_maxExclusive], call[.getValue, parameter[call[annotation.maxExclusive, parameter[]]]]]
assign[member[.m_minExclusive], call[.getVa... | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Range] identifier[annotation] , identifier[PropertyMetadata] identifier[propertyMetadata] operator[SEP] {
identifier[m_maxExclusive] operator[=] identifier[getValue] operator[SEP] identifier[annotation] operator[SEP] identifier[maxExclusive... |
public File getBuildDir() {
// we use the null check variant so that people can write true unit tests with a mock ItemParent
// and without a JenkinsRule. Such tests are of limited utility as there is a high risk of hitting
// some code that needs the singleton, but for persistence migration tes... | class class_name[name] begin[{]
method[getBuildDir, return_type[type[File]], modifier[public], parameter[]] begin[{]
local_variable[type[Jenkins], j]
if[binary_operation[member[.j], ==, literal[null]]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], me... | Keyword[public] identifier[File] identifier[getBuildDir] operator[SEP] operator[SEP] {
identifier[Jenkins] identifier[j] operator[=] identifier[Jenkins] operator[SEP] identifier[getInstanceOrNull] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[j] operator[==] Other[null] operator[... |
private void _checkAndSubscribe(KafkaConsumer<?, ?> consumer, String topic) {
synchronized (consumer) {
Set<String> subscription = consumer.subscription();
if (subscription == null || !subscription.contains(topic)) {
consumer.subscribe(Arrays.asList(topic));
}... | class class_name[name] begin[{]
method[_checkAndSubscribe, return_type[void], modifier[private], parameter[consumer, topic]] begin[{]
SYNCHRONIZED[member[.consumer]] BEGIN[{]
local_variable[type[Set], subscription]
if[binary_operation[binary_operation[member[... | Keyword[private] Keyword[void] identifier[_checkAndSubscribe] operator[SEP] identifier[KafkaConsumer] operator[<] operator[?] , operator[?] operator[>] identifier[consumer] , identifier[String] identifier[topic] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[consumer] operator[SEP] {
... |
public String getNewValue(String strKey, String strReadValue, String strOrigValue, String strCurrentValue)
{
String strNewValue = null;
if (((strCurrentValue != null) && (strCurrentValue.equals(strOrigValue)))
|| ((strCurrentValue == null) && (strOrigValue == null)))
{ // I hav... | class class_name[name] begin[{]
method[getNewValue, return_type[type[String]], modifier[public], parameter[strKey, strReadValue, strOrigValue, strCurrentValue]] begin[{]
local_variable[type[String], strNewValue]
if[binary_operation[binary_operation[binary_operation[member[.strCurrentVal... | Keyword[public] identifier[String] identifier[getNewValue] operator[SEP] identifier[String] identifier[strKey] , identifier[String] identifier[strReadValue] , identifier[String] identifier[strOrigValue] , identifier[String] identifier[strCurrentValue] operator[SEP] {
identifier[String] identifier[strNewValue]... |
private static String getNormalizedParent(String filePath) {
if (new File(filePath).getParent() == null) {
// parent doesn't exist .. return null
return null;
}
String parentDir = filePath.substring(0, filePath.lastIndexOf("/"));
if (!parentDir.contains("/")) {
... | class class_name[name] begin[{]
method[getNormalizedParent, return_type[type[String]], modifier[private static], parameter[filePath]] begin[{]
if[binary_operation[ClassCreator(arguments=[MemberReference(member=filePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body... | Keyword[private] Keyword[static] identifier[String] identifier[getNormalizedParent] operator[SEP] identifier[String] identifier[filePath] operator[SEP] {
Keyword[if] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[getParent] operator[SEP] oper... |
public void processCas(CAS aCAS) throws ResourceProcessException {
JCas jcas;
try {
jcas = aCAS.getJCas();
} catch (CASException e) {
throw new ResourceProcessException(e);
}
printTimexAnnotationsInline(jcas);
} | class class_name[name] begin[{]
method[processCas, return_type[void], modifier[public], parameter[aCAS]] begin[{]
local_variable[type[JCas], jcas]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jcas, postfix_operators=[], prefix_operators=[], qu... | Keyword[public] Keyword[void] identifier[processCas] operator[SEP] identifier[CAS] identifier[aCAS] operator[SEP] Keyword[throws] identifier[ResourceProcessException] {
identifier[JCas] identifier[jcas] operator[SEP] Keyword[try] {
identifier[jcas] operator[=] identifier[aCAS] operator[SEP] identifier... |
public static String urlEncode(String toEncode) {
String encoded;
try {
encoded = URLEncoder.encode(toEncode, ENCODING);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
// URLEncoder encodes spaces as '+', convert to hex encodin... | class class_name[name] begin[{]
method[urlEncode, return_type[type[String]], modifier[public static], parameter[toEncode]] begin[{]
local_variable[type[String], encoded]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=encoded, postfix_operators=[... | Keyword[public] Keyword[static] identifier[String] identifier[urlEncode] operator[SEP] identifier[String] identifier[toEncode] operator[SEP] {
identifier[String] identifier[encoded] operator[SEP] Keyword[try] {
identifier[encoded] operator[=] identifier[URLEncoder] operator[SEP] identifier[encode] ope... |
private List<JoinableResourceBundle> getBundlesToRebuild() {
List<JoinableResourceBundle> bundlesToRebuild = new ArrayList<>();
if (config.getUseSmartBundling()) {
for (JoinableResourceBundle bundle : globalBundles) {
if (bundle.isDirty()) {
bundlesToRebuild.add(bundle);
}
}
for (JoinableRes... | class class_name[name] begin[{]
method[getBundlesToRebuild, return_type[type[List]], modifier[private], parameter[]] begin[{]
local_variable[type[List], bundlesToRebuild]
if[call[config.getUseSmartBundling, parameter[]]] begin[{]
ForStatement(body=BlockStatement(label=None, ... | Keyword[private] identifier[List] operator[<] identifier[JoinableResourceBundle] operator[>] identifier[getBundlesToRebuild] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[JoinableResourceBundle] operator[>] identifier[bundlesToRebuild] operator[=] Keyword[new] identifier[ArrayList] operat... |
@Override
public DetachUserPolicyResult detachUserPolicy(DetachUserPolicyRequest request) {
request = beforeClientExecution(request);
return executeDetachUserPolicy(request);
} | class class_name[name] begin[{]
method[detachUserPolicy, return_type[type[DetachUserPolicyResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDetachUserPolicy, parameter[member[.... | annotation[@] identifier[Override] Keyword[public] identifier[DetachUserPolicyResult] identifier[detachUserPolicy] operator[SEP] identifier[DetachUserPolicyRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP... |
@Override
public CPFriendlyURLEntry findByG_C_C_L_M(long groupId, long classNameId,
long classPK, String languageId, boolean main)
throws NoSuchCPFriendlyURLEntryException {
CPFriendlyURLEntry cpFriendlyURLEntry = fetchByG_C_C_L_M(groupId,
classNameId, classPK, languageId, main);
if (cpFriendlyURLEntry ==... | class class_name[name] begin[{]
method[findByG_C_C_L_M, return_type[type[CPFriendlyURLEntry]], modifier[public], parameter[groupId, classNameId, classPK, languageId, main]] begin[{]
local_variable[type[CPFriendlyURLEntry], cpFriendlyURLEntry]
if[binary_operation[member[.cpFriendlyURLEnt... | annotation[@] identifier[Override] Keyword[public] identifier[CPFriendlyURLEntry] identifier[findByG_C_C_L_M] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , identifier[String] identifier[languageId] , Keyword[boolean] identifier[main] op... |
public static RexNode fromFieldAccess(
final RowSignature rowSignature,
final Project project,
final int fieldNumber
)
{
if (project == null) {
// I don't think the factory impl matters here.
return RexInputRef.of(fieldNumber, rowSignature.getRelDataType(new JavaTypeFactoryImpl()))... | class class_name[name] begin[{]
method[fromFieldAccess, return_type[type[RexNode]], modifier[public static], parameter[rowSignature, project, fieldNumber]] begin[{]
if[binary_operation[member[.project], ==, literal[null]]] begin[{]
return[call[RexInputRef.of, parameter[member[.field... | Keyword[public] Keyword[static] identifier[RexNode] identifier[fromFieldAccess] operator[SEP] Keyword[final] identifier[RowSignature] identifier[rowSignature] , Keyword[final] identifier[Project] identifier[project] , Keyword[final] Keyword[int] identifier[fieldNumber] operator[SEP] {
Keyword[if] operator[SEP]... |
public Matcher usePattern(Pattern newPattern) {
if (newPattern == null) {
throw new IllegalArgumentException("newPattern cannot be null");
}
this.parentPattern = newPattern;
matcher.usePattern(newPattern.pattern());
return this;
} | class class_name[name] begin[{]
method[usePattern, return_type[type[Matcher]], modifier[public], parameter[newPattern]] begin[{]
if[binary_operation[member[.newPattern], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pref... | Keyword[public] identifier[Matcher] identifier[usePattern] operator[SEP] identifier[Pattern] identifier[newPattern] operator[SEP] {
Keyword[if] operator[SEP] identifier[newPattern] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] l... |
@Override
public DeleteDeviceResult deleteDevice(DeleteDeviceRequest request) {
request = beforeClientExecution(request);
return executeDeleteDevice(request);
} | class class_name[name] begin[{]
method[deleteDevice, return_type[type[DeleteDeviceResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeleteDevice, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[DeleteDeviceResult] identifier[deleteDevice] operator[SEP] identifier[DeleteDeviceRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S... |
public static @NotNull Set<Object> copyToSet(@NotNull Object array) {
return copy(checkNotNull(array), newLinkedHashSet());
} | class class_name[name] begin[{]
method[copyToSet, return_type[type[Set]], modifier[public static], parameter[array]] begin[{]
return[call[.copy, parameter[call[.checkNotNull, parameter[member[.array]]], call[.newLinkedHashSet, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] annotation[@] identifier[NotNull] identifier[Set] operator[<] identifier[Object] operator[>] identifier[copyToSet] operator[SEP] annotation[@] identifier[NotNull] identifier[Object] identifier[array] operator[SEP] {
Keyword[return] identifier[copy] operator[SEP] identifier[checkNo... |
private Class<?> loadClassByName(String className) throws TransformationOperationException {
Exception e;
if (className.contains(";")) {
try {
String[] parts = className.split(";");
ModelDescription description = new ModelDescription();
descrip... | class class_name[name] begin[{]
method[loadClassByName, return_type[type[Class]], modifier[private], parameter[className]] begin[{]
local_variable[type[Exception], e]
if[call[className.contains, parameter[literal[";"]]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(... | Keyword[private] identifier[Class] operator[<] operator[?] operator[>] identifier[loadClassByName] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[TransformationOperationException] {
identifier[Exception] identifier[e] operator[SEP] Keyword[if] operator[SEP] identi... |
public Object lookup(String type, String url)
throws IOException
{
return new BurlapRemote(type, url);
} | class class_name[name] begin[{]
method[lookup, return_type[type[Object]], modifier[public], parameter[type, url]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=url, postfix_operators=[], ... | Keyword[public] identifier[Object] identifier[lookup] operator[SEP] identifier[String] identifier[type] , identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] identifier[BurlapRemote] operator[SEP] identifier[type] , identifier[url] operator[SE... |
Map<String, UserData> getUserDataMap(NodeImpl node) {
if (nodeToUserData == null) {
nodeToUserData = new WeakHashMap<NodeImpl, Map<String, UserData>>();
}
Map<String, UserData> userDataMap = nodeToUserData.get(node);
if (userDataMap == null) {
userDataMap = new Ha... | class class_name[name] begin[{]
method[getUserDataMap, return_type[type[Map]], modifier[default], parameter[node]] begin[{]
if[binary_operation[member[.nodeToUserData], ==, literal[null]]] begin[{]
assign[member[.nodeToUserData], ClassCreator(arguments=[], body=None, con... | identifier[Map] operator[<] identifier[String] , identifier[UserData] operator[>] identifier[getUserDataMap] operator[SEP] identifier[NodeImpl] identifier[node] operator[SEP] {
Keyword[if] operator[SEP] identifier[nodeToUserData] operator[==] Other[null] operator[SEP] {
identifier[nodeToUserData] ope... |
public void initDocument()
throws TemplateInitException
{
/*
* send an empty InternalContextAdapter down into the AST to initialize it
*/
InternalContextAdapterImpl ica = new InternalContextAdapterImpl( new VelocityContext() );
try
{
/*
... | class class_name[name] begin[{]
method[initDocument, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[InternalContextAdapterImpl], ica]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[],... | Keyword[public] Keyword[void] identifier[initDocument] operator[SEP] operator[SEP] Keyword[throws] identifier[TemplateInitException] {
identifier[InternalContextAdapterImpl] identifier[ica] operator[=] Keyword[new] identifier[InternalContextAdapterImpl] operator[SEP] Keyword[new] identifier[VelocityContext] oper... |
public static String getTranslatedStatsName(String statsName, String statsType, Locale locale) {
String[] _stats = parseStatsType(statsType);
for (int i = 0; i < _stats.length; i++) {
PmiModuleConfig cfg = getTranslatedStatsConfig(_stats[i], locale);
if (cfg != null) {
... | class class_name[name] begin[{]
method[getTranslatedStatsName, return_type[type[String]], modifier[public static], parameter[statsName, statsType, locale]] begin[{]
local_variable[type[String], _stats]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations... | Keyword[public] Keyword[static] identifier[String] identifier[getTranslatedStatsName] operator[SEP] identifier[String] identifier[statsName] , identifier[String] identifier[statsType] , identifier[Locale] identifier[locale] operator[SEP] {
identifier[String] operator[SEP] operator[SEP] identifier[_stats] opera... |
protected Object createObject (Class type) throws InvocationTargetException {
// Use deferred construction if a non-zero-arg constructor is available.
DeferredConstruction deferredConstruction = Beans.getDeferredConstruction(type, config);
if (deferredConstruction != null) return deferredConstruction;
retur... | class class_name[name] begin[{]
method[createObject, return_type[type[Object]], modifier[protected], parameter[type]] begin[{]
local_variable[type[DeferredConstruction], deferredConstruction]
if[binary_operation[member[.deferredConstruction], !=, literal[null]]] begin[{]
return[member[.... | Keyword[protected] identifier[Object] identifier[createObject] operator[SEP] identifier[Class] identifier[type] operator[SEP] Keyword[throws] identifier[InvocationTargetException] {
identifier[DeferredConstruction] identifier[deferredConstruction] operator[=] identifier[Beans] operator[SEP] identifier[getDeferre... |
private static Type transformOwner(Type givenOwner, Class<?> clazz) {
if (givenOwner == null) {
// be lenient: if this is an inner class but no owner was specified, assume a raw owner type
// (or if there is no owner just return null)
return clazz.getDeclaringClass();
} else {
// If the specified owner ... | class class_name[name] begin[{]
method[transformOwner, return_type[type[Type]], modifier[private static], parameter[givenOwner, clazz]] begin[{]
if[binary_operation[member[.givenOwner], ==, literal[null]]] begin[{]
return[call[clazz.getDeclaringClass, parameter[]]]
else begi... | Keyword[private] Keyword[static] identifier[Type] identifier[transformOwner] operator[SEP] identifier[Type] identifier[givenOwner] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
Keyword[if] operator[SEP] identifier[givenOwner] operator[==] Other[null] operator[SEP] {
... |
public Connector withCapabilityList(String... capabilityList) {
if (this.capabilityList == null) {
setCapabilityList(new java.util.ArrayList<String>(capabilityList.length));
}
for (String ele : capabilityList) {
this.capabilityList.add(ele);
}
return this;... | class class_name[name] begin[{]
method[withCapabilityList, return_type[type[Connector]], modifier[public], parameter[capabilityList]] begin[{]
if[binary_operation[THIS[member[None.capabilityList]], ==, literal[null]]] begin[{]
call[.setCapabilityList, parameter[ClassCrea... | Keyword[public] identifier[Connector] identifier[withCapabilityList] operator[SEP] identifier[String] operator[...] identifier[capabilityList] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[capabilityList] operator[==] Other[null] operator[SEP] {
identifier[setCapabil... |
@Override
public CreateRoleResult createRole(CreateRoleRequest request) {
request = beforeClientExecution(request);
return executeCreateRole(request);
} | class class_name[name] begin[{]
method[createRole, return_type[type[CreateRoleResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCreateRole, parameter[member[.request]]]]
en... | annotation[@] identifier[Override] Keyword[public] identifier[CreateRoleResult] identifier[createRole] operator[SEP] identifier[CreateRoleRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Ke... |
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "vermietet")
public JAXBElement<Boolean> createVermietet(Boolean value) {
return new JAXBElement<Boolean>(_Vermietet_QNAME, Boolean.class, null, value);
} | class class_name[name] begin[{]
method[createVermietet, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Vermietet_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_opera... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Boolean] operator[>] identifier[createVermietet] operator[SEP] identifier[Boolean] identif... |
public static base_response add(nitro_service client, dnsaaaarec resource) throws Exception {
dnsaaaarec addresource = new dnsaaaarec();
addresource.hostname = resource.hostname;
addresource.ipv6address = resource.ipv6address;
addresource.ttl = resource.ttl;
return addresource.add_resource(client);
} | class class_name[name] begin[{]
method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[dnsaaaarec], addresource]
assign[member[addresource.hostname], member[resource.hostname]]
assign[member[addres... | Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnsaaaarec] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnsaaaarec] identifier[addresource] operator[=] Keyword[new] identif... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.