code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private void detectFileChange() throws IOException {
checkClosed();
assert Thread.holdsLock(filePosLock);
while(!file.exists()) {
try {
System.err.println("File not found, waiting: " + file.getPath());
Thread.sleep(pollInterval);
} catch(InterruptedException e) {
InterruptedIOException newExc = ... | class class_name[name] begin[{]
method[detectFileChange, return_type[void], modifier[private], parameter[]] begin[{]
call[.checkClosed, parameter[]]
AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=filePosLock, postfix_operators=[], prefix_operators=[], quali... | Keyword[private] Keyword[void] identifier[detectFileChange] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[Thread] operator[SEP] identifier[holdsLock] operator[SEP] identifier[filePosLock] operator... |
private void writeEOFRecord() throws IOException {
for (int i = 0; i < this.recordBuf.length; ++i) {
this.recordBuf[i] = 0;
}
this.buffer.writeRecord(this.recordBuf);
} | class class_name[name] begin[{]
method[writeEOFRecord, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[Me... | Keyword[private] Keyword[void] identifier[writeEOFRecord] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[recordBuf] operator[SEP] identi... |
public static base_responses enable(nitro_service client, String id[]) throws Exception {
base_responses result = null;
if (id != null && id.length > 0) {
Interface enableresources[] = new Interface[id.length];
for (int i=0;i<id.length;i++){
enableresources[i] = new Interface();
enableresources[i].id ... | class class_name[name] begin[{]
method[enable, return_type[type[base_responses]], modifier[public static], parameter[client, id]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.id], !=, literal[null]], &&, binary_operation[member[id.le... | Keyword[public] Keyword[static] identifier[base_responses] identifier[enable] operator[SEP] identifier[nitro_service] identifier[client] , identifier[String] identifier[id] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result] operator[=]... |
public boolean hasNext()
{
while (_list.hasMoreTokens() && (_current.length() == 0))
{
_current = _list.nextToken();
}
return (_current.length() > 0);
} | class class_name[name] begin[{]
method[hasNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
while[binary_operation[call[_list.hasMoreTokens, parameter[]], &&, binary_operation[call[_current.length, parameter[]], ==, literal[0]]]] begin[{]
assign[m... | Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] identifier[_list] operator[SEP] identifier[hasMoreTokens] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[_current] operator[SEP] identifier[length] operator[SEP] operator[SEP] operat... |
public final AbstractItemLink remove(long key) {
AbstractItemLink link = null;
int i = _indexOfKey(key);
synchronized (_getLock(i)) {
Entry previousEntry = _entry[i];
Entry thisEntry = previousEntry;
while (null != thisEntry && null == link) {
... | class class_name[name] begin[{]
method[remove, return_type[type[AbstractItemLink]], modifier[final public], parameter[key]] begin[{]
local_variable[type[AbstractItemLink], link]
local_variable[type[int], i]
SYNCHRONIZED[call[._getLock, parameter[member[.i]]]] BEGIN[{]
... | Keyword[public] Keyword[final] identifier[AbstractItemLink] identifier[remove] operator[SEP] Keyword[long] identifier[key] operator[SEP] {
identifier[AbstractItemLink] identifier[link] operator[=] Other[null] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[_indexOfKey] operator[SEP] identifier[ke... |
private void stream(InputStream is, File destFile) throws IOException {
try {
startProgress();
OutputStream os = new FileOutputStream(destFile);
boolean finished = false;
try {
byte[] buf = new byte[1024 * 10];
int read... | class class_name[name] begin[{]
method[stream, return_type[void], modifier[private], parameter[is, destFile]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=startProgress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_argume... | Keyword[private] Keyword[void] identifier[stream] operator[SEP] identifier[InputStream] identifier[is] , identifier[File] identifier[destFile] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[startProgress] operator[SEP] operator[SEP] operator[SEP] identifier[OutputSt... |
public void expectMatch(String name, List<String> values) {
expectMatch(name, messages.get(Validation.MATCH_VALUES_KEY.name(), name), values);
} | class class_name[name] begin[{]
method[expectMatch, return_type[void], modifier[public], parameter[name, values]] begin[{]
call[.expectMatch, parameter[member[.name], call[messages.get, parameter[call[Validation.MATCH_VALUES_KEY.name, parameter[]], member[.name]]], member[.values]]]
end[}]
... | Keyword[public] Keyword[void] identifier[expectMatch] operator[SEP] identifier[String] identifier[name] , identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[SEP] {
identifier[expectMatch] operator[SEP] identifier[name] , identifier[messages] operator[SEP] identifier[get] op... |
public static ParameterizedAnalyticsQuery parameterized(final String statement,
final JsonArray positionalParams, final AnalyticsParams params) {
return new ParameterizedAnalyticsQuery(statement, positionalParams, null, params);
} | class class_name[name] begin[{]
method[parameterized, return_type[type[ParameterizedAnalyticsQuery]], modifier[public static], parameter[statement, positionalParams, params]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=statement, postfix_operators=[], prefix_operators=[], qualifier=,... | Keyword[public] Keyword[static] identifier[ParameterizedAnalyticsQuery] identifier[parameterized] operator[SEP] Keyword[final] identifier[String] identifier[statement] , Keyword[final] identifier[JsonArray] identifier[positionalParams] , Keyword[final] identifier[AnalyticsParams] identifier[params] operator[SEP] {
... |
public static String determineServletContextPath(HttpServletRequest theRequest, RestfulServer server) {
String retVal;
if (server.getServletContext() != null) {
if (server.getServletContext().getMajorVersion() >= 3 || (server.getServletContext().getMajorVersion() > 2 && server.getServletContext().getMinorVersion... | class class_name[name] begin[{]
method[determineServletContextPath, return_type[type[String]], modifier[public static], parameter[theRequest, server]] begin[{]
local_variable[type[String], retVal]
if[binary_operation[call[server.getServletContext, parameter[]], !=, literal[null]]] begin... | Keyword[public] Keyword[static] identifier[String] identifier[determineServletContextPath] operator[SEP] identifier[HttpServletRequest] identifier[theRequest] , identifier[RestfulServer] identifier[server] operator[SEP] {
identifier[String] identifier[retVal] operator[SEP] Keyword[if] operator[SEP] identifier[s... |
public static String trimTo(final String aString, final String aDefault) {
if (aString == null) {
return aDefault;
}
final String trimmed = aString.trim();
return trimmed.length() == 0 ? aDefault : trimmed;
} | class class_name[name] begin[{]
method[trimTo, return_type[type[String]], modifier[public static], parameter[aString, aDefault]] begin[{]
if[binary_operation[member[.aString], ==, literal[null]]] begin[{]
return[member[.aDefault]]
else begin[{]
None
end[}]
lo... | Keyword[public] Keyword[static] identifier[String] identifier[trimTo] operator[SEP] Keyword[final] identifier[String] identifier[aString] , Keyword[final] identifier[String] identifier[aDefault] operator[SEP] {
Keyword[if] operator[SEP] identifier[aString] operator[==] Other[null] operator[SEP] {
Key... |
protected String createName() {
final StringBuilder buf = new StringBuilder(128);
try {
buf.append(InetAddress.getLocalHost().getHostName()).append(COLON)
.append(ManagementFactory.getRuntimeMXBean().getName().split("@")[0]) // PID
.append('-').append(... | class class_name[name] begin[{]
method[createName, return_type[type[String]], modifier[protected], parameter[]] begin[{]
local_variable[type[StringBuilder], buf]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalHost, po... | Keyword[protected] identifier[String] identifier[createName] operator[SEP] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[128] operator[SEP] operator[SEP] Keyword[try] {
identifier[buf] operator[SEP] ident... |
@Nullable
public static CascadingStyleSheet readFromReader (@Nonnull final IHasReader aRP,
@Nonnull final CSSReaderSettings aSettings)
{
ValueEnforcer.notNull (aRP, "ReaderProvider");
ValueEnforcer.notNull (aSettings, "Settings");
// Create the reader... | class class_name[name] begin[{]
method[readFromReader, return_type[type[CascadingStyleSheet]], modifier[public static], parameter[aRP, aSettings]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aRP], literal["ReaderProvider"]]]
call[ValueEnforcer.notNull, parameter[membe... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[CascadingStyleSheet] identifier[readFromReader] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IHasReader] identifier[aRP] , annotation[@] identifier[Nonnull] Keyword[final] identifier[CSSReaderSettings] identifier... |
public static double getPvalue(TransposeDataCollection transposeDataCollection) {
if(transposeDataCollection.size()!=2) {
throw new IllegalArgumentException("The collection must contain observations from 2 groups.");
}
Object[] keys = transposeDataCollection.keySet().toArray... | class class_name[name] begin[{]
method[getPvalue, return_type[type[double]], modifier[public static], parameter[transposeDataCollection]] begin[{]
if[binary_operation[call[transposeDataCollection.size, parameter[]], !=, literal[2]]] begin[{]
ThrowStatement(expression=ClassCreator(ar... | Keyword[public] Keyword[static] Keyword[double] identifier[getPvalue] operator[SEP] identifier[TransposeDataCollection] identifier[transposeDataCollection] operator[SEP] {
Keyword[if] operator[SEP] identifier[transposeDataCollection] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[2... |
public SmiType createIntegerType(IdToken idToken, IntKeywordToken intToken, Token applicationTagToken, List<SmiNamedNumber> namedNumbers, List<SmiRange> rangeConstraints) {
if (idToken == null && intToken.getPrimitiveType() == INTEGER && namedNumbers == null && rangeConstraints == null) {
return Smi... | class class_name[name] begin[{]
method[createIntegerType, return_type[type[SmiType]], modifier[public], parameter[idToken, intToken, applicationTagToken, namedNumbers, rangeConstraints]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.idToken], ==, litera... | Keyword[public] identifier[SmiType] identifier[createIntegerType] operator[SEP] identifier[IdToken] identifier[idToken] , identifier[IntKeywordToken] identifier[intToken] , identifier[Token] identifier[applicationTagToken] , identifier[List] operator[<] identifier[SmiNamedNumber] operator[>] identifier[namedNumbers]... |
@Override
public void handleApplicationCommandRequest(SerialMessage serialMessage,
int offset, int endpoint) {
logger.trace("Handle Message Switch Multi Level Request");
logger.debug(String.format("Received Switch Multi Level Request for Node ID = %d", this.getNode().getNodeId()));
int command = serialMe... | class class_name[name] begin[{]
method[handleApplicationCommandRequest, return_type[void], modifier[public], parameter[serialMessage, offset, endpoint]] begin[{]
call[logger.trace, parameter[literal["Handle Message Switch Multi Level Request"]]]
call[logger.debug, parameter[call... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleApplicationCommandRequest] operator[SEP] identifier[SerialMessage] identifier[serialMessage] , Keyword[int] identifier[offset] , Keyword[int] identifier[endpoint] operator[SEP] {
identifier[logger] operator[SEP] identifier[trace]... |
@Override
public X509Certificate getX509CertificateFromKeyStore(String keyStoreName) throws KeyStoreException, CertificateException {
try {
KeyStore ks = ksMgr.getJavaKeyStore(keyStoreName);
if (ks == null) {
throw new KeyStoreException("The keystore [" + keyStoreName... | class class_name[name] begin[{]
method[getX509CertificateFromKeyStore, return_type[type[X509Certificate]], modifier[public], parameter[keyStoreName]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(argumen... | annotation[@] identifier[Override] Keyword[public] identifier[X509Certificate] identifier[getX509CertificateFromKeyStore] operator[SEP] identifier[String] identifier[keyStoreName] operator[SEP] Keyword[throws] identifier[KeyStoreException] , identifier[CertificateException] {
Keyword[try] {
identifie... |
public <T> void spliterator(Spliterator<T> s, ResultStream<T> result)
{
ArrayList<Spliterator<T>> splits = new ArrayList<>();
splits.add(s);
int count = 2 * getTaskManager().getWorkers();
split(splits, count);
int size = splits.size();
if (size == 1) {
getTaskManager(... | class class_name[name] begin[{]
method[spliterator, return_type[void], modifier[public], parameter[s, result]] begin[{]
local_variable[type[ArrayList], splits]
call[splits.add, parameter[member[.s]]]
local_variable[type[int], count]
call[.split, parameter[member[... | Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[spliterator] operator[SEP] identifier[Spliterator] operator[<] identifier[T] operator[>] identifier[s] , identifier[ResultStream] operator[<] identifier[T] operator[>] identifier[result] operator[SEP] {
identifier[ArrayList] operator... |
protected Class<?> findClass(String name) throws ClassNotFoundException {
byte[] binaryRepresentation = persistenceHandler.lookup(name, typeDefinitions);
if (binaryRepresentation == null) {
throw new ClassNotFoundException(name);
} else {
try {
byte[] tran... | class class_name[name] begin[{]
method[findClass, return_type[type[Class]], modifier[protected], parameter[name]] begin[{]
local_variable[type[byte], binaryRepresentation]
if[binary_operation[member[.binaryRepresentation], ==, literal[null]]] begin[{]
ThrowStatement(expressi... | Keyword[protected] identifier[Class] operator[<] operator[?] operator[>] identifier[findClass] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[binaryRepresentation] operator[=] identifier[per... |
public void addLayerWithFilter(String resultTag, String serverLayerId, String filter) {
// note: layer filter specification will be overwritten if it already
// exists
layerFilters.put(resultTag, new LayerFilterSpecification(serverLayerId, filter));
} | class class_name[name] begin[{]
method[addLayerWithFilter, return_type[void], modifier[public], parameter[resultTag, serverLayerId, filter]] begin[{]
call[layerFilters.put, parameter[member[.resultTag], ClassCreator(arguments=[MemberReference(member=serverLayerId, postfix_operators=[], prefix_o... | Keyword[public] Keyword[void] identifier[addLayerWithFilter] operator[SEP] identifier[String] identifier[resultTag] , identifier[String] identifier[serverLayerId] , identifier[String] identifier[filter] operator[SEP] {
identifier[layerFilters] operator[SEP] identifier[put] operator[SEP] identifier[resultTag] ,... |
public void setParamTabEdDirectEditButtonStyle(String value) {
try {
m_userSettings.setDirectEditButtonStyle(Integer.parseInt(value));
} catch (Throwable t) {
// should usually never happen
}
} | class class_name[name] begin[{]
method[setParamTabEdDirectEditButtonStyle, return_type[void], modifier[public], parameter[value]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefi... | Keyword[public] Keyword[void] identifier[setParamTabEdDirectEditButtonStyle] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[try] {
identifier[m_userSettings] operator[SEP] identifier[setDirectEditButtonStyle] operator[SEP] identifier[Integer] operator[SEP] identifier[parseI... |
public void setDirectories(java.util.Collection<WorkspaceDirectory> directories) {
if (directories == null) {
this.directories = null;
return;
}
this.directories = new com.amazonaws.internal.SdkInternalList<WorkspaceDirectory>(directories);
} | class class_name[name] begin[{]
method[setDirectories, return_type[void], modifier[public], parameter[directories]] begin[{]
if[binary_operation[member[.directories], ==, literal[null]]] begin[{]
assign[THIS[member[None.directories]], literal[null]]
return[No... | Keyword[public] Keyword[void] identifier[setDirectories] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[WorkspaceDirectory] operator[>] identifier[directories] operator[SEP] {
Keyword[if] operator[SEP] identifier[directories] operator[==]... |
@NotNull
@Size(max = 1000)
@ApiModelProperty(required = true, value = "")
public String getQuery() {
return query;
} | class class_name[name] begin[{]
method[getQuery, return_type[type[String]], modifier[public], parameter[]] begin[{]
return[member[.query]]
end[}]
END[}] | annotation[@] identifier[NotNull] annotation[@] identifier[Size] operator[SEP] identifier[max] operator[=] Other[1000] operator[SEP] annotation[@] identifier[ApiModelProperty] operator[SEP] identifier[required] operator[=] literal[boolean] , identifier[value] operator[=] literal[String] operator[SEP] Keyword[public] i... |
public int read() {
while (rleRepeat < 1) {
if (bwtBytesDecoded == bwtBlockLength) {
return -1;
}
int nextByte = decodeNextBWTByte();
if (nextByte != rleLastDecodedByte) {
// New byte, restart accumulation
rleLastDe... | class class_name[name] begin[{]
method[read, return_type[type[int]], modifier[public], parameter[]] begin[{]
while[binary_operation[member[.rleRepeat], <, literal[1]]] begin[{]
if[binary_operation[member[.bwtBytesDecoded], ==, member[.bwtBlockLength]]] begin[{]
... | Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] identifier[rleRepeat] operator[<] Other[1] operator[SEP] {
Keyword[if] operator[SEP] identifier[bwtBytesDecoded] operator[==] identifier[bwtBlockLength] operator[SEP] {
Keyword[retur... |
protected final Value decodeNumberLax(boolean minus) {
char[] array = charArray;
final int startIndex = __index;
int index = __index;
char currentChar;
boolean doubleFloat = false;
boolean foundDot = false;
boolean foundSign = false;
boolean foundExp = fa... | class class_name[name] begin[{]
method[decodeNumberLax, return_type[type[Value]], modifier[final protected], parameter[minus]] begin[{]
local_variable[type[char], array]
local_variable[type[int], startIndex]
local_variable[type[int], index]
local_variable[type[char], currentChar... | Keyword[protected] Keyword[final] identifier[Value] identifier[decodeNumberLax] operator[SEP] Keyword[boolean] identifier[minus] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[array] operator[=] identifier[charArray] operator[SEP] Keyword[final] Keyword[int] identifier[startIndex] operator[... |
public static <L, K> void addListener (Map<K, ListenerList<L>> map, K key, L listener)
{
ListenerList<L> list = map.get(key);
if (list == null) {
map.put(key, list = new ListenerList<L>());
}
list.add(listener);
} | class class_name[name] begin[{]
method[addListener, return_type[void], modifier[public static], parameter[map, key, listener]] begin[{]
local_variable[type[ListenerList], list]
if[binary_operation[member[.list], ==, literal[null]]] begin[{]
call[map.put, paramete... | Keyword[public] Keyword[static] operator[<] identifier[L] , identifier[K] operator[>] Keyword[void] identifier[addListener] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[ListenerList] operator[<] identifier[L] operator[>] operator[>] identifier[map] , identifier[K] identifier[key] , identifie... |
public void setEnd(Date endDate) {
if ((null == endDate) || getStart().after(endDate)) {
m_explicitEnd = null;
} else {
m_explicitEnd = endDate;
}
} | class class_name[name] begin[{]
method[setEnd, return_type[void], modifier[public], parameter[endDate]] begin[{]
if[binary_operation[binary_operation[literal[null], ==, member[.endDate]], ||, call[.getStart, parameter[]]]] begin[{]
assign[member[.m_explicitEnd], literal[... | Keyword[public] Keyword[void] identifier[setEnd] operator[SEP] identifier[Date] identifier[endDate] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] Other[null] operator[==] identifier[endDate] operator[SEP] operator[||] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] identifier[after] oper... |
public void marshall(GetJobOutputRequest getJobOutputRequest, ProtocolMarshaller protocolMarshaller) {
if (getJobOutputRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getJobOutputRequest.ge... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getJobOutputRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getJobOutputRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetJobOutputRequest] identifier[getJobOutputRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getJobOutputRequest] operator[==] Other[null] operator[SEP] {
... |
static int implicitValence(int elem, int q, int val) {
switch (elem) {
case 1: // H
case 3: // Li
case 11: // Na
case 19: // K
case 37: // Rb
case 55: // Cs
case 87: // Fr
if (q == 0 && val <= 1) return 1;
... | class class_name[name] begin[{]
method[implicitValence, return_type[type[int]], modifier[static], parameter[elem, q, val]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], p... | Keyword[static] Keyword[int] identifier[implicitValence] operator[SEP] Keyword[int] identifier[elem] , Keyword[int] identifier[q] , Keyword[int] identifier[val] operator[SEP] {
Keyword[switch] operator[SEP] identifier[elem] operator[SEP] {
Keyword[case] Other[1] operator[:] Keyword[case] Other[3] o... |
public boolean removeSearchFieldMapping(CmsLuceneField field, CmsSearchFieldMapping mapping)
throws CmsIllegalStateException {
if (field.getMappings().size() < 2) {
throw new CmsIllegalStateException(
Messages.get().container(
Messages.ERR_FIELD_MAPPING_DELET... | class class_name[name] begin[{]
method[removeSearchFieldMapping, return_type[type[boolean]], modifier[public], parameter[field, mapping]] begin[{]
if[binary_operation[call[field.getMappings, parameter[]], <, literal[2]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Met... | Keyword[public] Keyword[boolean] identifier[removeSearchFieldMapping] operator[SEP] identifier[CmsLuceneField] identifier[field] , identifier[CmsSearchFieldMapping] identifier[mapping] operator[SEP] Keyword[throws] identifier[CmsIllegalStateException] {
Keyword[if] operator[SEP] identifier[field] operator[SEP] ... |
private void setLegacyParam(String legacyParamName, Object paramValue) {
if (!m_bWarnedLegacyParam) {
logger.warn("Parameter '{}': Legacy parameter format is being phased-out. " +
"Please use new module/parameter format.", legacyParamName);
m_bWarnedLegacyPara... | class class_name[name] begin[{]
method[setLegacyParam, return_type[void], modifier[private], parameter[legacyParamName, paramValue]] begin[{]
if[member[.m_bWarnedLegacyParam]] begin[{]
call[logger.warn, parameter[binary_operation[literal["Parameter '{}': Legacy parameter... | Keyword[private] Keyword[void] identifier[setLegacyParam] operator[SEP] identifier[String] identifier[legacyParamName] , identifier[Object] identifier[paramValue] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[m_bWarnedLegacyParam] operator[SEP] {
identifier[logger] operator[SEP] id... |
public static void skip(final DataInput in) throws IOException {
final int length = in.readInt();
skipFully(in, length);
} | class class_name[name] begin[{]
method[skip, return_type[void], modifier[public static], parameter[in]] begin[{]
local_variable[type[int], length]
call[.skipFully, parameter[member[.in], member[.length]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[skip] operator[SEP] Keyword[final] identifier[DataInput] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[int] identifier[length] operator[=] identifier[in] operator[SEP] identifier[readInt] operator[SEP] operat... |
public void update(int n, byte[] b, int off, int len,
ManifestEntryVerifier mev)
throws IOException
{
if (n != -1) {
if (parsingBlockOrSF) {
baos.write(b, off, n);
} else {
mev.update(b, off, n);
}
} e... | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[n, b, off, len, mev]] begin[{]
if[binary_operation[member[.n], !=, literal[1]]] begin[{]
if[member[.parsingBlockOrSF]] begin[{]
call[baos.write, ... | Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[int] identifier[n] , Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[off] , Keyword[int] identifier[len] , identifier[ManifestEntryVerifier] identifier[mev] operator[SEP] Keyword[throws] identifier[IOException] ... |
public alluxio.grpc.ReadPType getReadType() {
alluxio.grpc.ReadPType result = alluxio.grpc.ReadPType.valueOf(readType_);
return result == null ? alluxio.grpc.ReadPType.NO_CACHE : result;
} | class class_name[name] begin[{]
method[getReadType, return_type[type[alluxio]], modifier[public], parameter[]] begin[{]
local_variable[type[alluxio], result]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qua... | Keyword[public] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[ReadPType] identifier[getReadType] operator[SEP] operator[SEP] {
identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[ReadPType] identifier[result] operator[=] identifier[alluxio] operator[SEP] iden... |
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/building/2.0", name = "CeilingSurface", substitutionHeadNamespace = "http://www.opengis.net/citygml/building/2.0", substitutionHeadName = "_BoundarySurface")
public JAXBElement<CeilingSurfaceType> createCeilingSurface(CeilingSurfaceType value) {
re... | class class_name[name] begin[{]
method[createCeilingSurface, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_CeilingSurface_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(pos... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] iden... |
public PagedList<Resource> listResource(final Integer top) {
ServiceResponse<Page<Resource>> response = listResourceSinglePageAsync(top).toBlocking().single();
return new PagedList<Resource>(response.body()) {
@Override
public Page<Resource> nextPage(String nextPageLink) {
... | class class_name[name] begin[{]
method[listResource, return_type[type[PagedList]], modifier[public], parameter[top]] begin[{]
local_variable[type[ServiceResponse], response]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=body, postfix_operators=[], prefix_operators=[], qua... | Keyword[public] identifier[PagedList] operator[<] identifier[Resource] operator[>] identifier[listResource] operator[SEP] Keyword[final] identifier[Integer] identifier[top] operator[SEP] {
identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[Resource] operator[>] operator[>] identifier... |
public ModelView fromJSON(Model mo, JSONObject in) throws JSONConverterException {
checkKeys(in, ModelViewConverter.IDENTIFIER);
Object id = in.get(ModelViewConverter.IDENTIFIER);
ModelViewConverter<? extends ModelView> c = json2java.get(id.toString());
if (c == null) {
throw... | class class_name[name] begin[{]
method[fromJSON, return_type[type[ModelView]], modifier[public], parameter[mo, in]] begin[{]
call[.checkKeys, parameter[member[.in], member[ModelViewConverter.IDENTIFIER]]]
local_variable[type[Object], id]
local_variable[type[ModelViewConverter], ... | Keyword[public] identifier[ModelView] identifier[fromJSON] operator[SEP] identifier[Model] identifier[mo] , identifier[JSONObject] identifier[in] operator[SEP] Keyword[throws] identifier[JSONConverterException] {
identifier[checkKeys] operator[SEP] identifier[in] , identifier[ModelViewConverter] operator[SEP] ... |
private void extractAnnotation() {
for (Class<? extends IFile> clazz : LISTE_CLASS) {
Map<ITag, AnnotationData> maps = new HashMap<ITag, AnnotationData>();
Set<AnnotationData> set = new TreeSet<AnnotationData>();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
AnnotationData... | class class_name[name] begin[{]
method[extractAnnotation, return_type[void], modifier[private], parameter[]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], b... | Keyword[private] Keyword[void] identifier[extractAnnotation] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[IFile] operator[>] identifier[clazz] operator[:] identifier[LISTE_CLASS] operator[SEP] {
identifier[Map] operator... |
static RawPacket nextPacket(final InputStream is) throws IOException {
byte[] lengthBuffer = readLengthSeq(is);
int length = (lengthBuffer[0] & 0xff) + ((lengthBuffer[1] & 0xff) << 8) + ((lengthBuffer[2] & 0xff) << 16);
if (length == -1) {
return null;
}
if (length <... | class class_name[name] begin[{]
method[nextPacket, return_type[type[RawPacket]], modifier[static], parameter[is]] begin[{]
local_variable[type[byte], lengthBuffer]
local_variable[type[int], length]
if[binary_operation[member[.length], ==, literal[1]]] begin[{]
return... | Keyword[static] identifier[RawPacket] identifier[nextPacket] operator[SEP] Keyword[final] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[lengthBuffer] operator[=] identifier[readLengthSeq] operator[SEP] identifie... |
@Override
public <T extends BullhornEntity, L extends ListWrapper<T>> L findMultipleEntity(Class<T> type, Set<Integer> idList, Set<String> fieldSet) {
return this.handleGetMultipleEntities(type, idList, fieldSet, ParamFactory.entityParams());
} | class class_name[name] begin[{]
method[findMultipleEntity, return_type[type[L]], modifier[public], parameter[type, idList, fieldSet]] begin[{]
return[THIS[call[None.handleGetMultipleEntities, parameter[member[.type], member[.idList], member[.fieldSet], call[ParamFactory.entityParams, parameter[]]]]]]
... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[BullhornEntity] , identifier[L] Keyword[extends] identifier[ListWrapper] operator[<] identifier[T] operator[>] operator[>] identifier[L] identifier[findMultipleEntity] operator[SEP] identifier[Class] operator[<] id... |
public double add(int index, double delta) {
magnitude -= vector[index] * vector[index];
vector[index] += delta;
magnitude += vector[index] * vector[index];
return vector[index];
} | class class_name[name] begin[{]
method[add, return_type[type[double]], modifier[public], parameter[index, delta]] begin[{]
assign[member[.magnitude], binary_operation[member[.vector], *, member[.vector]]]
assign[member[.vector], member[.delta]]
assign[member[.mag... | Keyword[public] Keyword[double] identifier[add] operator[SEP] Keyword[int] identifier[index] , Keyword[double] identifier[delta] operator[SEP] {
identifier[magnitude] operator[-=] identifier[vector] operator[SEP] identifier[index] operator[SEP] operator[*] identifier[vector] operator[SEP] identifier[index] oper... |
@NullSafe
public static double max(final double... values) {
double maxValue = Double.NaN;
if (values != null) {
for (double value : values) {
maxValue = (Double.isNaN(maxValue) ? value : Math.max(maxValue, value));
}
}
return maxValue;
} | class class_name[name] begin[{]
method[max, return_type[type[double]], modifier[public static], parameter[values]] begin[{]
local_variable[type[double], maxValue]
if[binary_operation[member[.values], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, s... | annotation[@] identifier[NullSafe] Keyword[public] Keyword[static] Keyword[double] identifier[max] operator[SEP] Keyword[final] Keyword[double] operator[...] identifier[values] operator[SEP] {
Keyword[double] identifier[maxValue] operator[=] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] Keyword[... |
public static IntegerVector subtract(IntegerVector vector1,
IntegerVector vector2) {
if (vector2.length() != vector1.length())
throw new IllegalArgumentException(
"Vectors of different sizes cannot be added");
// If vector is a spa... | class class_name[name] begin[{]
method[subtract, return_type[type[IntegerVector]], modifier[public static], parameter[vector1, vector2]] begin[{]
if[binary_operation[call[vector2.length, parameter[]], !=, call[vector1.length, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(argume... | Keyword[public] Keyword[static] identifier[IntegerVector] identifier[subtract] operator[SEP] identifier[IntegerVector] identifier[vector1] , identifier[IntegerVector] identifier[vector2] operator[SEP] {
Keyword[if] operator[SEP] identifier[vector2] operator[SEP] identifier[length] operator[SEP] operator[SEP] op... |
public static <T> T with(HttpRequest request, Supplier<T> callable) {
HttpRequest existing = REQUEST.get();
boolean isSet = false;
try {
if (request != existing) {
isSet = true;
REQUEST.set(request);
}
return callable.get();
... | class class_name[name] begin[{]
method[with, return_type[type[T]], modifier[public static], parameter[request, callable]] begin[{]
local_variable[type[HttpRequest], existing]
local_variable[type[boolean], isSet]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberRe... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[with] operator[SEP] identifier[HttpRequest] identifier[request] , identifier[Supplier] operator[<] identifier[T] operator[>] identifier[callable] operator[SEP] {
identifier[HttpRequest] identifier[existing] operator[=... |
protected File getStoreFile(StoreReference store)
{
if (store instanceof FileStoreReference) {
return ((FileStoreReference) store).getFile();
}
throw new IllegalArgumentException(String.format("Unsupported store reference [%s] for this implementation.",
store.getClass... | class class_name[name] begin[{]
method[getStoreFile, return_type[type[File]], modifier[protected], parameter[store]] begin[{]
if[binary_operation[member[.store], instanceof, type[FileStoreReference]]] begin[{]
return[Cast(expression=MemberReference(member=store, postfix_operators=[]... | Keyword[protected] identifier[File] identifier[getStoreFile] operator[SEP] identifier[StoreReference] identifier[store] operator[SEP] {
Keyword[if] operator[SEP] identifier[store] Keyword[instanceof] identifier[FileStoreReference] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[... |
public static <A> Codec<ISeq<A>, AnyGene<A>> ofVector(
final Supplier<? extends A> supplier,
final Predicate<? super A> alleleValidator,
final Predicate<? super ISeq<A>> alleleSeqValidator,
final int length
) {
requireNonNull(supplier);
requireNonNull(alleleSeqValidator);
requireNonNull(alleleSeqValidato... | class class_name[name] begin[{]
method[ofVector, return_type[type[Codec]], modifier[public static], parameter[supplier, alleleValidator, alleleSeqValidator, length]] begin[{]
call[.requireNonNull, parameter[member[.supplier]]]
call[.requireNonNull, parameter[member[.alleleSeqVal... | Keyword[public] Keyword[static] operator[<] identifier[A] operator[>] identifier[Codec] operator[<] identifier[ISeq] operator[<] identifier[A] operator[>] , identifier[AnyGene] operator[<] identifier[A] operator[>] operator[>] identifier[ofVector] operator[SEP] Keyword[final] identifier[Supplier] operator[<] operator[... |
@VisibleForTesting
Block createNextBlockWithCoinbase(long version, byte[] pubKey, final int height) {
return createNextBlock(null, version, (TransactionOutPoint) null,
Utils.currentTimeSeconds(), pubKey, FIFTY_COINS, height);
} | class class_name[name] begin[{]
method[createNextBlockWithCoinbase, return_type[type[Block]], modifier[default], parameter[version, pubKey, height]] begin[{]
return[call[.createNextBlock, parameter[literal[null], member[.version], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], quali... | annotation[@] identifier[VisibleForTesting] identifier[Block] identifier[createNextBlockWithCoinbase] operator[SEP] Keyword[long] identifier[version] , Keyword[byte] operator[SEP] operator[SEP] identifier[pubKey] , Keyword[final] Keyword[int] identifier[height] operator[SEP] {
Keyword[return] identifier[create... |
public MACAddressSection toEUI(boolean extended) {
MACAddressSegment[] segs = toEUISegments(extended);
if(segs == null) {
return null;
}
MACAddressCreator creator = getMACNetwork().getAddressCreator();
return createSectionInternal(creator, segs, Math.max(0, addressSegmentIndex - 4) << 1, extended);
} | class class_name[name] begin[{]
method[toEUI, return_type[type[MACAddressSection]], modifier[public], parameter[extended]] begin[{]
local_variable[type[MACAddressSegment], segs]
if[binary_operation[member[.segs], ==, literal[null]]] begin[{]
return[literal[null]]
els... | Keyword[public] identifier[MACAddressSection] identifier[toEUI] operator[SEP] Keyword[boolean] identifier[extended] operator[SEP] {
identifier[MACAddressSegment] operator[SEP] operator[SEP] identifier[segs] operator[=] identifier[toEUISegments] operator[SEP] identifier[extended] operator[SEP] operator[SEP] Keywo... |
private static <T> void log(RedwoodChannels channels, String description, Iterable<T> iterable) {
Redwood.startTrack(description);
if (iterable == null) {
channels.log("(iterable is null)");
} else {
int index = 0;
for (T item : iterable) {
if (dispatchable(item)) {
... | class class_name[name] begin[{]
method[log, return_type[void], modifier[private static], parameter[channels, description, iterable]] begin[{]
call[Redwood.startTrack, parameter[member[.description]]]
if[binary_operation[member[.iterable], ==, literal[null]]] begin[{]
... | Keyword[private] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[log] operator[SEP] identifier[RedwoodChannels] identifier[channels] , identifier[String] identifier[description] , identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] operator[SEP] {
iden... |
public void addProperties(final String[] annotationProperties, final PropertyReplacer propertyReplacer) {
if (annotationProperties != null) {
for (String annotationProperty : annotationProperties) {
if (propertyReplacer != null) {
annotationProperty = propertyRepl... | class class_name[name] begin[{]
method[addProperties, return_type[void], modifier[public], parameter[annotationProperties, propertyReplacer]] begin[{]
if[binary_operation[member[.annotationProperties], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, stateme... | Keyword[public] Keyword[void] identifier[addProperties] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[annotationProperties] , Keyword[final] identifier[PropertyReplacer] identifier[propertyReplacer] operator[SEP] {
Keyword[if] operator[SEP] identifier[annotationPropertie... |
public void invoke(Object entity) throws EventListenerException
{
if (!method.isAccessible())
method.setAccessible(true);
try
{
method.invoke(entity, new Object[] {});
}
catch (IllegalArgumentException e)
{
throw new Event... | class class_name[name] begin[{]
method[invoke, return_type[void], modifier[public], parameter[entity]] begin[{]
if[call[method.isAccessible, parameter[]]] begin[{]
call[method.setAccessible, parameter[literal[true]]]
else begin[{]
None
end[}]
TryStatement(blo... | Keyword[public] Keyword[void] identifier[invoke] operator[SEP] identifier[Object] identifier[entity] operator[SEP] Keyword[throws] identifier[EventListenerException] {
Keyword[if] operator[SEP] operator[!] identifier[method] operator[SEP] identifier[isAccessible] operator[SEP] operator[SEP] operator[SEP] identif... |
public static KeyStore toKeyStore(InputStream keyStoreInputStream, char [] keyStorePassword) throws CertificateException {
Assert.notNull(keyStoreInputStream, "InputStream of key store is mandatory");
Assert.notNull(keyStorePassword, "Password for key store is mandatory");
try {
KeyS... | class class_name[name] begin[{]
method[toKeyStore, return_type[type[KeyStore]], modifier[public static], parameter[keyStoreInputStream, keyStorePassword]] begin[{]
call[Assert.notNull, parameter[member[.keyStoreInputStream], literal["InputStream of key store is mandatory"]]]
cal... | Keyword[public] Keyword[static] identifier[KeyStore] identifier[toKeyStore] operator[SEP] identifier[InputStream] identifier[keyStoreInputStream] , Keyword[char] operator[SEP] operator[SEP] identifier[keyStorePassword] operator[SEP] Keyword[throws] identifier[CertificateException] {
identifier[Assert] operator[... |
@Nullable
public CorsPolicy getPolicy(String origin, PathMappingContext pathMappingContext) {
requireNonNull(origin, "origin");
if (isAnyOriginSupported()) {
return Iterables.getFirst(policies, null);
}
final String lowerCaseOrigin = Ascii.toLowerCase(origin);
fin... | class class_name[name] begin[{]
method[getPolicy, return_type[type[CorsPolicy]], modifier[public], parameter[origin, pathMappingContext]] begin[{]
call[.requireNonNull, parameter[member[.origin], literal["origin"]]]
if[call[.isAnyOriginSupported, parameter[]]] begin[{]
... | annotation[@] identifier[Nullable] Keyword[public] identifier[CorsPolicy] identifier[getPolicy] operator[SEP] identifier[String] identifier[origin] , identifier[PathMappingContext] identifier[pathMappingContext] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[origin] , literal[String] opera... |
@Override
public void onMessage(WebSocket webSocket, String message) {
JsonObject json = new JsonParser().parse(message).getAsJsonObject();
if (json.has(ERROR)) {
String error = json.get(ERROR).getAsString();
// Only call onError() if a real error occurred. The STT service sends
// {"error"... | class class_name[name] begin[{]
method[onMessage, return_type[void], modifier[public], parameter[webSocket, message]] begin[{]
local_variable[type[JsonObject], json]
if[call[json.has, parameter[member[.ERROR]]]] begin[{]
local_variable[type[String], error]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onMessage] operator[SEP] identifier[WebSocket] identifier[webSocket] , identifier[String] identifier[message] operator[SEP] {
identifier[JsonObject] identifier[json] operator[=] Keyword[new] identifier[JsonParser] operator[SEP] operator... |
public BBox calcBBox2D() {
check("calcRouteBBox");
BBox bounds = BBox.createInverse(false);
for (int i = 0; i < pointList.getSize(); i++) {
bounds.update(pointList.getLatitude(i), pointList.getLongitude(i));
}
return bounds;
} | class class_name[name] begin[{]
method[calcBBox2D, return_type[type[BBox]], modifier[public], parameter[]] begin[{]
call[.check, parameter[literal["calcRouteBBox"]]]
local_variable[type[BBox], bounds]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(e... | Keyword[public] identifier[BBox] identifier[calcBBox2D] operator[SEP] operator[SEP] {
identifier[check] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[BBox] identifier[bounds] operator[=] identifier[BBox] operator[SEP] identifier[createInverse] operator[SEP] literal[boolean] operator[SEP] o... |
public SuppressAnnotationType createSuppressAnnotation() {
final SuppressAnnotationType s = new SuppressAnnotationType();
s.setProject(getProject());
suppressAnnotations.add(s);
return s;
} | class class_name[name] begin[{]
method[createSuppressAnnotation, return_type[type[SuppressAnnotationType]], modifier[public], parameter[]] begin[{]
local_variable[type[SuppressAnnotationType], s]
call[s.setProject, parameter[call[.getProject, parameter[]]]]
call[suppress... | Keyword[public] identifier[SuppressAnnotationType] identifier[createSuppressAnnotation] operator[SEP] operator[SEP] {
Keyword[final] identifier[SuppressAnnotationType] identifier[s] operator[=] Keyword[new] identifier[SuppressAnnotationType] operator[SEP] operator[SEP] operator[SEP] identifier[s] operator[SEP] i... |
public SingleFieldBuilder<MType, BType, IType> setMessage(
MType message) {
if (message == null) {
throw new NullPointerException();
}
this.message = message;
if (builder != null) {
builder.dispose();
builder = null;
}
onChanged();
return this;
} | class class_name[name] begin[{]
method[setMessage, return_type[type[SingleFieldBuilder]], modifier[public], parameter[message]] begin[{]
if[binary_operation[member[.message], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_typ... | Keyword[public] identifier[SingleFieldBuilder] operator[<] identifier[MType] , identifier[BType] , identifier[IType] operator[>] identifier[setMessage] operator[SEP] identifier[MType] identifier[message] operator[SEP] {
Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[SEP] {
... |
public static void shutdown() {
UdpResources resources = udpResources.getAndSet(null);
if (resources != null) {
resources._dispose();
}
} | class class_name[name] begin[{]
method[shutdown, return_type[void], modifier[public static], parameter[]] begin[{]
local_variable[type[UdpResources], resources]
if[binary_operation[member[.resources], !=, literal[null]]] begin[{]
call[resources._dispose, paramete... | Keyword[public] Keyword[static] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] {
identifier[UdpResources] identifier[resources] operator[=] identifier[udpResources] operator[SEP] identifier[getAndSet] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resou... |
static String pullFontPathFromTextAppearance(final Context context, AttributeSet attrs, int[] attributeId) {
if (attributeId == null || attrs == null) {
return null;
}
int textAppearanceId = -1;
final TypedArray typedArrayAttr = context.obtainStyledAttributes(attrs, ANDROID_... | class class_name[name] begin[{]
method[pullFontPathFromTextAppearance, return_type[type[String]], modifier[static], parameter[context, attrs, attributeId]] begin[{]
if[binary_operation[binary_operation[member[.attributeId], ==, literal[null]], ||, binary_operation[member[.attrs], ==, literal[nu... | Keyword[static] identifier[String] identifier[pullFontPathFromTextAppearance] operator[SEP] Keyword[final] identifier[Context] identifier[context] , identifier[AttributeSet] identifier[attrs] , Keyword[int] operator[SEP] operator[SEP] identifier[attributeId] operator[SEP] {
Keyword[if] operator[SEP] identifier... |
public static boolean isPowerPacker(RandomAccessInputStream input) throws IOException
{
long pos = input.getFilePointer();
input.seek(0);
byte [] ppId = new byte [4];
input.read(ppId, 0, 4);
input.seek(pos);
return Helpers.retrieveAsString(ppId, 0, 4).equals("PP20");
} | class class_name[name] begin[{]
method[isPowerPacker, return_type[type[boolean]], modifier[public static], parameter[input]] begin[{]
local_variable[type[long], pos]
call[input.seek, parameter[literal[0]]]
local_variable[type[byte], ppId]
call[input.read, paramet... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isPowerPacker] operator[SEP] identifier[RandomAccessInputStream] identifier[input] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[long] identifier[pos] operator[=] identifier[input] operator[SEP] identifier[getFilePointer] operator[SEP]... |
public String registerBlockListener(BlockListener listener) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == listener) {
throw new InvalidArgumentException("Listener parame... | class class_name[name] begin[{]
method[registerBlockListener, return_type[type[String]], modifier[public], parameter[listener]] begin[{]
if[member[.shutdown]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_... | Keyword[public] identifier[String] identifier[registerBlockListener] operator[SEP] identifier[BlockListener] identifier[listener] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] {
Keyword[if] operator[SEP] identifier[shutdown] operator[SEP] {
Keyword[throw] Keyword[new] identifier[I... |
public <E extends V> E popAs(final Class<E> c, final int down)
{
return c.cast(pop(down));
} | class class_name[name] begin[{]
method[popAs, return_type[type[E]], modifier[public], parameter[c, down]] begin[{]
return[call[c.cast, parameter[call[.pop, parameter[member[.down]]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[E] Keyword[extends] identifier[V] operator[>] identifier[E] identifier[popAs] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[E] operator[>] identifier[c] , Keyword[final] Keyword[int] identifier[down] operator[SEP] {
Keyword[return] identifier[c] ope... |
public static void write(final PrivateKey privateKey, final @NonNull OutputStream outputStream)
throws IOException
{
final byte[] privateKeyBytes = privateKey.getEncoded();
final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);
outputStream.write(keySpec.getEncoded());
outputStream.clo... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[privateKey, outputStream]] begin[{]
local_variable[type[byte], privateKeyBytes]
local_variable[type[PKCS8EncodedKeySpec], keySpec]
call[outputStream.write, parameter[call[keySpec.... | Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[PrivateKey] identifier[privateKey] , Keyword[final] annotation[@] identifier[NonNull] identifier[OutputStream] identifier[outputStream] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] K... |
static Point2D toAwtPoint(Point2d point) {
return new Point2D.Double(point.x, point.y);
} | class class_name[name] begin[{]
method[toAwtPoint, return_type[type[Point2D]], modifier[static], parameter[point]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[]), MemberReference(member=y, postfix_operators=[],... | Keyword[static] identifier[Point2D] identifier[toAwtPoint] operator[SEP] identifier[Point2d] identifier[point] operator[SEP] {
Keyword[return] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[point] operator[SEP] identifier[x] , identifier[point] operator[SEP] identifie... |
public void setDMName(String newDMName) {
String oldDMName = dmName;
dmName = newDMName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.EDM__DM_NAME, oldDMName, dmName));
} | class class_name[name] begin[{]
method[setDMName, return_type[void], modifier[public], parameter[newDMName]] begin[{]
local_variable[type[String], oldDMName]
assign[member[.dmName], member[.newDMName]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
ca... | Keyword[public] Keyword[void] identifier[setDMName] operator[SEP] identifier[String] identifier[newDMName] operator[SEP] {
identifier[String] identifier[oldDMName] operator[=] identifier[dmName] operator[SEP] identifier[dmName] operator[=] identifier[newDMName] operator[SEP] Keyword[if] operator[SEP] identifier[... |
public Optional<Application> show(long applicationId)
{
return HTTP.GET(String.format("/v2/applications/%d.json", applicationId), APPLICATION);
} | class class_name[name] begin[{]
method[show, return_type[type[Optional]], modifier[public], parameter[applicationId]] begin[{]
return[call[HTTP.GET, parameter[call[String.format, parameter[literal["/v2/applications/%d.json"], member[.applicationId]]], member[.APPLICATION]]]]
end[}]
END[}] | Keyword[public] identifier[Optional] operator[<] identifier[Application] operator[>] identifier[show] operator[SEP] Keyword[long] identifier[applicationId] operator[SEP] {
Keyword[return] identifier[HTTP] operator[SEP] identifier[GET] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP... |
private _ValueReferenceWrapper getValueReference(
final ValueExpression valueExpression, final FacesContext context)
{
ELContext elCtx = context.getELContext();
if (_ExternalSpecifications.isUnifiedELAvailable())
{
// unified el 2.2 is available --> we can use ValueEx... | class class_name[name] begin[{]
method[getValueReference, return_type[type[_ValueReferenceWrapper]], modifier[private], parameter[valueExpression, context]] begin[{]
local_variable[type[ELContext], elCtx]
if[call[_ExternalSpecifications.isUnifiedELAvailable, parameter[]]] begin[{]
... | Keyword[private] identifier[_ValueReferenceWrapper] identifier[getValueReference] operator[SEP] Keyword[final] identifier[ValueExpression] identifier[valueExpression] , Keyword[final] identifier[FacesContext] identifier[context] operator[SEP] {
identifier[ELContext] identifier[elCtx] operator[=] identifier[cont... |
protected boolean isEqual(GregorianTimezoneRule rule) {
return (
this.getTimeOfDay().equals(rule.getTimeOfDay())
&& (this.getDayOverflow() == rule.getDayOverflow())
&& (this.getIndicator() == rule.getIndicator())
&& (this.getSavings() == rule.getSavings())
... | class class_name[name] begin[{]
method[isEqual, return_type[type[boolean]], modifier[protected], parameter[rule]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[THIS[call[None.getTimeOfDay, parameter[]]call[None.equals, parameter[call[rule.getTimeOfDay, parameter[]]... | Keyword[protected] Keyword[boolean] identifier[isEqual] operator[SEP] identifier[GregorianTimezoneRule] identifier[rule] operator[SEP] {
Keyword[return] operator[SEP] Keyword[this] operator[SEP] identifier[getTimeOfDay] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[rule] o... |
public static JsonHash fromParser(JsonPullParser parser) throws IOException,
JsonFormatException {
State state = parser.getEventType();
if (state == State.VALUE_NULL) {
return null;
} else if (state != State.START_HASH) {
throw new JsonFormatException("unexpected token. token=" + state, parser);
}
... | class class_name[name] begin[{]
method[fromParser, return_type[type[JsonHash]], modifier[public static], parameter[parser]] begin[{]
local_variable[type[State], state]
if[binary_operation[member[.state], ==, member[State.VALUE_NULL]]] begin[{]
return[literal[null]]
e... | Keyword[public] Keyword[static] identifier[JsonHash] identifier[fromParser] operator[SEP] identifier[JsonPullParser] identifier[parser] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonFormatException] {
identifier[State] identifier[state] operator[=] identifier[parser] operator[SEP] ident... |
public static String wrapIfMissing(final String str, final String wrapWith) {
if (isEmpty(str) || isEmpty(wrapWith)) {
return str;
}
final StringBuilder builder = new StringBuilder(str.length() + wrapWith.length() + wrapWith.length());
if (!str.startsWith(wrapWith)) {
... | class class_name[name] begin[{]
method[wrapIfMissing, return_type[type[String]], modifier[public static], parameter[str, wrapWith]] begin[{]
if[binary_operation[call[.isEmpty, parameter[member[.str]]], ||, call[.isEmpty, parameter[member[.wrapWith]]]]] begin[{]
return[member[.str]]
... | Keyword[public] Keyword[static] identifier[String] identifier[wrapIfMissing] operator[SEP] Keyword[final] identifier[String] identifier[str] , Keyword[final] identifier[String] identifier[wrapWith] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[str] operator[SEP] operator... |
public Request header(String name, Object value) {
if (headers == null) {
headers = new LinkedHashMap<String, Object>();
}
headers.put(name, value);
return this;
} | class class_name[name] begin[{]
method[header, return_type[type[Request]], modifier[public], parameter[name, value]] begin[{]
if[binary_operation[member[.headers], ==, literal[null]]] begin[{]
assign[member[.headers], ClassCreator(arguments=[], body=None, constructor_typ... | Keyword[public] identifier[Request] identifier[header] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[headers] operator[==] Other[null] operator[SEP] {
identifier[headers] operator[=] Keyword[new] identifie... |
public static <T> boolean any(final Iterable<T> sequence,
final Predicate<? super T> predicate) {
for (T t : sequence) {
if (predicate.test(t)) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[any, return_type[type[boolean]], modifier[public static], parameter[sequence, predicate]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[any] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[sequence] , Keyword[final] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[T] operator[>] ide... |
@Reference(cardinality=ReferenceCardinality.OPTIONAL, policyOption=ReferencePolicyOption.GREEDY)
protected void setExpressionFactoryService(ServiceReference<ELFactoryWrapperForCDI> expressionFactoryService) {
this.expressionFactoryService.setReference(expressionFactoryService);
} | class class_name[name] begin[{]
method[setExpressionFactoryService, return_type[void], modifier[protected], parameter[expressionFactoryService]] begin[{]
THIS[member[None.expressionFactoryService]call[None.setReference, parameter[member[.expressionFactoryService]]]]
end[}]
END[}] | annotation[@] identifier[Reference] operator[SEP] identifier[cardinality] operator[=] identifier[ReferenceCardinality] operator[SEP] identifier[OPTIONAL] , identifier[policyOption] operator[=] identifier[ReferencePolicyOption] operator[SEP] identifier[GREEDY] operator[SEP] Keyword[protected] Keyword[void] identifier[s... |
public ArrayList<JTSFeature> getFeatures(String id, double lon, double lat, double distanceInMeters,
List<Param> optionalParams) throws Exception {
DescribeService describeService = getDescribeServiceByID(id);
double[] bbox = Calculator.boundingCoordinates(lon, lat, distanceInMeters);
return getFeatures(id, ... | class class_name[name] begin[{]
method[getFeatures, return_type[type[ArrayList]], modifier[public], parameter[id, lon, lat, distanceInMeters, optionalParams]] begin[{]
local_variable[type[DescribeService], describeService]
local_variable[type[double], bbox]
return[call[.getFeatures, par... | Keyword[public] identifier[ArrayList] operator[<] identifier[JTSFeature] operator[>] identifier[getFeatures] operator[SEP] identifier[String] identifier[id] , Keyword[double] identifier[lon] , Keyword[double] identifier[lat] , Keyword[double] identifier[distanceInMeters] , identifier[List] operator[<] identifier[Pa... |
public void finish () throws IOException
{
if ( !this.finished )
{
this.finished = true;
writeEnd ();
}
try
{
this.out.close ();
}
catch ( final XMLStreamException e )
{
throw new IOException ( e );
... | class class_name[name] begin[{]
method[finish, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.finished]]] begin[{]
assign[THIS[member[None.finished]], literal[true]]
call[.writeEnd, parameter[]]
else begin[{... | Keyword[public] Keyword[void] identifier[finish] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[finished] operator[SEP] {
Keyword[this] operator[SEP] identifier[finished] operator[=] literal[boolean] op... |
protected static int toDigit(final char ch, final int index) throws IllegalArgumentException {
final int digit = Character.digit(ch, 16);
if (digit == -1) {
throw new IllegalArgumentException("Illegal hexadecimal character " + ch + " at index " + index);
}
return digit;
... | class class_name[name] begin[{]
method[toDigit, return_type[type[int]], modifier[static protected], parameter[ch, index]] begin[{]
local_variable[type[int], digit]
if[binary_operation[member[.digit], ==, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=... | Keyword[protected] Keyword[static] Keyword[int] identifier[toDigit] operator[SEP] Keyword[final] Keyword[char] identifier[ch] , Keyword[final] Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[final] Keyword[int] identifier[digit] operator[=] identifier[... |
public static DoubleBinding tan(final ObservableDoubleValue a) {
return createDoubleBinding(() -> Math.tan(a.get()), a);
} | class class_name[name] begin[{]
method[tan, return_type[type[DoubleBinding]], modifier[public static], parameter[a]] begin[{]
return[call[.createDoubleBinding, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[... | Keyword[public] Keyword[static] identifier[DoubleBinding] identifier[tan] operator[SEP] Keyword[final] identifier[ObservableDoubleValue] identifier[a] operator[SEP] {
Keyword[return] identifier[createDoubleBinding] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Math] operator[SEP] identifier[t... |
public String nextToken() throws ParserException {
int start = pos;
checkPosition();
boolean done = false;
while (!done && pos < s.length()) {
int c = s.charAt(pos);
if (c <= 31 //
|| c == 127 //
|| c == '(' //
... | class class_name[name] begin[{]
method[nextToken, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[int], start]
call[.checkPosition, parameter[]]
local_variable[type[boolean], done]
while[binary_operation[member[.done], &&, b... | Keyword[public] identifier[String] identifier[nextToken] operator[SEP] operator[SEP] Keyword[throws] identifier[ParserException] {
Keyword[int] identifier[start] operator[=] identifier[pos] operator[SEP] identifier[checkPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[done] operato... |
public Producer<Void> getEncodedImagePrefetchProducerSequence(ImageRequest imageRequest) {
validateEncodedImageRequest(imageRequest);
switch (imageRequest.getSourceUriType()) {
case SOURCE_TYPE_NETWORK:
return getNetworkFetchToEncodedMemoryPrefetchSequence();
case SOURCE_TYPE_LOCAL_VIDEO_FI... | class class_name[name] begin[{]
method[getEncodedImagePrefetchProducerSequence, return_type[type[Producer]], modifier[public], parameter[imageRequest]] begin[{]
call[.validateEncodedImageRequest, parameter[member[.imageRequest]]]
SwitchStatement(cases=[SwitchStatementCase(case=['SOURCE_... | Keyword[public] identifier[Producer] operator[<] identifier[Void] operator[>] identifier[getEncodedImagePrefetchProducerSequence] operator[SEP] identifier[ImageRequest] identifier[imageRequest] operator[SEP] {
identifier[validateEncodedImageRequest] operator[SEP] identifier[imageRequest] operator[SEP] operator[S... |
public synchronized void schedule()
{
// Avoid scheduling a timer that was destroyed on another thread and
// avoid scheduling a timer twice, which might be attempted if two
// threads concurrently attempt to cancel and then both rollback.
if (ivTaskHandler == null && !ivDestroyed)
... | class class_name[name] begin[{]
method[schedule, return_type[void], modifier[synchronized public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.ivTaskHandler], ==, literal[null]], &&, member[.ivDestroyed]]] begin[{]
assign[member[.ivTaskHandler], ca... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[schedule] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ivTaskHandler] operator[==] Other[null] operator[&&] operator[!] identifier[ivDestroyed] operator[SEP] {
identifier[ivTaskHandler] operator[=] identifier[ivContai... |
public static HttpResponse doGetResponse(String url) throws Exception {
return doGetResponse(url, null, null, null);
} | class class_name[name] begin[{]
method[doGetResponse, return_type[type[HttpResponse]], modifier[public static], parameter[url]] begin[{]
return[call[.doGetResponse, parameter[member[.url], literal[null], literal[null], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[HttpResponse] identifier[doGetResponse] operator[SEP] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[return] identifier[doGetResponse] operator[SEP] identifier[url] , Other[null] , Other[null] , Other[null] operator[S... |
public FloatBuffer slice () {
byteBuffer.limit(limit << 2);
byteBuffer.position(position << 2);
FloatBuffer result = new FloatBuffer(byteBuffer.slice());
byteBuffer.clear();
return result;
} | class class_name[name] begin[{]
method[slice, return_type[type[FloatBuffer]], modifier[public], parameter[]] begin[{]
call[byteBuffer.limit, parameter[binary_operation[member[.limit], <<, literal[2]]]]
call[byteBuffer.position, parameter[binary_operation[member[.position], <<, l... | Keyword[public] identifier[FloatBuffer] identifier[slice] operator[SEP] operator[SEP] {
identifier[byteBuffer] operator[SEP] identifier[limit] operator[SEP] identifier[limit] operator[<<] Other[2] operator[SEP] operator[SEP] identifier[byteBuffer] operator[SEP] identifier[position] operator[SEP] identifier[posit... |
public static void printDoc(final Document doc) {
try {
final Transformer trans = TransformerFactory.newInstance()
.newTransformer();
trans.setOutputProperty(OutputKeys.INDENT, "yes");
trans.transform(new DOMSource(doc), new StreamResult(System.out));... | class class_name[name] begin[{]
method[printDoc, return_type[void], modifier[public static], parameter[doc]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operat... | Keyword[public] Keyword[static] Keyword[void] identifier[printDoc] operator[SEP] Keyword[final] identifier[Document] identifier[doc] operator[SEP] {
Keyword[try] {
Keyword[final] identifier[Transformer] identifier[trans] operator[=] identifier[TransformerFactory] operator[SEP] identifier[newInstance] ... |
public String getServiceClassName()
{
Class<?> serviceClass = getServiceClass();
if (serviceClass != null)
return serviceClass.getName();
String serviceClassName = context.getProperty(BundleConstants.SERVICE_CLASS); // Don't use getProperty - endless loop
if (serviceClassName == null)
{
if ... | class class_name[name] begin[{]
method[getServiceClassName, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[Class], serviceClass]
if[binary_operation[member[.serviceClass], !=, literal[null]]] begin[{]
return[call[serviceClass.getName, parameter[]]... | Keyword[public] identifier[String] identifier[getServiceClassName] operator[SEP] operator[SEP] {
identifier[Class] operator[<] operator[?] operator[>] identifier[serviceClass] operator[=] identifier[getServiceClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serviceClass] oper... |
protected void cleanUpArchiver( AbstractArchiver archiver )
{
try
{
Method cleanUpMethod = AbstractArchiver.class.getDeclaredMethod( "cleanUp" );
cleanUpMethod.setAccessible( true );
cleanUpMethod.invoke( archiver );
}
catch ( Exception e )
... | class class_name[name] begin[{]
method[cleanUpArchiver, return_type[void], modifier[protected], parameter[archiver]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassReference(postfix_operators=[], prefix_operators=[],... | Keyword[protected] Keyword[void] identifier[cleanUpArchiver] operator[SEP] identifier[AbstractArchiver] identifier[archiver] operator[SEP] {
Keyword[try] {
identifier[Method] identifier[cleanUpMethod] operator[=] identifier[AbstractArchiver] operator[SEP] Keyword[class] operator[SEP] identifier[getDec... |
public @Nullable
List<ComapiValidationFailure> getValidationFailures() {
if (errorBody != null && !errorBody.isEmpty()) {
ComapiValidationFailures failures = null;
try {
failures = new Parser().parse(errorBody, ComapiValidationFailures.class);
} catch (Exc... | class class_name[name] begin[{]
method[getValidationFailures, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[binary_operation[binary_operation[member[.errorBody], !=, literal[null]], &&, call[errorBody.isEmpty, parameter[]]]] begin[{]
local_variable[type[ComapiV... | Keyword[public] annotation[@] identifier[Nullable] identifier[List] operator[<] identifier[ComapiValidationFailure] operator[>] identifier[getValidationFailures] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[errorBody] operator[!=] Other[null] operator[&&] operator[!] identifier[errorBody] o... |
private int calculatePositionViaBreakingBackwards(int numOfBreaks, BreakIterator breakIterator, int position) {
breakIterator.preceding(position);
for (int i = 1; i < numOfBreaks; i++) {
breakIterator.previous();
}
return breakIterator.current();
} | class class_name[name] begin[{]
method[calculatePositionViaBreakingBackwards, return_type[type[int]], modifier[private], parameter[numOfBreaks, breakIterator, position]] begin[{]
call[breakIterator.preceding, parameter[member[.position]]]
ForStatement(body=BlockStatement(label=None, sta... | Keyword[private] Keyword[int] identifier[calculatePositionViaBreakingBackwards] operator[SEP] Keyword[int] identifier[numOfBreaks] , identifier[BreakIterator] identifier[breakIterator] , Keyword[int] identifier[position] operator[SEP] {
identifier[breakIterator] operator[SEP] identifier[preceding] operator[SEP... |
public double[] paa(double[] ts, int paaSize) throws SAXException {
// fix the length
int len = ts.length;
if (len < paaSize) {
throw new SAXException("PAA size can't be greater than the timeseries size.");
}
// check for the trivial case
if (len == paaSize) {
return Arrays.c... | class class_name[name] begin[{]
method[paa, return_type[type[double]], modifier[public], parameter[ts, paaSize]] begin[{]
local_variable[type[int], len]
if[binary_operation[member[.len], <, member[.paaSize]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal... | Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[paa] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[ts] , Keyword[int] identifier[paaSize] operator[SEP] Keyword[throws] identifier[SAXException] {
Keyword[int] identifier[len] operator[=] identifier[ts] operator[SEP] i... |
private static boolean doIsAssignableFrom(Type left, Type right, boolean failOpen) {
if (left.equals(right)) {
return true;
}
if (left.getSort() != right.getSort()) {
return false;
}
if (left.getSort() != Type.OBJECT) {
return false; // all other sorts require exact equality (even ... | class class_name[name] begin[{]
method[doIsAssignableFrom, return_type[type[boolean]], modifier[private static], parameter[left, right, failOpen]] begin[{]
if[call[left.equals, parameter[member[.right]]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[static] Keyword[boolean] identifier[doIsAssignableFrom] operator[SEP] identifier[Type] identifier[left] , identifier[Type] identifier[right] , Keyword[boolean] identifier[failOpen] operator[SEP] {
Keyword[if] operator[SEP] identifier[left] operator[SEP] identifier[equals] operator[SEP]... |
protected void removeEmptyMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException {
List<CmsResource> siblings = null;
CmsObject rootCms = null;
Iterator<Map.Entry<String, List<String>>> allMappings = m_elementMappings.entrySet().iterator();
while (allMappings.... | class class_name[name] begin[{]
method[removeEmptyMappings, return_type[void], modifier[protected], parameter[cms, file, content]] begin[{]
local_variable[type[List], siblings]
local_variable[type[CmsObject], rootCms]
local_variable[type[Iterator], allMappings]
while[cal... | Keyword[protected] Keyword[void] identifier[removeEmptyMappings] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsFile] identifier[file] , identifier[CmsXmlContent] identifier[content] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[List] operator[<] identifier[CmsResourc... |
public void stateChanged (ChangeEvent e)
{
JSlider source = (JSlider)e.getSource();
if (!source.getValueIsAdjusting()) {
_value.setText(Integer.toString(source.getValue()));
}
} | class class_name[name] begin[{]
method[stateChanged, return_type[void], modifier[public], parameter[e]] begin[{]
local_variable[type[JSlider], source]
if[call[source.getValueIsAdjusting, parameter[]]] begin[{]
call[_value.setText, parameter[call[Integer.toString,... | Keyword[public] Keyword[void] identifier[stateChanged] operator[SEP] identifier[ChangeEvent] identifier[e] operator[SEP] {
identifier[JSlider] identifier[source] operator[=] operator[SEP] identifier[JSlider] operator[SEP] identifier[e] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP]... |
public List<String> parse(String[] args, int pos) {
List<String> parameters = new ArrayList<String>();
for(; pos < args.length; pos++) {
if (args[pos].charAt(0) == '-' && args[pos].length() > 1) {
String opt = args[pos].substring(1);
if (options.containsKey(opt))
options.put(opt,... | class class_name[name] begin[{]
method[parse, return_type[type[List]], modifier[public], parameter[args, pos]] begin[{]
local_variable[type[List], parameters]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberR... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[parse] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] , Keyword[int] identifier[pos] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[parameters] operator[=... |
@Override
public boolean isOpaque(SynthContext ctx) {
// Force Table CellRenderers to be opaque
if ("Table.cellRenderer".equals(ctx.getComponent().getName())) {
return true;
}
Boolean opaque = (Boolean) get(ctx, "opaque");
return opaque == null ? false : opaque;... | class class_name[name] begin[{]
method[isOpaque, return_type[type[boolean]], modifier[public], parameter[ctx]] begin[{]
if[literal["Table.cellRenderer"]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
local_variable[type[Boolean], opaque]
re... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isOpaque] operator[SEP] identifier[SynthContext] identifier[ctx] operator[SEP] {
Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[ctx] operator[SEP] identifier[getComponent] operator[... |
private synchronized static StopRecognition init(String key, KV<String, StopRecognition> kv, boolean reload) {
StopRecognition stopRecognition = kv.getV();
if (stopRecognition != null) {
if (reload) {
stopRecognition.clear();
} else {
return stopRecognition;
}
} else {
stopRecognition = new S... | class class_name[name] begin[{]
method[init, return_type[type[StopRecognition]], modifier[synchronized private static], parameter[key, kv, reload]] begin[{]
local_variable[type[StopRecognition], stopRecognition]
if[binary_operation[member[.stopRecognition], !=, literal[null]]] begin[{]
... | Keyword[private] Keyword[synchronized] Keyword[static] identifier[StopRecognition] identifier[init] operator[SEP] identifier[String] identifier[key] , identifier[KV] operator[<] identifier[String] , identifier[StopRecognition] operator[>] identifier[kv] , Keyword[boolean] identifier[reload] operator[SEP] {
id... |
@Override
public TokenStream tokenStream(String fieldName, Reader reader)
{
if (indexingConfig != null)
{
Analyzer propertyAnalyzer = indexingConfig.getPropertyAnalyzer(fieldName);
if (propertyAnalyzer != null)
{
return propertyAnalyzer.tokenStream(fieldName, rea... | class class_name[name] begin[{]
method[tokenStream, return_type[type[TokenStream]], modifier[public], parameter[fieldName, reader]] begin[{]
if[binary_operation[member[.indexingConfig], !=, literal[null]]] begin[{]
local_variable[type[Analyzer], propertyAnalyzer]
... | annotation[@] identifier[Override] Keyword[public] identifier[TokenStream] identifier[tokenStream] operator[SEP] identifier[String] identifier[fieldName] , identifier[Reader] identifier[reader] operator[SEP] {
Keyword[if] operator[SEP] identifier[indexingConfig] operator[!=] Other[null] operator[SEP] {
... |
public boolean offer(E e, long timeout, TimeUnit unit)
throws InterruptedException {
if (e == null) throw new NullPointerException();
if (transferer.transfer(e, true, unit.toNanos(timeout)) != null)
return true;
if (!Thread.interrupted())
return false;
thr... | class class_name[name] begin[{]
method[offer, return_type[type[boolean]], modifier[public], parameter[e, timeout, unit]] begin[{]
if[binary_operation[member[.e], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix... | Keyword[public] Keyword[boolean] identifier[offer] operator[SEP] identifier[E] identifier[e] , Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[if] operator[SEP] identifier[e] operator[==] Other[null] operator[SEP... |
public int enrichXml(final MMOs root) throws SQLException {
int count = 0;
// TODO: take out the print statements
for (final MMO mmo : root.getMMO()) {
for (final Utterance utterance : mmo.getUtterances().getUtterance()) {
for (final Phrase phrase : utterance.getPhras... | class class_name[name] begin[{]
method[enrichXml, return_type[type[int]], modifier[public], parameter[root]] begin[{]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStateme... | Keyword[public] Keyword[int] identifier[enrichXml] operator[SEP] Keyword[final] identifier[MMOs] identifier[root] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[MMO] identifier[mmo] op... |
public JsonNode apply(final JsonNode node) {
requireNonNull(node, "node");
JsonNode ret = node.deepCopy();
for (final JsonPatchOperation operation : operations) {
ret = operation.apply(ret);
}
return ret;
} | class class_name[name] begin[{]
method[apply, return_type[type[JsonNode]], modifier[public], parameter[node]] begin[{]
call[.requireNonNull, parameter[member[.node], literal["node"]]]
local_variable[type[JsonNode], ret]
ForStatement(body=BlockStatement(label=None, statements=[St... | Keyword[public] identifier[JsonNode] identifier[apply] operator[SEP] Keyword[final] identifier[JsonNode] identifier[node] operator[SEP] {
identifier[requireNonNull] operator[SEP] identifier[node] , literal[String] operator[SEP] operator[SEP] identifier[JsonNode] identifier[ret] operator[=] identifier[node] oper... |
public static String normalizePath(final String path, final boolean isFileOrJarURL) {
final boolean hasPercent = path.indexOf('%') >= 0;
if (!hasPercent && path.indexOf('\\') < 0 && !path.endsWith("/")) {
return path;
} else {
final int len = path.length();
fi... | class class_name[name] begin[{]
method[normalizePath, return_type[type[String]], modifier[public static], parameter[path, isFileOrJarURL]] begin[{]
local_variable[type[boolean], hasPercent]
if[binary_operation[binary_operation[member[.hasPercent], &&, binary_operation[call[path.indexOf,... | Keyword[public] Keyword[static] identifier[String] identifier[normalizePath] operator[SEP] Keyword[final] identifier[String] identifier[path] , Keyword[final] Keyword[boolean] identifier[isFileOrJarURL] operator[SEP] {
Keyword[final] Keyword[boolean] identifier[hasPercent] operator[=] identifier[path] operator[... |
public ArrayList<String> license_windows_new_GET(String ip, OvhLicenseTypeEnum serviceType, OvhWindowsSqlVersionEnum sqlVersion, OvhWindowsOsVersionEnum version) throws IOException {
String qPath = "/order/license/windows/new";
StringBuilder sb = path(qPath);
query(sb, "ip", ip);
query(sb, "serviceType", servic... | class class_name[name] begin[{]
method[license_windows_new_GET, return_type[type[ArrayList]], modifier[public], parameter[ip, serviceType, sqlVersion, version]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.query, parameter[member[.sb... | Keyword[public] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[license_windows_new_GET] operator[SEP] identifier[String] identifier[ip] , identifier[OvhLicenseTypeEnum] identifier[serviceType] , identifier[OvhWindowsSqlVersionEnum] identifier[sqlVersion] , identifier[OvhWindowsOsVersionE... |
private void parseParameters(String[] args)
{
Properties props = new Properties();
for (int i=0; i<args.length; i++)
{
if (args[i].startsWith("-")) // parameter:
{
String op = args[i].substring(2);
switch (args[i].toLowerCase().charAt(1))
{
case 'i':
props.setProperty(ModContainer.P... | class class_name[name] begin[{]
method[parseParameters, return_type[void], modifier[private], parameter[args]] begin[{]
local_variable[type[Properties], props]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=args, postfix_operators=[], prefi... | Keyword[private] Keyword[void] identifier[parseParameters] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.