code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void setOffsetMinutes(int theZoneOffsetMinutes) {
int offsetAbs = Math.abs(theZoneOffsetMinutes);
int mins = offsetAbs % 60;
int hours = offsetAbs / 60;
if (theZoneOffsetMinutes < 0) {
setTimeZone(TimeZone.getTimeZone("GMT-" + hours + ":" + mins));
} else {
setTimeZone(TimeZone.getTimeZone("GMT... | class class_name[name] begin[{]
method[setOffsetMinutes, return_type[void], modifier[public], parameter[theZoneOffsetMinutes]] begin[{]
local_variable[type[int], offsetAbs]
local_variable[type[int], mins]
local_variable[type[int], hours]
if[binary_operation[member[.theZo... | Keyword[public] Keyword[void] identifier[setOffsetMinutes] operator[SEP] Keyword[int] identifier[theZoneOffsetMinutes] operator[SEP] {
Keyword[int] identifier[offsetAbs] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[theZoneOffsetMinutes] operator[SEP] operator[SEP] Keyword[i... |
public String getSymbolicLinkTarget(String linkpath)
throws SftpStatusException, SshException {
if (version < 3) {
throw new SftpStatusException(
SftpStatusException.SSH_FX_OP_UNSUPPORTED,
"Symbolic links are not supported by the server SFTP version "
+ String.valueOf(version));
}
try {
... | class class_name[name] begin[{]
method[getSymbolicLinkTarget, return_type[type[String]], modifier[public], parameter[linkpath]] begin[{]
if[binary_operation[member[.version], <, literal[3]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=SSH_FX_OP_... | Keyword[public] identifier[String] identifier[getSymbolicLinkTarget] operator[SEP] identifier[String] identifier[linkpath] operator[SEP] Keyword[throws] identifier[SftpStatusException] , identifier[SshException] {
Keyword[if] operator[SEP] identifier[version] operator[<] Other[3] operator[SEP] {
Keyw... |
protected Graphics2D getGraphics(BufferedImage image) {
Graphics2D graphics = image.createGraphics();
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
return graphics;
} | class class_name[name] begin[{]
method[getGraphics, return_type[type[Graphics2D]], modifier[protected], parameter[image]] begin[{]
local_variable[type[Graphics2D], graphics]
call[graphics.setRenderingHint, parameter[member[RenderingHints.KEY_ANTIALIASING], member[RenderingHints.VALUE_AN... | Keyword[protected] identifier[Graphics2D] identifier[getGraphics] operator[SEP] identifier[BufferedImage] identifier[image] operator[SEP] {
identifier[Graphics2D] identifier[graphics] operator[=] identifier[image] operator[SEP] identifier[createGraphics] operator[SEP] operator[SEP] operator[SEP] identifier[graph... |
public void undeleteTable(String datasetId) throws InterruptedException {
generateTableWithDdl(datasetId, "oops_undelete_me");
// [START bigquery_undelete_table]
// String datasetId = "my_dataset";
String tableId = "oops_undelete_me";
// Record the current time. We'll use this as the snapshot tim... | class class_name[name] begin[{]
method[undeleteTable, return_type[void], modifier[public], parameter[datasetId]] begin[{]
call[.generateTableWithDdl, parameter[member[.datasetId], literal["oops_undelete_me"]]]
local_variable[type[String], tableId]
local_variable[type[long], snap... | Keyword[public] Keyword[void] identifier[undeleteTable] operator[SEP] identifier[String] identifier[datasetId] operator[SEP] Keyword[throws] identifier[InterruptedException] {
identifier[generateTableWithDdl] operator[SEP] identifier[datasetId] , literal[String] operator[SEP] operator[SEP] identifier[String] id... |
public static HttpSession session() {
HttpServletRequest httpServletRequest = request.get();
return (httpServletRequest == null) ? null : httpServletRequest.getSession();
} | class class_name[name] begin[{]
method[session, return_type[type[HttpSession]], modifier[public static], parameter[]] begin[{]
local_variable[type[HttpServletRequest], httpServletRequest]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=httpServletRequest, post... | Keyword[public] Keyword[static] identifier[HttpSession] identifier[session] operator[SEP] operator[SEP] {
identifier[HttpServletRequest] identifier[httpServletRequest] operator[=] identifier[request] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[... |
private void cleanupErrorFile(Watcher watcher) {
File file = getErrorFileForWatcher(watcher);
FileUtils.deleteQuietly(file);
} | class class_name[name] begin[{]
method[cleanupErrorFile, return_type[void], modifier[private], parameter[watcher]] begin[{]
local_variable[type[File], file]
call[FileUtils.deleteQuietly, parameter[member[.file]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[cleanupErrorFile] operator[SEP] identifier[Watcher] identifier[watcher] operator[SEP] {
identifier[File] identifier[file] operator[=] identifier[getErrorFileForWatcher] operator[SEP] identifier[watcher] operator[SEP] operator[SEP] identifier[FileUtils] operator[SEP] iden... |
private JSONArray executeStatementToJson(
PreparedStatement stmt,
List<SelectedColumn> selectFields) throws Exception {
//logger.info("about to execute: " + stmt.toString());
if( stmt.execute() ) {
// There's a ResultSet to be had
ResultSet rs = stmt.getResultSet();
JSONArray array = new JSONArray()... | class class_name[name] begin[{]
method[executeStatementToJson, return_type[type[JSONArray]], modifier[private], parameter[stmt, selectFields]] begin[{]
if[call[stmt.execute, parameter[]]] begin[{]
local_variable[type[ResultSet], rs]
local_variable[type[JSONArray], array]... | Keyword[private] identifier[JSONArray] identifier[executeStatementToJson] operator[SEP] identifier[PreparedStatement] identifier[stmt] , identifier[List] operator[<] identifier[SelectedColumn] operator[>] identifier[selectFields] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] id... |
public void verifyMessageSize(int maxMessageSize) {
Iterator<MessageAndOffset> shallowIter = internalIterator(true);
while(shallowIter.hasNext()) {
MessageAndOffset messageAndOffset = shallowIter.next();
int payloadSize = messageAndOffset.message.payloadSize();
if(payload... | class class_name[name] begin[{]
method[verifyMessageSize, return_type[void], modifier[public], parameter[maxMessageSize]] begin[{]
local_variable[type[Iterator], shallowIter]
while[call[shallowIter.hasNext, parameter[]]] begin[{]
local_variable[type[MessageAndOffset], messag... | Keyword[public] Keyword[void] identifier[verifyMessageSize] operator[SEP] Keyword[int] identifier[maxMessageSize] operator[SEP] {
identifier[Iterator] operator[<] identifier[MessageAndOffset] operator[>] identifier[shallowIter] operator[=] identifier[internalIterator] operator[SEP] literal[boolean] operator[SEP]... |
private static Matrix execute(Matrix dataMatrix, MatrixFile affMatrixFile,
int dims) throws IOException {
// Write the input matrix to a file for Matlab/Octave to use
File mInput = File.createTempFile("lpp-input-data-matrix",".dat");
mInput.deleteOnExit();
... | class class_name[name] begin[{]
method[execute, return_type[type[Matrix]], modifier[private static], parameter[dataMatrix, affMatrixFile, dims]] begin[{]
local_variable[type[File], mInput]
call[mInput.deleteOnExit, parameter[]]
call[MatrixIO.writeMatrix, parameter[member... | Keyword[private] Keyword[static] identifier[Matrix] identifier[execute] operator[SEP] identifier[Matrix] identifier[dataMatrix] , identifier[MatrixFile] identifier[affMatrixFile] , Keyword[int] identifier[dims] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[mInput] operator... |
public static IProcessingInstructionProcessor wrap(final IProcessingInstructionProcessor processor, final IProcessorDialect dialect) {
Validate.notNull(dialect, "Dialect cannot be null");
if (processor == null) {
return null;
}
return new ProcessingInstructionProcessorWrapper... | class class_name[name] begin[{]
method[wrap, return_type[type[IProcessingInstructionProcessor]], modifier[public static], parameter[processor, dialect]] begin[{]
call[Validate.notNull, parameter[member[.dialect], literal["Dialect cannot be null"]]]
if[binary_operation[member[.pr... | Keyword[public] Keyword[static] identifier[IProcessingInstructionProcessor] identifier[wrap] operator[SEP] Keyword[final] identifier[IProcessingInstructionProcessor] identifier[processor] , Keyword[final] identifier[IProcessorDialect] identifier[dialect] operator[SEP] {
identifier[Validate] operator[SEP] identi... |
public static Type newArrayType(Type componentType) {
if (componentType instanceof Class<?>) {
return newArrayType((Class<?>) componentType);
}
final TypeVariable<?> var = TypeVariableGenerator.freshTypeVariable("E");
return new TypeResolver().where(var, componentType).resolveType(new GenericArray... | class class_name[name] begin[{]
method[newArrayType, return_type[type[Type]], modifier[public static], parameter[componentType]] begin[{]
if[binary_operation[member[.componentType], instanceof, type[Class]]] begin[{]
return[call[.newArrayType, parameter[Cast(expression=MemberReferen... | Keyword[public] Keyword[static] identifier[Type] identifier[newArrayType] operator[SEP] identifier[Type] identifier[componentType] operator[SEP] {
Keyword[if] operator[SEP] identifier[componentType] Keyword[instanceof] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] {
Keyword[retur... |
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <B> Observable<List<T>> buffer(Callable<? extends ObservableSource<B>> boundarySupplier) {
return buffer(boundarySupplier, ArrayListSupplier.<T>asCallable());
} | class class_name[name] begin[{]
method[buffer, return_type[type[Observable]], modifier[final public], parameter[boundarySupplier]] begin[{]
return[call[.buffer, parameter[member[.boundarySupplier], call[.ArrayListSupplier, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[B] operator[>] identifier[Observable] operator[<] identifier[List] operator[<] identifier[T]... |
public void prepareRender() {
lightRenderedLastFrame = 0;
Gdx.gl.glDepthMask(false);
Gdx.gl.glEnable(GL20.GL_BLEND);
simpleBlendFunc.apply();
boolean useLightMap = (shadows || blur);
if (useLightMap) {
lightMap.frameBuffer.begin();
Gdx.gl.glClearColor(0f, 0f, 0f, 0f);
Gdx.gl.glClear(GL20.GL_COLOR... | class class_name[name] begin[{]
method[prepareRender, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.lightRenderedLastFrame], literal[0]]
call[Gdx.gl.glDepthMask, parameter[literal[false]]]
call[Gdx.gl.glEnable, parameter[member[GL20.GL... | Keyword[public] Keyword[void] identifier[prepareRender] operator[SEP] operator[SEP] {
identifier[lightRenderedLastFrame] operator[=] Other[0] operator[SEP] identifier[Gdx] operator[SEP] identifier[gl] operator[SEP] identifier[glDepthMask] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[Gdx]... |
public final void initActor(String path, ActorContext context, Mailbox mailbox) {
this.path = path;
this.context = context;
this.mailbox = mailbox;
} | class class_name[name] begin[{]
method[initActor, return_type[void], modifier[final public], parameter[path, context, mailbox]] begin[{]
assign[THIS[member[None.path]], member[.path]]
assign[THIS[member[None.context]], member[.context]]
assign[THIS[member[None.ma... | Keyword[public] Keyword[final] Keyword[void] identifier[initActor] operator[SEP] identifier[String] identifier[path] , identifier[ActorContext] identifier[context] , identifier[Mailbox] identifier[mailbox] operator[SEP] {
Keyword[this] operator[SEP] identifier[path] operator[=] identifier[path] operator[SEP] K... |
public static String convertCase(Match.CaseConversion conversion, String s, String sample, Language lang) {
if (StringTools.isEmpty(s)) {
return s;
}
String token = s;
switch (conversion) {
case NONE:
break;
case PRESERVE:
if (StringTools.startsWithUppercase(sample)) {
... | class class_name[name] begin[{]
method[convertCase, return_type[type[String]], modifier[public static], parameter[conversion, s, sample, lang]] begin[{]
if[call[StringTools.isEmpty, parameter[member[.s]]]] begin[{]
return[member[.s]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] identifier[String] identifier[convertCase] operator[SEP] identifier[Match] operator[SEP] identifier[CaseConversion] identifier[conversion] , identifier[String] identifier[s] , identifier[String] identifier[sample] , identifier[Language] identifier[lang] operator[SEP] {
Keyword[... |
private static boolean versionMatches(AddOn addOn, AddOnDep dependency) {
if (addOn.version.matches(dependency.getVersion())) {
return true;
}
if (addOn.semVer != null && addOn.semVer.matches(dependency.getVersion())) {
return true;
}
return fal... | class class_name[name] begin[{]
method[versionMatches, return_type[type[boolean]], modifier[private static], parameter[addOn, dependency]] begin[{]
if[call[addOn.version.matches, parameter[call[dependency.getVersion, parameter[]]]]] begin[{]
return[literal[true]]
else begin[... | Keyword[private] Keyword[static] Keyword[boolean] identifier[versionMatches] operator[SEP] identifier[AddOn] identifier[addOn] , identifier[AddOnDep] identifier[dependency] operator[SEP] {
Keyword[if] operator[SEP] identifier[addOn] operator[SEP] identifier[version] operator[SEP] identifier[matches] operator[SE... |
private void copyToCache(SchemaConcept schemaConcept) {
schemaConcept.subs().forEach(concept -> keyspaceCache.cacheLabel(concept.label(), concept.labelId()));
} | class class_name[name] begin[{]
method[copyToCache, return_type[void], modifier[private], parameter[schemaConcept]] begin[{]
call[schemaConcept.subs, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[copyToCache] operator[SEP] identifier[SchemaConcept] identifier[schemaConcept] operator[SEP] {
identifier[schemaConcept] operator[SEP] identifier[subs] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[concept] operator[->] identifier... |
@NonNull
public static <T, V> HashMap<T, V> hashMapBetween(final Class<T> keyClass, final Class<V> valueClass) {
assertIsNotParameterized(keyClass, "generic key types are not allowed for this method.");
assertIsNotParameterized(valueClass, "generic value types are not allowed for this method.");
return Ha... | class class_name[name] begin[{]
method[hashMapBetween, return_type[type[HashMap]], modifier[public static], parameter[keyClass, valueClass]] begin[{]
call[.assertIsNotParameterized, parameter[member[.keyClass], literal["generic key types are not allowed for this method."]]]
call... | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[V] operator[>] identifier[HashMap] operator[<] identifier[T] , identifier[V] operator[>] identifier[hashMapBetween] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[k... |
protected LoggersModel toLoggersModel(Logger[] loggerAnnotations, KnowledgeNamespace knowledgeNamespace) {
if (loggerAnnotations == null || loggerAnnotations.length == 0) {
return null;
}
LoggersModel loggersModel = new V1LoggersModel(knowledgeNamespace.uri());
for (Logger lo... | class class_name[name] begin[{]
method[toLoggersModel, return_type[type[LoggersModel]], modifier[protected], parameter[loggerAnnotations, knowledgeNamespace]] begin[{]
if[binary_operation[binary_operation[member[.loggerAnnotations], ==, literal[null]], ||, binary_operation[member[loggerAnnotati... | Keyword[protected] identifier[LoggersModel] identifier[toLoggersModel] operator[SEP] identifier[Logger] operator[SEP] operator[SEP] identifier[loggerAnnotations] , identifier[KnowledgeNamespace] identifier[knowledgeNamespace] operator[SEP] {
Keyword[if] operator[SEP] identifier[loggerAnnotations] operator[==] O... |
@Override
public Observable<String> helloUserStream(final String name, final int repeats) {
return interval(100, TimeUnit.MILLISECONDS).map(i -> "Hello, " + name + "! (#" + i + ")").take(repeats);
} | class class_name[name] begin[{]
method[helloUserStream, return_type[type[Observable]], modifier[public], parameter[name, repeats]] begin[{]
return[call[.interval, parameter[literal[100], member[TimeUnit.MILLISECONDS]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[String] operator[>] identifier[helloUserStream] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[int] identifier[repeats] operator[SEP] {
Keyword[return] identifier[interval]... |
public InetAddress getRemoteAddress() {
final Channel channel;
try {
channel = strategy.getChannel();
} catch (IOException e) {
return null;
}
final Connection connection = channel.getConnection();
final InetSocketAddress peerAddress = connection.g... | class class_name[name] begin[{]
method[getRemoteAddress, return_type[type[InetAddress]], modifier[public], parameter[]] begin[{]
local_variable[type[Channel], channel]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[],... | Keyword[public] identifier[InetAddress] identifier[getRemoteAddress] operator[SEP] operator[SEP] {
Keyword[final] identifier[Channel] identifier[channel] operator[SEP] Keyword[try] {
identifier[channel] operator[=] identifier[strategy] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] o... |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
labelFilenameMask = new javax.swing.JLabel();
textFieldMask = new javax.swing.JTextField();
jScrol... | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[java], gridBagConstraints]
assign[member[.labelFilenameMask], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints] operator[SEP] i... |
private Object populateEntityFromDataFrame(EntityMetadata m, Map<String, Integer> columnIndexMap, Row row)
{
try
{
// create entity instance
Object entity = KunderaCoreUtils.createNewInstance(m.getEntityClazz());
// handle relations
Map<String, Object>... | class class_name[name] begin[{]
method[populateEntityFromDataFrame, return_type[type[Object]], modifier[private], parameter[m, columnIndexMap, row]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argument... | Keyword[private] identifier[Object] identifier[populateEntityFromDataFrame] operator[SEP] identifier[EntityMetadata] identifier[m] , identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[columnIndexMap] , identifier[Row] identifier[row] operator[SEP] {
Keyword[try] {
... |
@Pure
public static List<UUID> getAttributeUUIDs(Node document, boolean caseSensitive, String... path) {
assert document != null : AssertMessages.notNullParameter(0);
final List<UUID> ids = new ArrayList<>();
final String v = getAttributeValue(document, caseSensitive, 0, path);
if (v != null && !v.isEmpty()) {... | class class_name[name] begin[{]
method[getAttributeUUIDs, return_type[type[List]], modifier[public static], parameter[document, caseSensitive, path]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selec... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[UUID] operator[>] identifier[getAttributeUUIDs] operator[SEP] identifier[Node] identifier[document] , Keyword[boolean] identifier[caseSensitive] , identifier[String] operator[...] identifier[path] operator[SEP] {
... |
@Override
public IRenderingElement generate(IAtomContainer container, RendererModel model) {
double[] minMax = GeometryUtil.getMinMax(container);
return new RectangleElement(minMax[0], minMax[1], minMax[2], minMax[3], new Color(.7f, .7f, 1.0f));
} | class class_name[name] begin[{]
method[generate, return_type[type[IRenderingElement]], modifier[public], parameter[container, model]] begin[{]
local_variable[type[double], minMax]
return[ClassCreator(arguments=[MemberReference(member=minMax, postfix_operators=[], prefix_operators=[], qualifier=... | annotation[@] identifier[Override] Keyword[public] identifier[IRenderingElement] identifier[generate] operator[SEP] identifier[IAtomContainer] identifier[container] , identifier[RendererModel] identifier[model] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[minMax] operator[=] identifier... |
public static OptimizeEngine newInstance(final ShardingRule shardingRule, final SQLStatement sqlStatement, final List<Object> parameters, final GeneratedKey generatedKey) {
if (sqlStatement instanceof InsertStatement) {
return new InsertOptimizeEngine(shardingRule, (InsertStatement) sqlStatement, pa... | class class_name[name] begin[{]
method[newInstance, return_type[type[OptimizeEngine]], modifier[public static], parameter[shardingRule, sqlStatement, parameters, generatedKey]] begin[{]
if[binary_operation[member[.sqlStatement], instanceof, type[InsertStatement]]] begin[{]
return[Cl... | Keyword[public] Keyword[static] identifier[OptimizeEngine] identifier[newInstance] operator[SEP] Keyword[final] identifier[ShardingRule] identifier[shardingRule] , Keyword[final] identifier[SQLStatement] identifier[sqlStatement] , Keyword[final] identifier[List] operator[<] identifier[Object] operator[>] identifier[p... |
private byte[] getAsByteArray(String template) throws IOException {
if (isTemplateGivenAsAnAbsoluteFile(template)) {
throw new IllegalArgumentException("Template " + template + " should not be given as an absolute file");
}
if (!containsTemplate(template)) {
throw new Ill... | class class_name[name] begin[{]
method[getAsByteArray, return_type[type[byte]], modifier[private], parameter[template]] begin[{]
if[call[.isTemplateGivenAsAnAbsoluteFile, parameter[member[.template]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operan... | Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[getAsByteArray] operator[SEP] identifier[String] identifier[template] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[isTemplateGivenAsAnAbsoluteFile] operator[SEP] identifier[template] operator[SEP... |
public void setName(String name)
{
synchronized(Pool.class)
{
if(isStarted())
{
if((name==null&&_pool.getPoolName()!=null)||(name!=null&&!name.equals(_pool.getPoolName())))
throw new IllegalStateException("started");
return;... | class class_name[name] begin[{]
method[setName, return_type[void], modifier[public], parameter[name]] begin[{]
SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pool, sub_type=None))] BEGIN[{... | Keyword[public] Keyword[void] identifier[setName] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[Pool] operator[SEP] Keyword[class] operator[SEP] {
Keyword[if] operator[SEP] identifier[isStarted] operator[SEP] operator[SEP] operator[SEP... |
public Description describe() {
String defined_in_id = "IR";
if (defined_in instanceof org.omg.CORBA.ContainedOperations)
defined_in_id = ((org.omg.CORBA.ContainedOperations) defined_in).id();
ValueDescription md = new ValueDescription(name, id, is_abstract,
is_cust... | class class_name[name] begin[{]
method[describe, return_type[type[Description]], modifier[public], parameter[]] begin[{]
local_variable[type[String], defined_in_id]
if[binary_operation[member[.defined_in], instanceof, type[org]]] begin[{]
assign[member[.defined_in_id], Cast(... | Keyword[public] identifier[Description] identifier[describe] operator[SEP] operator[SEP] {
identifier[String] identifier[defined_in_id] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[defined_in] Keyword[instanceof] identifier[org] operator[SEP] identifier[omg] operator[SEP] identi... |
private String getUserKey( AppInfo appInfo, String userId )
{
if ( userId == null ) {
throw new IllegalArgumentException( "userId should not be null" );
}
return String.format( "%s%s", getAppPrefix( appInfo ), userId );
} | class class_name[name] begin[{]
method[getUserKey, return_type[type[String]], modifier[private], parameter[appInfo, userId]] begin[{]
if[binary_operation[member[.userId], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], pre... | Keyword[private] identifier[String] identifier[getUserKey] operator[SEP] identifier[AppInfo] identifier[appInfo] , identifier[String] identifier[userId] operator[SEP] {
Keyword[if] operator[SEP] identifier[userId] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Illegal... |
public AggregatorData getData(Aggregator aggregator) {
Utils.checkState(started, "Not started");
Utils.checkState(!stopped, "Already stopped");
Utils.checkNotNull(aggregator, "aggregator");
Utils.checkArgument(
aggregators.contains(aggregator),
Utils.formatL("Aggregator {} is not registe... | class class_name[name] begin[{]
method[getData, return_type[type[AggregatorData]], modifier[public], parameter[aggregator]] begin[{]
call[Utils.checkState, parameter[member[.started], literal["Not started"]]]
call[Utils.checkState, parameter[member[.stopped], literal["Already st... | Keyword[public] identifier[AggregatorData] identifier[getData] operator[SEP] identifier[Aggregator] identifier[aggregator] operator[SEP] {
identifier[Utils] operator[SEP] identifier[checkState] operator[SEP] identifier[started] , literal[String] operator[SEP] operator[SEP] identifier[Utils] operator[SEP] identi... |
protected void engineInitSign(PrivateKey privateKey,
SecureRandom random)
throws InvalidKeyException {
this.appRandom = random;
engineInitSign(privateKey);
} | class class_name[name] begin[{]
method[engineInitSign, return_type[void], modifier[protected], parameter[privateKey, random]] begin[{]
assign[THIS[member[None.appRandom]], member[.random]]
call[.engineInitSign, parameter[member[.privateKey]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[engineInitSign] operator[SEP] identifier[PrivateKey] identifier[privateKey] , identifier[SecureRandom] identifier[random] operator[SEP] Keyword[throws] identifier[InvalidKeyException] {
Keyword[this] operator[SEP] identifier[appRandom] operator[=] identifier[random] o... |
public static Optional<String> getStringAsOptWithFilePath(
String filePath, String charsetName) {
return JMOptional
.getOptional(JMFiles.readString(filePath, charsetName));
} | class class_name[name] begin[{]
method[getStringAsOptWithFilePath, return_type[type[Optional]], modifier[public static], parameter[filePath, charsetName]] begin[{]
return[call[JMOptional.getOptional, parameter[call[JMFiles.readString, parameter[member[.filePath], member[.charsetName]]]]]]
end[}]
EN... | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[String] operator[>] identifier[getStringAsOptWithFilePath] operator[SEP] identifier[String] identifier[filePath] , identifier[String] identifier[charsetName] operator[SEP] {
Keyword[return] identifier[JMOptional] operator[SEP] identifie... |
protected String getTextEx(int position, int len)
{
try {
return getDocument().getText(position, len);
} catch (BadLocationException e) {
e.printStackTrace();
return "";
}
} | class class_name[name] begin[{]
method[getTextEx, return_type[type[String]], modifier[protected], parameter[position, len]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getDocument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[Method... | Keyword[protected] identifier[String] identifier[getTextEx] operator[SEP] Keyword[int] identifier[position] , Keyword[int] identifier[len] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getText] operator[SEP] identifier[posi... |
private String resourcesToString(Iterable<CmsResource> resources) {
StringBuffer buffer = new StringBuffer();
boolean first = true;
buffer.append("[");
for (CmsResource res : resources) {
if (!first) {
buffer.append(", ");
}
first = fa... | class class_name[name] begin[{]
method[resourcesToString, return_type[type[String]], modifier[private], parameter[resources]] begin[{]
local_variable[type[StringBuffer], buffer]
local_variable[type[boolean], first]
call[buffer.append, parameter[literal["["]]]
ForStatemen... | Keyword[private] identifier[String] identifier[resourcesToString] operator[SEP] identifier[Iterable] operator[<] identifier[CmsResource] operator[>] identifier[resources] operator[SEP] {
identifier[StringBuffer] identifier[buffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] oper... |
public void transition (Class<?> clazz, String name, Transition trans)
throws PersistenceException
{
if (!isTransitionApplied(clazz, name) && noteTransition(clazz, name)) {
try {
trans.run();
} catch (PersistenceException e) {
try {
... | class class_name[name] begin[{]
method[transition, return_type[void], modifier[public], parameter[clazz, name, trans]] begin[{]
if[binary_operation[call[.isTransitionApplied, parameter[member[.clazz], member[.name]]], &&, call[.noteTransition, parameter[member[.clazz], member[.name]]]]] begin[{... | Keyword[public] Keyword[void] identifier[transition] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[name] , identifier[Transition] identifier[trans] operator[SEP] Keyword[throws] identifier[PersistenceException] {
Keyword[if] operator[SEP] ... |
public static Pinyin convertSingle(String single)
{
Pinyin pinyin = map.get(single);
if (pinyin == null) return Pinyin.none5;
return pinyin;
} | class class_name[name] begin[{]
method[convertSingle, return_type[type[Pinyin]], modifier[public static], parameter[single]] begin[{]
local_variable[type[Pinyin], pinyin]
if[binary_operation[member[.pinyin], ==, literal[null]]] begin[{]
return[member[Pinyin.none5]]
else begin[{]... | Keyword[public] Keyword[static] identifier[Pinyin] identifier[convertSingle] operator[SEP] identifier[String] identifier[single] operator[SEP] {
identifier[Pinyin] identifier[pinyin] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[single] operator[SEP] operator[SEP] Keyword[if]... |
@Override
public JsonElement serialize(ExpandableField<?> src, Type typeOfSrc,
JsonSerializationContext context) {
if (src.isExpanded()) {
return context.serialize(src.getExpanded());
} else if (src.getId() != null) {
return new JsonPrimitive(src.getId());
} else {
return null;
... | class class_name[name] begin[{]
method[serialize, return_type[type[JsonElement]], modifier[public], parameter[src, typeOfSrc, context]] begin[{]
if[call[src.isExpanded, parameter[]]] begin[{]
return[call[context.serialize, parameter[call[src.getExpanded, parameter[]]]]]
else... | annotation[@] identifier[Override] Keyword[public] identifier[JsonElement] identifier[serialize] operator[SEP] identifier[ExpandableField] operator[<] operator[?] operator[>] identifier[src] , identifier[Type] identifier[typeOfSrc] , identifier[JsonSerializationContext] identifier[context] operator[SEP] {
Keyw... |
public JWTPayload setType(String type) {
this.type = type;
this.put(PayloadConstants.TYPE, type);
return this;
} | class class_name[name] begin[{]
method[setType, return_type[type[JWTPayload]], modifier[public], parameter[type]] begin[{]
assign[THIS[member[None.type]], member[.type]]
THIS[call[None.put, parameter[member[PayloadConstants.TYPE], member[.type]]]]
return[THIS[]]
end[... | Keyword[public] identifier[JWTPayload] identifier[setType] operator[SEP] identifier[String] identifier[type] operator[SEP] {
Keyword[this] operator[SEP] identifier[type] operator[=] identifier[type] operator[SEP] Keyword[this] operator[SEP] identifier[put] operator[SEP] identifier[PayloadConstants] operator[SEP]... |
@Override
public InputStream getResourceAsStream(String resourceName, boolean processingBundle)
throws ResourceNotFoundException {
if (ThreadLocalJawrContext.isInterruptingProcessingBundle()) {
throw new InterruptBundlingProcessException();
}
generatorRegistry.loadGeneratorIfNeeded(resourceName);
Input... | class class_name[name] begin[{]
method[getResourceAsStream, return_type[type[InputStream]], modifier[public], parameter[resourceName, processingBundle]] begin[{]
if[call[ThreadLocalJawrContext.isInterruptingProcessingBundle, parameter[]]] begin[{]
ThrowStatement(expression=ClassCrea... | annotation[@] identifier[Override] Keyword[public] identifier[InputStream] identifier[getResourceAsStream] operator[SEP] identifier[String] identifier[resourceName] , Keyword[boolean] identifier[processingBundle] operator[SEP] Keyword[throws] identifier[ResourceNotFoundException] {
Keyword[if] operator[SEP] ide... |
@Override
public final void restart() {
if (DynamicTasks.getTaskQueuingContext() != null) {
doRestart(ConfigBag.EMPTY);
} else {
Task<?> task = Tasks.builder().name("restart").body(new Runnable() {
public void run() {
doRestart(ConfigBag.EM... | class class_name[name] begin[{]
method[restart, return_type[void], modifier[final public], parameter[]] begin[{]
if[binary_operation[call[DynamicTasks.getTaskQueuingContext, parameter[]], !=, literal[null]]] begin[{]
call[.doRestart, parameter[member[ConfigBag.EMPTY]]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[restart] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[DynamicTasks] operator[SEP] identifier[getTaskQueuingContext] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
iden... |
public JavaWriter emitAnnotation(String annotation, Map<String, ?> attributes)
throws IOException {
indent();
out.write("@");
emitCompressedType(annotation);
switch (attributes.size()) {
case 0:
break;
case 1:
Entry<String, ?> onlyEntry = attributes.entrySet().iterator(... | class class_name[name] begin[{]
method[emitAnnotation, return_type[type[JavaWriter]], modifier[public], parameter[annotation, attributes]] begin[{]
call[.indent, parameter[]]
call[out.write, parameter[literal["@"]]]
call[.emitCompressedType, parameter[member[.ann... | Keyword[public] identifier[JavaWriter] identifier[emitAnnotation] operator[SEP] identifier[String] identifier[annotation] , identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[attributes] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[indent] operator[SEP] op... |
public static Server getServer(final Object instance, final String bindAddress, final int port,
final int numHandlers) throws IOException {
return new Server(instance, bindAddress, port, numHandlers);
} | class class_name[name] begin[{]
method[getServer, return_type[type[Server]], modifier[public static], parameter[instance, bindAddress, port, numHandlers]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Membe... | Keyword[public] Keyword[static] identifier[Server] identifier[getServer] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[String] identifier[bindAddress] , Keyword[final] Keyword[int] identifier[port] , Keyword[final] Keyword[int] identifier[numHandlers] operator[SEP] ... |
@Override
public List<String> getCalendarNames() throws JobPersistenceException {
return doWithLock(new LockCallback<List<String>>() {
@Override
public List<String> doWithLock(JedisCommands jedis) throws JobPersistenceException {
return storage.getCalendarNames(jedis)... | class class_name[name] begin[{]
method[getCalendarNames, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[call[.doWithLock, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodI... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getCalendarNames] operator[SEP] operator[SEP] Keyword[throws] identifier[JobPersistenceException] {
Keyword[return] identifier[doWithLock] operator[SEP] Keyword[new] identifier[LockCallback] ... |
public static String getSystemProperty(String property, String def)
{
Check.notNull(property);
try
{
return System.getProperty(property, def);
}
catch (final SecurityException exception)
{
Verbose.exception(exception,
... | class class_name[name] begin[{]
method[getSystemProperty, return_type[type[String]], modifier[public static], parameter[property, def]] begin[{]
call[Check.notNull, parameter[member[.property]]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(m... | Keyword[public] Keyword[static] identifier[String] identifier[getSystemProperty] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[def] operator[SEP] {
identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] Keyword[t... |
public void marshall(CreateDirectConnectGatewayRequest createDirectConnectGatewayRequest, ProtocolMarshaller protocolMarshaller) {
if (createDirectConnectGatewayRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocol... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createDirectConnectGatewayRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createDirectConnectGatewayRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=Cla... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateDirectConnectGatewayRequest] identifier[createDirectConnectGatewayRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createDirectConnectGatewayRequest] ope... |
@Nonnull
public static <T> List<Callable<T>> unwraps(@Nullable Collection<? extends Callable<T>> tasks) {
if (null == tasks) return Collections.emptyList();
List<Callable<T>> copy = new ArrayList<Callable<T>>();
for (Callable<T> task : tasks) {
if (!(task instanceof TtlCallable)... | class class_name[name] begin[{]
method[unwraps, return_type[type[List]], modifier[public static], parameter[tasks]] begin[{]
if[binary_operation[literal[null], ==, member[.tasks]]] begin[{]
return[call[Collections.emptyList, parameter[]]]
else begin[{]
None
end[}]
local_... | annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Callable] operator[<] identifier[T] operator[>] operator[>] identifier[unwraps] operator[SEP] annotation[@] identifier[Nullable] identifier[Collection] operator[<] operator[?] ... |
@Override
public void start(LeaderRetrievalListener listener) {
checkNotNull(listener, "Listener must not be null.");
synchronized (startStopLock) {
checkState(!started, "StandaloneLeaderRetrievalService can only be started once.");
started = true;
// directly notify the listener, because we already kno... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[listener]] begin[{]
call[.checkNotNull, parameter[member[.listener], literal["Listener must not be null."]]]
SYNCHRONIZED[member[.startStopLock]] BEGIN[{]
call[.c... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[LeaderRetrievalListener] identifier[listener] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[listener] , literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] ... |
public static int parseLocalPort(final Channel channel) {
if (null == channel) {
return -1;
}
final InetSocketAddress local = (InetSocketAddress) channel.localAddress();
if (local != null) {
return local.getPort();
}
return -1;
} | class class_name[name] begin[{]
method[parseLocalPort, return_type[type[int]], modifier[public static], parameter[channel]] begin[{]
if[binary_operation[literal[null], ==, member[.channel]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
local_variable... | Keyword[public] Keyword[static] Keyword[int] identifier[parseLocalPort] operator[SEP] Keyword[final] identifier[Channel] identifier[channel] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[channel] operator[SEP] {
Keyword[return] operator[-] Other[1] operator[SEP]
... |
public static <E extends Enum<E>> EnumSet<E> processBitVectors(final Class<E> enumClass, final long... values) {
final EnumSet<E> results = EnumSet.noneOf(asEnum(enumClass));
final long[] lvalues = ArrayUtils.clone(Validate.notNull(values));
ArrayUtils.reverse(lvalues);
for (final E cons... | class class_name[name] begin[{]
method[processBitVectors, return_type[type[EnumSet]], modifier[public static], parameter[enumClass, values]] begin[{]
local_variable[type[EnumSet], results]
local_variable[type[long], lvalues]
call[ArrayUtils.reverse, parameter[member[.lvalues]]]
... | Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Enum] operator[<] identifier[E] operator[>] operator[>] identifier[EnumSet] operator[<] identifier[E] operator[>] identifier[processBitVectors] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[E] operator[>] ident... |
public boolean containsAll(final IntHashSet other) {
final IntIterator iterator = other.iterator();
while (iterator.hasNext()) {
if (!contains(iterator.nextValue())) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[containsAll, return_type[type[boolean]], modifier[public], parameter[other]] begin[{]
local_variable[type[IntIterator], iterator]
while[call[iterator.hasNext, parameter[]]] begin[{]
if[call[.contains, parameter[call[iterator... | Keyword[public] Keyword[boolean] identifier[containsAll] operator[SEP] Keyword[final] identifier[IntHashSet] identifier[other] operator[SEP] {
Keyword[final] identifier[IntIterator] identifier[iterator] operator[=] identifier[other] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Key... |
public ComputeNodeGetRemoteLoginSettingsResult getRemoteLoginSettings(String poolId, String nodeId) {
return getRemoteLoginSettingsWithServiceResponseAsync(poolId, nodeId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getRemoteLoginSettings, return_type[type[ComputeNodeGetRemoteLoginSettingsResult]], modifier[public], parameter[poolId, nodeId]] begin[{]
return[call[.getRemoteLoginSettingsWithServiceResponseAsync, parameter[member[.poolId], member[.nodeId]]]]
end[}]
END[}] | Keyword[public] identifier[ComputeNodeGetRemoteLoginSettingsResult] identifier[getRemoteLoginSettings] operator[SEP] identifier[String] identifier[poolId] , identifier[String] identifier[nodeId] operator[SEP] {
Keyword[return] identifier[getRemoteLoginSettingsWithServiceResponseAsync] operator[SEP] identifier[p... |
public void pop(AbstractDrawer drawer, AjaxRequestTarget target) {
Iterator<ListItem> iter = drawers.iterator();
while (iter.hasNext()) {
ListItem item = iter.next();
item.drawer.setAllowClose(true);
target.appendJavaScript("$('#"+item.item.getMarkupId()+"').modaldrawer('hide');");
if (item.drawer==draw... | class class_name[name] begin[{]
method[pop, return_type[void], modifier[public], parameter[drawer, target]] begin[{]
local_variable[type[Iterator], iter]
while[call[iter.hasNext, parameter[]]] begin[{]
local_variable[type[ListItem], item]
call[item.dr... | Keyword[public] Keyword[void] identifier[pop] operator[SEP] identifier[AbstractDrawer] identifier[drawer] , identifier[AjaxRequestTarget] identifier[target] operator[SEP] {
identifier[Iterator] operator[<] identifier[ListItem] operator[>] identifier[iter] operator[=] identifier[drawers] operator[SEP] identifier... |
public void refreshBitmapShader()
{
shader = new BitmapShader(Bitmap.createScaledBitmap(image, canvasSize, canvasSize, false), Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
} | class class_name[name] begin[{]
method[refreshBitmapShader, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.shader], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=image, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ... | Keyword[public] Keyword[void] identifier[refreshBitmapShader] operator[SEP] operator[SEP] {
identifier[shader] operator[=] Keyword[new] identifier[BitmapShader] operator[SEP] identifier[Bitmap] operator[SEP] identifier[createScaledBitmap] operator[SEP] identifier[image] , identifier[canvasSize] , identifier[ca... |
@Override
public double[] transform(double[] x) {
if (x.length != scale.length) {
throw new IllegalArgumentException(String.format("Invalid vector size %d, expected %d", x.length, scale.length));
}
double[] y = copy ? new double[x.length] : x;
for (int i = 0; i < x.lengt... | class class_name[name] begin[{]
method[transform, return_type[type[double]], modifier[public], parameter[x]] begin[{]
if[binary_operation[member[x.length], !=, member[scale.length]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postf... | annotation[@] identifier[Override] Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[transform] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[length] operator[!=] identifier[scale] oper... |
@SuppressWarnings("unchecked")
private final int checkNodeDirectory() throws ClusterInfoException {
try {
// get all of the nodes in the nodeDir and set one for this node if it's not already set.
final Collection<String> nodeDirs;
if (nodeDirectory == null) {
... | class class_name[name] begin[{]
method[checkNodeDirectory, return_type[type[int]], modifier[final private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=nodeDirs)], modifiers={'final'}, type=Refe... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[final] Keyword[int] identifier[checkNodeDirectory] operator[SEP] operator[SEP] Keyword[throws] identifier[ClusterInfoException] {
Keyword[try] {
Keyword[final] identifier[Collection] operato... |
private String getAppFileName(MavenProject project) {
String name = project.getBuild().getFinalName() + "." + project.getPackaging();
if (project.getPackaging().equals("liberty-assembly")) {
name = project.getBuild().getFinalName() + ".war";
}
if (stripVersion) {
... | class class_name[name] begin[{]
method[getAppFileName, return_type[type[String]], modifier[private], parameter[project]] begin[{]
local_variable[type[String], name]
if[call[project.getPackaging, parameter[]]] begin[{]
assign[member[.name], binary_operation[call[p... | Keyword[private] identifier[String] identifier[getAppFileName] operator[SEP] identifier[MavenProject] identifier[project] operator[SEP] {
identifier[String] identifier[name] operator[=] identifier[project] operator[SEP] identifier[getBuild] operator[SEP] operator[SEP] operator[SEP] identifier[getFinalName] opera... |
public int convertStringToIndex(String tempString)
{
String tempChar = tempString;
if (tempChar.length() == 0)
tempChar = " ";
if ((tempChar.charAt(0) == 'Y') || (tempChar.charAt(0) == 'y'))
return 1;
else
return 0;
} | class class_name[name] begin[{]
method[convertStringToIndex, return_type[type[int]], modifier[public], parameter[tempString]] begin[{]
local_variable[type[String], tempChar]
if[binary_operation[call[tempChar.length, parameter[]], ==, literal[0]]] begin[{]
assign[member[.temp... | Keyword[public] Keyword[int] identifier[convertStringToIndex] operator[SEP] identifier[String] identifier[tempString] operator[SEP] {
identifier[String] identifier[tempChar] operator[=] identifier[tempString] operator[SEP] Keyword[if] operator[SEP] identifier[tempChar] operator[SEP] identifier[length] operator[S... |
public static Counter counter(String name, String... tags) {
return globalRegistry.counter(name, tags);
} | class class_name[name] begin[{]
method[counter, return_type[type[Counter]], modifier[public static], parameter[name, tags]] begin[{]
return[call[globalRegistry.counter, parameter[member[.name], member[.tags]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Counter] identifier[counter] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[tags] operator[SEP] {
Keyword[return] identifier[globalRegistry] operator[SEP] identifier[counter] operator[SEP] identifier[name] , identifier[... |
public Assignment mkAssignment(TopologyAssignEvent event) throws Exception {
String topologyId = event.getTopologyId();
LOG.info("Determining assignment for " + topologyId);
TopologyAssignContext context = prepareTopologyAssign(event);
Set<ResourceWorkerSlot> assignments;
if (!St... | class class_name[name] begin[{]
method[mkAssignment, return_type[type[Assignment]], modifier[public], parameter[event]] begin[{]
local_variable[type[String], topologyId]
call[LOG.info, parameter[binary_operation[literal["Determining assignment for "], +, member[.topologyId]]]]
l... | Keyword[public] identifier[Assignment] identifier[mkAssignment] operator[SEP] identifier[TopologyAssignEvent] identifier[event] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[topologyId] operator[=] identifier[event] operator[SEP] identifier[getTopologyId] operator[SEP] opera... |
public static String Decryptor(String str) throws Exception {
byte[] buff = EncrypDES.hexStr2ByteArr(str);
// 根据密钥,对Cipher对象进行初始化,DECRYPT_MODE表示加密模式
Cipher c = getCipher();
c.init(Cipher.DECRYPT_MODE, deskey);
byte[] cipherByte = c.doFinal(buff);
return new String(cipherB... | class class_name[name] begin[{]
method[Decryptor, return_type[type[String]], modifier[public static], parameter[str]] begin[{]
local_variable[type[byte], buff]
local_variable[type[Cipher], c]
call[c.init, parameter[member[Cipher.DECRYPT_MODE], member[.deskey]]]
local_var... | Keyword[public] Keyword[static] identifier[String] identifier[Decryptor] operator[SEP] identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[byte] operator[SEP] operator[SEP] identifier[buff] operator[=] identifier[EncrypDES] operator[SEP] identifier[hexStr2ByteArr] ope... |
public ObjectStat statObject(String bucketName, String objectName)
throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
InternalException {
HttpResponse... | class class_name[name] begin[{]
method[statObject, return_type[type[ObjectStat]], modifier[public], parameter[bucketName, objectName]] begin[{]
local_variable[type[HttpResponse], response]
local_variable[type[ResponseHeader], header]
local_variable[type[Map], httpHeaders]
local_... | Keyword[public] identifier[ObjectStat] identifier[statObject] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[objectName] operator[SEP] Keyword[throws] identifier[InvalidBucketNameException] , identifier[NoSuchAlgorithmException] , identifier[InsufficientDataException] , iden... |
public static String decode(String content, String secret) {
try {
//1.构造密钥生成器,指定为AES算法,不区分大小写
KeyGenerator keygen = KeyGenerator.getInstance("AES");
//2.根据encodeRules规则初始化密钥生成器
//生成一个256位的随机源,根据传入的字节数组
keygen.init(256, new SecureRandom(secret.getBytes... | class class_name[name] begin[{]
method[decode, return_type[type[String]], modifier[public static], parameter[content, secret]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_ope... | Keyword[public] Keyword[static] identifier[String] identifier[decode] operator[SEP] identifier[String] identifier[content] , identifier[String] identifier[secret] operator[SEP] {
Keyword[try] {
identifier[KeyGenerator] identifier[keygen] operator[=] identifier[KeyGenerator] operator[SEP] identifier[g... |
private int toModifierFlags (int mods) {
return modifierFlags((mods & GLFW_MOD_ALT) != 0,
(mods & GLFW_MOD_CONTROL) != 0,
(mods & GLFW_MOD_SUPER) != 0,
(mods & GLFW_MOD_SHIFT) != 0);
} | class class_name[name] begin[{]
method[toModifierFlags, return_type[type[int]], modifier[private], parameter[mods]] begin[{]
return[call[.modifierFlags, parameter[binary_operation[binary_operation[member[.mods], &, member[.GLFW_MOD_ALT]], !=, literal[0]], binary_operation[binary_operation[member[.mods]... | Keyword[private] Keyword[int] identifier[toModifierFlags] operator[SEP] Keyword[int] identifier[mods] operator[SEP] {
Keyword[return] identifier[modifierFlags] operator[SEP] operator[SEP] identifier[mods] operator[&] identifier[GLFW_MOD_ALT] operator[SEP] operator[!=] Other[0] , operator[SEP] identifier[mods] o... |
public void updateLockingValues(Object obj) throws PersistenceBrokerException
{
FieldDescriptor[] fields = getLockingFields();
for (int i = 0; i < fields.length; i++)
{
FieldDescriptor fmd = fields[i];
if (fmd.isUpdateLock())
{
Pers... | class class_name[name] begin[{]
method[updateLockingValues, return_type[void], modifier[public], parameter[obj]] begin[{]
local_variable[type[FieldDescriptor], fields]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarat... | Keyword[public] Keyword[void] identifier[updateLockingValues] operator[SEP] identifier[Object] identifier[obj] operator[SEP] Keyword[throws] identifier[PersistenceBrokerException] {
identifier[FieldDescriptor] operator[SEP] operator[SEP] identifier[fields] operator[=] identifier[getLockingFields] operator[SEP] o... |
public void addProtocol(String productString, ChannelListener<? super StreamConnection> openListener) {
addProtocol(productString, openListener, null);
} | class class_name[name] begin[{]
method[addProtocol, return_type[void], modifier[public], parameter[productString, openListener]] begin[{]
call[.addProtocol, parameter[member[.productString], member[.openListener], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addProtocol] operator[SEP] identifier[String] identifier[productString] , identifier[ChannelListener] operator[<] operator[?] Keyword[super] identifier[StreamConnection] operator[>] identifier[openListener] operator[SEP] {
identifier[addProtocol] operator[SEP] identifier... |
public void loadJarClassifier(String modelName, Properties props) {
Timing.startDoing("Loading JAR-internal classifier " + modelName);
try {
InputStream is = getClass().getResourceAsStream(modelName);
if (modelName.endsWith(".gz")) {
is = new GZIPInputStream(is);
}
is = ne... | class class_name[name] begin[{]
method[loadJarClassifier, return_type[void], modifier[public], parameter[modelName, props]] begin[{]
call[Timing.startDoing, parameter[binary_operation[literal["Loading JAR-internal classifier "], +, member[.modelName]]]]
TryStatement(block=[LocalVariable... | Keyword[public] Keyword[void] identifier[loadJarClassifier] operator[SEP] identifier[String] identifier[modelName] , identifier[Properties] identifier[props] operator[SEP] {
identifier[Timing] operator[SEP] identifier[startDoing] operator[SEP] literal[String] operator[+] identifier[modelName] operator[SEP] oper... |
String join(Dialect d, boolean isTopLevel, DialectSqlItem function, DialectSqlItem[] items) {//NOSONAR
int pos = 0;
for (DialectSqlItem item : items) {
if (item.subItems != null) {
String value;
if (pos > 0 && items[pos - 1] != null && items[pos - 1].type == 'F')
// join as parameters
value = j... | class class_name[name] begin[{]
method[join, return_type[type[String]], modifier[default], parameter[d, isTopLevel, function, items]] begin[{]
local_variable[type[int], pos]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(m... | identifier[String] identifier[join] operator[SEP] identifier[Dialect] identifier[d] , Keyword[boolean] identifier[isTopLevel] , identifier[DialectSqlItem] identifier[function] , identifier[DialectSqlItem] operator[SEP] operator[SEP] identifier[items] operator[SEP] {
Keyword[int] identifier[pos] operator[=] Ot... |
public static final int parseField(byte[] bytes, int startPos, int length, char delimiter) {
if (length <= 0) {
throw new NumberFormatException("Invalid input: Empty string");
}
long val = 0;
boolean neg = false;
if (bytes[startPos] == '-') {
neg = true;
startPos++;
length--;
if (length == 0... | class class_name[name] begin[{]
method[parseField, return_type[type[int]], modifier[final public static], parameter[bytes, startPos, length, delimiter]] begin[{]
if[binary_operation[member[.length], <=, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(... | Keyword[public] Keyword[static] Keyword[final] Keyword[int] identifier[parseField] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[startPos] , Keyword[int] identifier[length] , Keyword[char] identifier[delimiter] operator[SEP] {
Keyword[if] operator[SEP] ide... |
public static int[] getMatrixMultiplyShape(int[] left, int[] right) {
if(Shape.shapeIsScalar(left)) {
return right;
}
if(Shape.shapeIsScalar(right)) {
return left;
}
if (left.length != 2 && right.length != 2) {
throw new IllegalArgumentExcept... | class class_name[name] begin[{]
method[getMatrixMultiplyShape, return_type[type[int]], modifier[public static], parameter[left, right]] begin[{]
if[call[Shape.shapeIsScalar, parameter[member[.left]]]] begin[{]
return[member[.right]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getMatrixMultiplyShape] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[left] , Keyword[int] operator[SEP] operator[SEP] identifier[right] operator[SEP] {
Keyword[if] operator[SEP] identifier[Shape] operator[SE... |
public Map<String, String> fetchTokenKeys() {
try {
return extractTokenKeys(this.restTemplate
.getForObject(getUaaUrl() + "/token_keys", Map.class));
}
catch (HttpStatusCodeException ex) {
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
"UAA not reachable");
}
} | class class_name[name] begin[{]
method[fetchTokenKeys, return_type[type[Map]], modifier[public], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=restTemplat... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[fetchTokenKeys] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[extractTokenKeys] operator[SEP] Keyword[this] operator[SEP] identifier[restTemplate] operator[SEP] identif... |
public static ClientTransport getReverseClientTransport(String container, AbstractChannel channel) {
if (REVERSE_CLIENT_TRANSPORT_MAP == null) { // 初始化
synchronized (ClientTransportFactory.class) {
if (REVERSE_CLIENT_TRANSPORT_MAP == null) {
REVERSE_CLIENT_TRANSPO... | class class_name[name] begin[{]
method[getReverseClientTransport, return_type[type[ClientTransport]], modifier[public static], parameter[container, channel]] begin[{]
if[binary_operation[member[.REVERSE_CLIENT_TRANSPORT_MAP], ==, literal[null]]] begin[{]
SYNCHRONIZED[Cla... | Keyword[public] Keyword[static] identifier[ClientTransport] identifier[getReverseClientTransport] operator[SEP] identifier[String] identifier[container] , identifier[AbstractChannel] identifier[channel] operator[SEP] {
Keyword[if] operator[SEP] identifier[REVERSE_CLIENT_TRANSPORT_MAP] operator[==] Other[null] o... |
private Table getTable(String name)
{
Table table = m_tables.get(name);
if (table == null)
{
table = EMPTY_TABLE;
}
return table;
} | class class_name[name] begin[{]
method[getTable, return_type[type[Table]], modifier[private], parameter[name]] begin[{]
local_variable[type[Table], table]
if[binary_operation[member[.table], ==, literal[null]]] begin[{]
assign[member[.table], member[.EMPTY_TABLE]... | Keyword[private] identifier[Table] identifier[getTable] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[Table] identifier[table] operator[=] identifier[m_tables] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identif... |
public void putClientMetrics(String hostname, String clientId,
List<Metric> metrics) {
if (metrics.isEmpty()) {
return;
}
LOG.debug("Removing metrics for id {} to replace with {}", clientId, metrics);
synchronized (mClientMetrics) {
mClientMetrics.removeByField(ID_INDEX, getFullInstanc... | class class_name[name] begin[{]
method[putClientMetrics, return_type[void], modifier[public], parameter[hostname, clientId, metrics]] begin[{]
if[call[metrics.isEmpty, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[LOG.debug, param... | Keyword[public] Keyword[void] identifier[putClientMetrics] operator[SEP] identifier[String] identifier[hostname] , identifier[String] identifier[clientId] , identifier[List] operator[<] identifier[Metric] operator[>] identifier[metrics] operator[SEP] {
Keyword[if] operator[SEP] identifier[metrics] operator[SEP... |
private IContainer getActualTarget(IResource mouseTarget) {
/* if cursor is on a file, return the parent */
if (mouseTarget.getType() == IResource.FILE) {
return mouseTarget.getParent();
}
/* otherwise the mouseTarget is the real target */
return (IContainer) mouseTarget;
} | class class_name[name] begin[{]
method[getActualTarget, return_type[type[IContainer]], modifier[private], parameter[mouseTarget]] begin[{]
if[binary_operation[call[mouseTarget.getType, parameter[]], ==, member[IResource.FILE]]] begin[{]
return[call[mouseTarget.getParent, parameter[]... | Keyword[private] identifier[IContainer] identifier[getActualTarget] operator[SEP] identifier[IResource] identifier[mouseTarget] operator[SEP] {
Keyword[if] operator[SEP] identifier[mouseTarget] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[IResource] operator[SEP] identifi... |
public void showTrajectoryAndSpline(){
if(t.getDimension()==2){
double[] xData = new double[rotatedTrajectory.size()];
double[] yData = new double[rotatedTrajectory.size()];
for(int i = 0; i < rotatedTrajectory.size(); i++){
xData[i] = rotatedTrajectory.get(i).x;
yData[i] = rotatedTra... | class class_name[name] begin[{]
method[showTrajectoryAndSpline, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[t.getDimension, parameter[]], ==, literal[2]]] begin[{]
local_variable[type[double], xData]
local_variable[type[double], yD... | Keyword[public] Keyword[void] identifier[showTrajectoryAndSpline] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[==] Other[2] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[xData]... |
public void addProcessor(ItemProcessor processor) {
if (processors == null) {
processors = new ArrayList<>();
}
processors.add(processor);
} | class class_name[name] begin[{]
method[addProcessor, return_type[void], modifier[public], parameter[processor]] begin[{]
if[binary_operation[member[.processors], ==, literal[null]]] begin[{]
assign[member[.processors], ClassCreator(arguments=[], body=None, constructor_ty... | Keyword[public] Keyword[void] identifier[addProcessor] operator[SEP] identifier[ItemProcessor] identifier[processor] operator[SEP] {
Keyword[if] operator[SEP] identifier[processors] operator[==] Other[null] operator[SEP] {
identifier[processors] operator[=] Keyword[new] identifier[ArrayList] operator[... |
@Override
synchronized public void sendResponse(ReplyHeader h, Record r, String tag) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Make space for length
BinaryOutputArchive bos = BinaryOutputArchive.getArchive(baos);
try {
... | class class_name[name] begin[{]
method[sendResponse, return_type[void], modifier[synchronized public], parameter[h, r, tag]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor... | annotation[@] identifier[Override] Keyword[synchronized] Keyword[public] Keyword[void] identifier[sendResponse] operator[SEP] identifier[ReplyHeader] identifier[h] , identifier[Record] identifier[r] , identifier[String] identifier[tag] operator[SEP] {
Keyword[try] {
identifier[ByteArrayOutputStream]... |
public Observable<Void> pauseAsync(String resourceGroupName, String serverName, String databaseName) {
return pauseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> respons... | class class_name[name] begin[{]
method[pauseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, databaseName]] begin[{]
return[call[.pauseWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.databaseName]]]]
end[}]... | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[pauseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[databaseName] operator[SEP] {
Keyword[return] identifier[pauseWithSer... |
private String saveCertificateAsPEMFile(Object x509Certificate, String filename, boolean deleteOnExit) throws IOException {
File pemFile = File.createTempFile(filename, null);
try (FileWriter pemfileWriter = new FileWriter(pemFile)) {
try (JcaPEMWriter jcaPEMWriter = new JcaPEMWriter(pemfile... | class class_name[name] begin[{]
method[saveCertificateAsPEMFile, return_type[type[String]], modifier[private], parameter[x509Certificate, filename, deleteOnExit]] begin[{]
local_variable[type[File], pemFile]
TryStatement(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation... | Keyword[private] identifier[String] identifier[saveCertificateAsPEMFile] operator[SEP] identifier[Object] identifier[x509Certificate] , identifier[String] identifier[filename] , Keyword[boolean] identifier[deleteOnExit] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[File] identifier[pemFile... |
public Object getValue()
{
String text = getAsText();
BlockingMode mode = BlockingMode.toBlockingMode(text);
return mode;
} | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[public], parameter[]] begin[{]
local_variable[type[String], text]
local_variable[type[BlockingMode], mode]
return[member[.mode]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[getValue] operator[SEP] operator[SEP] {
identifier[String] identifier[text] operator[=] identifier[getAsText] operator[SEP] operator[SEP] operator[SEP] identifier[BlockingMode] identifier[mode] operator[=] identifier[BlockingMode] operator[SEP] identifier[toBlockingM... |
public Object execute( String... args ) throws Exception
{
result = new Result( expectation );
try
{
result.setActual( message.send( mergeInputsWith( args ) ) );
}
catch (SystemUnderDevelopmentException e)
{
if(logger.isDebugEnabled()){
... | class class_name[name] begin[{]
method[execute, return_type[type[Object]], modifier[public], parameter[args]] begin[{]
assign[member[.result], ClassCreator(arguments=[MemberReference(member=expectation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructo... | Keyword[public] identifier[Object] identifier[execute] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[result] operator[=] Keyword[new] identifier[Result] operator[SEP] identifier[expectation] operator[SEP] operator[SEP] Keyword[try... |
@Override
public boolean isValid() {
if (!_isValid && com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
//only log this if it is invalid
String s = _isValid + appNameAndIdString;
LoggingUtil.SESSION_LOGGER_CO... | class class_name[name] begin[{]
method[isValid, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[._isValid], &&, call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLogg... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[_isValid] operator[&&] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] ide... |
private ClassInfo parseClassInfo() throws Exception {
String className = acceptString(input.readByte());
Class<?> type = SerTypeMapper.decodeType(className, settings, overrideBasePackage, null);
int propertyCount = acceptArray(input.readByte());
if (propertyCount < 0) {
throw... | class class_name[name] begin[{]
method[parseClassInfo, return_type[type[ClassInfo]], modifier[private], parameter[]] begin[{]
local_variable[type[String], className]
local_variable[type[Class], type]
local_variable[type[int], propertyCount]
if[binary_operation[member[.pr... | Keyword[private] identifier[ClassInfo] identifier[parseClassInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[className] operator[=] identifier[acceptString] operator[SEP] identifier[input] operator[SEP] identifier[readByte] operator[SEP] operator[SEP] operat... |
public String getIconPath(CmsListItem item) {
try {
CmsUser user = getCms().readUser((String)item.get(LIST_COLUMN_LOGIN));
if (user.getOuFqn().equals(getParamOufqn())) {
return A_CmsUsersList.PATH_BUTTONS + "user.png";
} else {
return A_CmsUse... | class class_name[name] begin[{]
method[getIconPath, return_type[type[String]], modifier[public], parameter[item]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCms, postfix_operat... | Keyword[public] identifier[String] identifier[getIconPath] operator[SEP] identifier[CmsListItem] identifier[item] operator[SEP] {
Keyword[try] {
identifier[CmsUser] identifier[user] operator[=] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] identifier[readUser] operator[SEP] operator[SEP... |
public void moveSourceToDest(LineNumberReader reader, PrintWriter dataOut)
{
m_bSkipTag = false;
m_bSkipTemplate = false;
m_setMatches = new HashSet<String>();
m_setNames = new HashSet<String>();
try {
this.scanTemplates(reader);
reader.close();
... | class class_name[name] begin[{]
method[moveSourceToDest, return_type[void], modifier[public], parameter[reader, dataOut]] begin[{]
assign[member[.m_bSkipTag], literal[false]]
assign[member[.m_bSkipTemplate], literal[false]]
assign[member[.m_setMatches], ClassCrea... | Keyword[public] Keyword[void] identifier[moveSourceToDest] operator[SEP] identifier[LineNumberReader] identifier[reader] , identifier[PrintWriter] identifier[dataOut] operator[SEP] {
identifier[m_bSkipTag] operator[=] literal[boolean] operator[SEP] identifier[m_bSkipTemplate] operator[=] literal[boolean] operat... |
void discardUnusedTail()
{
// we guard this with the OpOrdering instead of synchronised due to potential dead-lock with CLSM.advanceAllocatingFrom()
// this actually isn't strictly necessary, as currently all calls to discardUnusedTail occur within a block
// already protected by this OpOrde... | class class_name[name] begin[{]
method[discardUnusedTail, return_type[void], modifier[default], parameter[]] begin[{]
TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Method... | Keyword[void] identifier[discardUnusedTail] operator[SEP] operator[SEP] {
Keyword[try] operator[SEP] identifier[OpOrder] operator[SEP] identifier[Group] identifier[group] operator[=] identifier[appendOrder] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] {
Keyword[while] oper... |
@Override
public boolean isSendAllowed()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "isSendAllowed");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "isSendAllowed", new Boolean(_isSendAllowed));
... | class class_name[name] begin[{]
method[isSendAllowed, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isSendAllowed] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEn... |
public void setBillableRevenueOverride(com.google.api.ads.admanager.axis.v201808.Money billableRevenueOverride) {
this.billableRevenueOverride = billableRevenueOverride;
} | class class_name[name] begin[{]
method[setBillableRevenueOverride, return_type[void], modifier[public], parameter[billableRevenueOverride]] begin[{]
assign[THIS[member[None.billableRevenueOverride]], member[.billableRevenueOverride]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setBillableRevenueOverride] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[Mo... |
public Observable<Domain> getDomainAsync(UUID domainId) {
return getDomainWithServiceResponseAsync(domainId).map(new Func1<ServiceResponse<Domain>, Domain>() {
@Override
public Domain call(ServiceResponse<Domain> response) {
return response.body();
}
}... | class class_name[name] begin[{]
method[getDomainAsync, return_type[type[Observable]], modifier[public], parameter[domainId]] begin[{]
return[call[.getDomainWithServiceResponseAsync, parameter[member[.domainId]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Domain] operator[>] identifier[getDomainAsync] operator[SEP] identifier[UUID] identifier[domainId] operator[SEP] {
Keyword[return] identifier[getDomainWithServiceResponseAsync] operator[SEP] identifier[domainId] operator[SEP] operator[SEP] identifier[... |
@XmlElementDecl(namespace = "urn:FaxWS", name = "DIDList", scope = ConcordAccount.class)
public JAXBElement<DIDList> createConcordAccountDIDList(DIDList value) {
return new JAXBElement<DIDList>(_ConcordAccountDIDList_QNAME, DIDList.class, ConcordAccount.class, value);
} | class class_name[name] begin[{]
method[createConcordAccountDIDList, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_ConcordAccountDIDList_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Clas... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[ConcordAccount] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[D... |
public final int getIdleCount(IdleStatus status) {
if (getConfig().getIdleTime(status) == 0) {
if (status == IdleStatus.BOTH_IDLE) {
idleCountForBoth.set(0);
}
if (status == IdleStatus.READER_IDLE) {
idleCountForRead.set(0);
}
... | class class_name[name] begin[{]
method[getIdleCount, return_type[type[int]], modifier[final public], parameter[status]] begin[{]
if[binary_operation[call[.getConfig, parameter[]], ==, literal[0]]] begin[{]
if[binary_operation[member[.status], ==, member[IdleStatus.BOTH_I... | Keyword[public] Keyword[final] Keyword[int] identifier[getIdleCount] operator[SEP] identifier[IdleStatus] identifier[status] operator[SEP] {
Keyword[if] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getIdleTime] operator[SEP] identifier[status] operator[SEP] operator[==... |
protected void convertToPointerRepresentation(ArrayDBIDs ids, DoubleLongHeap heap, WritableDBIDDataStore pi, WritableDoubleDataStore lambda) {
final Logging LOG = getLogger();
// Initialize parent array:
for(DBIDArrayIter iter = ids.iter(); iter.valid(); iter.advance()) {
pi.put(iter, iter); // Initia... | class class_name[name] begin[{]
method[convertToPointerRepresentation, return_type[void], modifier[protected], parameter[ids, heap, pi, lambda]] begin[{]
local_variable[type[Logging], LOG]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(a... | Keyword[protected] Keyword[void] identifier[convertToPointerRepresentation] operator[SEP] identifier[ArrayDBIDs] identifier[ids] , identifier[DoubleLongHeap] identifier[heap] , identifier[WritableDBIDDataStore] identifier[pi] , identifier[WritableDoubleDataStore] identifier[lambda] operator[SEP] {
Keyword[fin... |
private Method getMethod(Object controller, String methodName) throws RoutesException {
try {
// try to retrieve the method and check if an exception is thrown
return controller.getClass().getMethod(methodName, Request.class, Response.class);
} catch (Exception e) {
throw new RoutesException(e);
}
} | class class_name[name] begin[{]
method[getMethod, return_type[type[Method]], modifier[private], parameter[controller, methodName]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=controller, sel... | Keyword[private] identifier[Method] identifier[getMethod] operator[SEP] identifier[Object] identifier[controller] , identifier[String] identifier[methodName] operator[SEP] Keyword[throws] identifier[RoutesException] {
Keyword[try] {
Keyword[return] identifier[controller] operator[SEP] identifier[getC... |
public static byte[] toHexByteArray(final byte[] buffer, final int offset, final int length)
{
final byte[] outputBuffer = new byte[length << 1];
for (int i = 0; i < (length << 1); i += 2)
{
final byte b = buffer[offset + (i >> 1)];
outputBuffer[i] = HEX_DIGIT_TABLE... | class class_name[name] begin[{]
method[toHexByteArray, return_type[type[byte]], modifier[public static], parameter[buffer, offset, length]] begin[{]
local_variable[type[byte], outputBuffer]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declara... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[toHexByteArray] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[length] operator[SEP] {
Keywor... |
private Object prepareValue(Class expectedClass, Object pValue) {
if (pValue == null) {
return null;
}
if (Enum.class.isAssignableFrom(expectedClass)) {
return Enum.valueOf(expectedClass,pValue.toString());
} else {
return prepareForDirectUsage(expecte... | class class_name[name] begin[{]
method[prepareValue, return_type[type[Object]], modifier[private], parameter[expectedClass, pValue]] begin[{]
if[binary_operation[member[.pValue], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
... | Keyword[private] identifier[Object] identifier[prepareValue] operator[SEP] identifier[Class] identifier[expectedClass] , identifier[Object] identifier[pValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[pValue] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP... |
public void marshall(LambdaDataSourceConfig lambdaDataSourceConfig, ProtocolMarshaller protocolMarshaller) {
if (lambdaDataSourceConfig == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(lambdaDataSou... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[lambdaDataSourceConfig, protocolMarshaller]] begin[{]
if[binary_operation[member[.lambdaDataSourceConfig], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[L... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[LambdaDataSourceConfig] identifier[lambdaDataSourceConfig] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[lambdaDataSourceConfig] operator[==] Other[null] operator[SE... |
@Pure
public static String[] split(URL filename) {
if (filename == null) {
return new String[0];
}
if (isJarURL(filename)) {
return split(getJarFile(filename));
}
final String path = filename.getPath();
String[] tab = path.split(Pattern.quote(URL_PATH_SEPARATOR));
if (tab.length >= 2 && "".equals(t... | class class_name[name] begin[{]
method[split, return_type[type[String]], modifier[public static], parameter[filename]] begin[{]
if[binary_operation[member[.filename], ==, literal[null]]] begin[{]
return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qual... | annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[URL] identifier[filename] operator[SEP] {
Keyword[if] operator[SEP] identifier[filename] operator[==] Other[null] operator[SEP] {
Keyword[return] Key... |
public void setRegularization(double regularization)
{
if (Double.isInfinite(regularization) || Double.isNaN(regularization) || regularization <= 0)
throw new IllegalArgumentException("Regularization must be a positive value");
this.reg = regularization;
} | class class_name[name] begin[{]
method[setRegularization, return_type[void], modifier[public], parameter[regularization]] begin[{]
if[binary_operation[binary_operation[call[Double.isInfinite, parameter[member[.regularization]]], ||, call[Double.isNaN, parameter[member[.regularization]]]], ||, b... | Keyword[public] Keyword[void] identifier[setRegularization] operator[SEP] Keyword[double] identifier[regularization] operator[SEP] {
Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[regularization] operator[SEP] operator[||] identifier[Double] operator[SE... |
public static void multiplyMM(float[] result, int resultOffset,
float[] lhs, int lhsOffset, float[] rhs, int rhsOffset) {
result[resultOffset + 0] = rhs[0] * lhs[0] + rhs[1] * lhs[4] + rhs[2] * lhs[8] + rhs[3] * lhs[12];
result[resultOffset + 1] = rhs[0] * lhs[1] + rhs[1] * lhs[5] + rhs[2] * lh... | class class_name[name] begin[{]
method[multiplyMM, return_type[void], modifier[public static], parameter[result, resultOffset, lhs, lhsOffset, rhs, rhsOffset]] begin[{]
assign[member[.result], binary_operation[binary_operation[binary_operation[binary_operation[member[.rhs], *, member[.lhs]], +,... | Keyword[public] Keyword[static] Keyword[void] identifier[multiplyMM] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[result] , Keyword[int] identifier[resultOffset] , Keyword[float] operator[SEP] operator[SEP] identifier[lhs] , Keyword[int] identifier[lhsOffset] , Keyword[float] operator[SEP] op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.