code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public ServiceFuture<ImageAnalysis> analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter, final ServiceCallback<ImageAnalysis> serviceCallback) {
return ServiceFuture.fromResponse(analyzeImageWithServiceResponseAsync(url, analyzeImageOptionalParameter), serviceCallback);
... | class class_name[name] begin[{]
method[analyzeImageAsync, return_type[type[ServiceFuture]], modifier[public], parameter[url, analyzeImageOptionalParameter, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.analyzeImageWithServiceResponseAsync, parameter[member[.url], me... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[ImageAnalysis] operator[>] identifier[analyzeImageAsync] operator[SEP] identifier[String] identifier[url] , identifier[AnalyzeImageOptionalParameter] identifier[analyzeImageOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] iden... |
protected boolean locateMatchingHttpRequest(final Authentication authentication, final HttpServletRequest request) {
if (StringUtils.isNotBlank(bypassProperties.getHttpRequestRemoteAddress())) {
if (httpRequestRemoteAddressPattern.matcher(request.getRemoteAddr()).find()) {
LOGGER.deb... | class class_name[name] begin[{]
method[locateMatchingHttpRequest, return_type[type[boolean]], modifier[protected], parameter[authentication, request]] begin[{]
if[call[StringUtils.isNotBlank, parameter[call[bypassProperties.getHttpRequestRemoteAddress, parameter[]]]]] begin[{]
... | Keyword[protected] Keyword[boolean] identifier[locateMatchingHttpRequest] operator[SEP] Keyword[final] identifier[Authentication] identifier[authentication] , Keyword[final] identifier[HttpServletRequest] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identif... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case TypesPackage.JVM_BOOLEAN_ANNOTATION_VALUE__VALUES:
getValues().clear();
getValues().addAll((Collection<? extends Boolean>)newValue);
return;
}
super.eSet(featureID, newValue);
... | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_BOOLEAN_ANNOTATION_VALUE__VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, sel... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
protected AbstractColumn buildExpressionColumn() {
ExpressionColumn column = new ExpressionColumn();
populateCommonAttributes(column);
populateExpressionAttributes(column);
column.setExpression(customExpression);
column.setExpressionToGroupBy(customExpressionToGroupBy);
column.setExpressionForCalculat... | class class_name[name] begin[{]
method[buildExpressionColumn, return_type[type[AbstractColumn]], modifier[protected], parameter[]] begin[{]
local_variable[type[ExpressionColumn], column]
call[.populateCommonAttributes, parameter[member[.column]]]
call[.populateExpression... | Keyword[protected] identifier[AbstractColumn] identifier[buildExpressionColumn] operator[SEP] operator[SEP] {
identifier[ExpressionColumn] identifier[column] operator[=] Keyword[new] identifier[ExpressionColumn] operator[SEP] operator[SEP] operator[SEP] identifier[populateCommonAttributes] operator[SEP] identifi... |
@Override
public ResponseStubbing withHeader(final String name, final String value) {
currentResponse().addHeader(name, value);
return this;
} | class class_name[name] begin[{]
method[withHeader, return_type[type[ResponseStubbing]], modifier[public], parameter[name, value]] begin[{]
call[.currentResponse, parameter[]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ResponseStubbing] identifier[withHeader] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[value] operator[SEP] {
identifier[currentResponse] operator[SEP] operator[SEP] operator[SEP] iden... |
public GroupPattern<T, F> followedBy(Pattern<T, F> group) {
return new GroupPattern<>(this, group, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy);
} | class class_name[name] begin[{]
method[followedBy, return_type[type[GroupPattern]], modifier[public], parameter[group]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_opera... | Keyword[public] identifier[GroupPattern] operator[<] identifier[T] , identifier[F] operator[>] identifier[followedBy] operator[SEP] identifier[Pattern] operator[<] identifier[T] , identifier[F] operator[>] identifier[group] operator[SEP] {
Keyword[return] Keyword[new] identifier[GroupPattern] operator[<] opera... |
@Override
public List<User> getAllUsers() throws ServiceException {
if(! isStarted){
ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED);
throw new ServiceException(error);
}
return getRegistrationService().getA... | class class_name[name] begin[{]
method[getAllUsers, return_type[type[List]], modifier[public], parameter[]] begin[{]
if[member[.isStarted]] begin[{]
local_variable[type[ServiceDirectoryError], error]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(membe... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[User] operator[>] identifier[getAllUsers] operator[SEP] operator[SEP] Keyword[throws] identifier[ServiceException] {
Keyword[if] operator[SEP] operator[!] identifier[isStarted] operator[SEP] {
identifier[Service... |
public void parse(Proxy proxy) {
if (proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) {
return;
}
reset();
switch (proxy.getProxyType()) {
case DIRECT:
if (!product.is(MOBILE)) {
setEnabled(false);
}
setUsePAC(false);
break;
case MANUAL:... | class class_name[name] begin[{]
method[parse, return_type[void], modifier[public], parameter[proxy]] begin[{]
if[binary_operation[call[proxy.getProxyType, parameter[]], ==, member[Proxy.ProxyType.UNSPECIFIED]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[parse] operator[SEP] identifier[Proxy] identifier[proxy] operator[SEP] {
Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[getProxyType] operator[SEP] operator[SEP] operator[==] identifier[Proxy] operator[SEP] identifier[ProxyType] operator[SEP] identif... |
private String parseLevelOfTheory(String line) {
StringBuffer summary = new StringBuffer();
summary.append(line);
try {
do {
line = input.readLine().trim();
summary.append(line);
} while (!(line.indexOf('@') >= 0));
} catch (Except... | class class_name[name] begin[{]
method[parseLevelOfTheory, return_type[type[String]], modifier[private], parameter[line]] begin[{]
local_variable[type[StringBuffer], summary]
call[summary.append, parameter[member[.line]]]
TryStatement(block=[DoStatement(body=BlockStatement(label... | Keyword[private] identifier[String] identifier[parseLevelOfTheory] operator[SEP] identifier[String] identifier[line] operator[SEP] {
identifier[StringBuffer] identifier[summary] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[summary] operator[SEP] identifie... |
public EClass getIfcStructuralLoadPlanarForce() {
if (ifcStructuralLoadPlanarForceEClass == null) {
ifcStructuralLoadPlanarForceEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(548);
}
return ifcStructuralLoadPlanarForceEClass;
} | class class_name[name] begin[{]
method[getIfcStructuralLoadPlanarForce, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcStructuralLoadPlanarForceEClass], ==, literal[null]]] begin[{]
assign[member[.ifcStructuralLoadPlanar... | Keyword[public] identifier[EClass] identifier[getIfcStructuralLoadPlanarForce] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcStructuralLoadPlanarForceEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcStructuralLoadPlanarForceEClass] operator[=] operator[SEP] identi... |
public int getXOrigin (int orient, int frameIdx)
{
CompositedMultiFrameImage cmfi = (CompositedMultiFrameImage)
getFrames(orient);
return cmfi.getXOrigin(frameIdx);
} | class class_name[name] begin[{]
method[getXOrigin, return_type[type[int]], modifier[public], parameter[orient, frameIdx]] begin[{]
local_variable[type[CompositedMultiFrameImage], cmfi]
return[call[cmfi.getXOrigin, parameter[member[.frameIdx]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getXOrigin] operator[SEP] Keyword[int] identifier[orient] , Keyword[int] identifier[frameIdx] operator[SEP] {
identifier[CompositedMultiFrameImage] identifier[cmfi] operator[=] operator[SEP] identifier[CompositedMultiFrameImage] operator[SEP] identifier[getFrames] operato... |
long prevSetBit(long index) {
assert index >= 0 && index < numBits : "index=" + index + " numBits=" + numBits;
int i = (int) (index >> 6);
final int subIndex = (int) (index & 0x3f); // index within the word
long word = (bits[i] << (63 - subIndex)); // skip all the bits to the
// left of index
... | class class_name[name] begin[{]
method[prevSetBit, return_type[type[long]], modifier[default], parameter[index]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), opera... | Keyword[long] identifier[prevSetBit] operator[SEP] Keyword[long] identifier[index] operator[SEP] {
Keyword[assert] identifier[index] operator[>=] Other[0] operator[&&] identifier[index] operator[<] identifier[numBits] operator[:] literal[String] operator[+] identifier[index] operator[+] literal[String] operator... |
public String currentStatus() {
StringBuffer sb = new StringBuffer();
sb.append("===== CommonThreadPool Status at ").append(new Date()).append(" =====\n");
sb.append("Threads: current=").append(thread_pool.getPoolSize());
sb.append(", core=").append(thread_pool.getCorePoolSize());
... | class class_name[name] begin[{]
method[currentStatus, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[StringBuffer], sb]
call[sb.append, parameter[literal["===== CommonThreadPool Status at "]]]
call[sb.append, parameter[literal["Thr... | Keyword[public] identifier[String] identifier[currentStatus] operator[SEP] operator[SEP] {
identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP... |
@NonNull
public static SelectFrom selectFrom(@NonNull String table) {
return selectFrom(CqlIdentifier.fromCql(table));
} | class class_name[name] begin[{]
method[selectFrom, return_type[type[SelectFrom]], modifier[public static], parameter[table]] begin[{]
return[call[.selectFrom, parameter[call[CqlIdentifier.fromCql, parameter[member[.table]]]]]]
end[}]
END[}] | annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[SelectFrom] identifier[selectFrom] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[table] operator[SEP] {
Keyword[return] identifier[selectFrom] operator[SEP] identifier[CqlIdentifier] operator[SEP] identif... |
@Override
public void write(long offset, ByteBuffer sourceBuffer) throws IOException {
offset += contentStart;
sourceBuffer.position(0);
long newFilePosition = offset + sourceBuffer.limit();
if (newFilePosition > contentEnd) {
logger.debug("Filesize exceeded (contendEnd:... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[offset, sourceBuffer]] begin[{]
assign[member[.offset], member[.contentStart]]
call[sourceBuffer.position, parameter[literal[0]]]
local_variable[type[long], newFilePosition]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[long] identifier[offset] , identifier[ByteBuffer] identifier[sourceBuffer] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[offset] operator[+=] identifier[contentStart] operator[SEP] ident... |
private void closeZooKeeper(@Nullable ZooKeeper zk) {
try {
if (zk != null) {
zk.close();
}
} catch (InterruptedException e) {
LOG.warn("Interrupted when closing ZooKeeper", e);
Thread.currentThread().interrupt();
}
} | class class_name[name] begin[{]
method[closeZooKeeper, return_type[void], modifier[private], parameter[zk]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=zk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postf... | Keyword[private] Keyword[void] identifier[closeZooKeeper] operator[SEP] annotation[@] identifier[Nullable] identifier[ZooKeeper] identifier[zk] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[zk] operator[!=] Other[null] operator[SEP] {
identifier[zk] operator[SEP] i... |
private final int load_digits(StringBuilder sb, int c) throws IOException
{
if (!IonTokenConstsX.isDigit(c))
{
return c;
}
sb.append((char) c);
return readNumeric(sb, Radix.DECIMAL, NumericState.DIGIT);
} | class class_name[name] begin[{]
method[load_digits, return_type[type[int]], modifier[final private], parameter[sb, c]] begin[{]
if[call[IonTokenConstsX.isDigit, parameter[member[.c]]]] begin[{]
return[member[.c]]
else begin[{]
None
end[}]
call[sb.appe... | Keyword[private] Keyword[final] Keyword[int] identifier[load_digits] operator[SEP] identifier[StringBuilder] identifier[sb] , Keyword[int] identifier[c] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[IonTokenConstsX] operator[SEP] identifier[isDigit] ope... |
public static Type getBound(WildcardType wildcardType) {
Type[] lowerBounds = wildcardType.getLowerBounds();
if (lowerBounds.length != 0) {
return lowerBounds[0];
}
return wildcardType.getUpperBounds()[0];
} | class class_name[name] begin[{]
method[getBound, return_type[type[Type]], modifier[public static], parameter[wildcardType]] begin[{]
local_variable[type[Type], lowerBounds]
if[binary_operation[member[lowerBounds.length], !=, literal[0]]] begin[{]
return[member[.lowerBounds]]... | Keyword[public] Keyword[static] identifier[Type] identifier[getBound] operator[SEP] identifier[WildcardType] identifier[wildcardType] operator[SEP] {
identifier[Type] operator[SEP] operator[SEP] identifier[lowerBounds] operator[=] identifier[wildcardType] operator[SEP] identifier[getLowerBounds] operator[SEP] op... |
public int delete(CMARole role) {
final String id = getResourceIdOrThrow(role, "role");
final String spaceId = getSpaceIdOrThrow(role, "role");
final CMASystem sys = role.getSystem();
role.setSystem(null);
try {
final Response<Void> response = service.delete(spaceId, id).blockingFirst();
... | class class_name[name] begin[{]
method[delete, return_type[type[int]], modifier[public], parameter[role]] begin[{]
local_variable[type[String], id]
local_variable[type[String], spaceId]
local_variable[type[CMASystem], sys]
call[role.setSystem, parameter[literal[null]]]
... | Keyword[public] Keyword[int] identifier[delete] operator[SEP] identifier[CMARole] identifier[role] operator[SEP] {
Keyword[final] identifier[String] identifier[id] operator[=] identifier[getResourceIdOrThrow] operator[SEP] identifier[role] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[... |
@CheckResult
@NonNull
public final PowerAdapter offset(int offset) {
if (offset <= 0) {
return this;
}
if (offset == Integer.MAX_VALUE) {
return EMPTY;
}
return new OffsetAdapter(this, offset);
} | class class_name[name] begin[{]
method[offset, return_type[type[PowerAdapter]], modifier[final public], parameter[offset]] begin[{]
if[binary_operation[member[.offset], <=, literal[0]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[binary_opera... | annotation[@] identifier[CheckResult] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] identifier[PowerAdapter] identifier[offset] operator[SEP] Keyword[int] identifier[offset] operator[SEP] {
Keyword[if] operator[SEP] identifier[offset] operator[<=] Other[0] operator[SEP] {
Keyword[re... |
private TaskAttemptCompletionEvent createTaskAttemptCompletionEvent(
SimulatorTaskInProgress tip, long now) {
// We need to clone() status as we modify and it goes into an Event
TaskStatus status = (TaskStatus)tip.getTaskStatus().clone();
long delta = tip.getUserSpaceR... | class class_name[name] begin[{]
method[createTaskAttemptCompletionEvent, return_type[type[TaskAttemptCompletionEvent]], modifier[private], parameter[tip, now]] begin[{]
local_variable[type[TaskStatus], status]
local_variable[type[long], delta]
AssertStatement(condition=BinaryOperation(o... | Keyword[private] identifier[TaskAttemptCompletionEvent] identifier[createTaskAttemptCompletionEvent] operator[SEP] identifier[SimulatorTaskInProgress] identifier[tip] , Keyword[long] identifier[now] operator[SEP] {
identifier[TaskStatus] identifier[status] operator[=] operator[SEP] identifier[TaskStatus] operat... |
public void marshall(ListedServer listedServer, ProtocolMarshaller protocolMarshaller) {
if (listedServer == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listedServer.getArn(), ARN_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[listedServer, protocolMarshaller]] begin[{]
if[binary_operation[member[.listedServer], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListedServer] identifier[listedServer] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listedServer] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
public boolean readNext(BinaryWritable<M> writable) throws IOException {
byte[] blob = readNextProtoBytes();
if (blob != null) {
writable.set(protoConverter_.fromBytes(blob));
return true;
}
return false;
} | class class_name[name] begin[{]
method[readNext, return_type[type[boolean]], modifier[public], parameter[writable]] begin[{]
local_variable[type[byte], blob]
if[binary_operation[member[.blob], !=, literal[null]]] begin[{]
call[writable.set, parameter[call[protoCo... | Keyword[public] Keyword[boolean] identifier[readNext] operator[SEP] identifier[BinaryWritable] operator[<] identifier[M] operator[>] identifier[writable] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[blob] operator[=] identifier[readNextProtoBytes] o... |
public static <T extends IPositioned & ISized> IntSupplier below(T other, int spacing)
{
checkNotNull(other);
return () -> {
return other.position().y() + other.size().height() + spacing;
};
} | class class_name[name] begin[{]
method[below, return_type[type[IntSupplier]], modifier[public static], parameter[other, spacing]] begin[{]
call[.checkNotNull, parameter[member[.other]]]
return[LambdaExpression(body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(ope... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[IPositioned] operator[&] identifier[ISized] operator[>] identifier[IntSupplier] identifier[below] operator[SEP] identifier[T] identifier[other] , Keyword[int] identifier[spacing] operator[SEP] {
identifier[checkNotNull] operat... |
public void addPlugin(ComponentPlugin plugin)
{
if (RegistryInitializationEntryPlugin.class.isAssignableFrom(plugin.getClass()))
{
RegistryInitializationEntryPlugin registryPlugin = (RegistryInitializationEntryPlugin)plugin;
appConfigurations = registryPlugin.getAppConfiguration();
... | class class_name[name] begin[{]
method[addPlugin, return_type[void], modifier[public], parameter[plugin]] begin[{]
if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[]... | Keyword[public] Keyword[void] identifier[addPlugin] operator[SEP] identifier[ComponentPlugin] identifier[plugin] operator[SEP] {
Keyword[if] operator[SEP] identifier[RegistryInitializationEntryPlugin] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[plugin] operato... |
protected void parseXaPool(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException, ParserException, ValidateException {
while (reader.hasNext()) {
switch (reader.nextTag()) {
case END_ELEMENT: {
if (XaDataSource.Tag.forName(reader.getLocalName... | class class_name[name] begin[{]
method[parseXaPool, return_type[void], modifier[protected], parameter[reader, node]] begin[{]
while[call[reader.hasNext, parameter[]]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['END_ELEMENT'], statements=[BlockStatement(label=None, sta... | Keyword[protected] Keyword[void] identifier[parseXaPool] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[ModelNode] identifier[node] operator[SEP] Keyword[throws] identifier[XMLStreamException] , identifier[ParserException] , identifier[ValidateException] {
Keyword[while] ope... |
private void assignHuffmanCodeSymbols() {
final int[][] huffmanMergedCodeSymbols = this.huffmanMergedCodeSymbols;
final int[][] huffmanCodeLengths = this.huffmanCodeLengths;
final int mtfAlphabetSize = this.mtfAlphabetSize;
final int totalTables = huffmanCodeLengths.length;
for... | class class_name[name] begin[{]
method[assignHuffmanCodeSymbols, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], huffmanMergedCodeSymbols]
local_variable[type[int], huffmanCodeLengths]
local_variable[type[int], mtfAlphabetSize]
local_variabl... | Keyword[private] Keyword[void] identifier[assignHuffmanCodeSymbols] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[huffmanMergedCodeSymbols] operator[=] Keyword[this] operator[SEP] identifier[huffmanMergedCodeSymbols] operator[SEP] Key... |
public static void downloadObjectToFile(S3Object s3Object,
final File destinationFile, boolean performIntegrityCheck,
boolean appendData) {
downloadToFile(s3Object, destinationFile, performIntegrityCheck, appendData, -1);
} | class class_name[name] begin[{]
method[downloadObjectToFile, return_type[void], modifier[public static], parameter[s3Object, destinationFile, performIntegrityCheck, appendData]] begin[{]
call[.downloadToFile, parameter[member[.s3Object], member[.destinationFile], member[.performIntegrityCheck],... | Keyword[public] Keyword[static] Keyword[void] identifier[downloadObjectToFile] operator[SEP] identifier[S3Object] identifier[s3Object] , Keyword[final] identifier[File] identifier[destinationFile] , Keyword[boolean] identifier[performIntegrityCheck] , Keyword[boolean] identifier[appendData] operator[SEP] {
id... |
@InterfaceAudience.Private
public static boolean isValidDocumentId(String id) {
// http://wiki.apache.org/couchdb/HTTP_Document_API#Documents
if (id == null || id.length() == 0)
return false;
if (id.charAt(0) == '_')
return (id.startsWith("_design/"));
return ... | class class_name[name] begin[{]
method[isValidDocumentId, return_type[type[boolean]], modifier[public static], parameter[id]] begin[{]
if[binary_operation[binary_operation[member[.id], ==, literal[null]], ||, binary_operation[call[id.length, parameter[]], ==, literal[0]]]] begin[{]
return[liter... | annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Private] Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidDocumentId] operator[SEP] identifier[String] identifier[id] operator[SEP] {
Keyword[if] operator[SEP] identifier[id] operator[==] Other[null] operator[||] identifier[id... |
protected InstallRequest buildInstallRequest(MemberState member) {
Snapshot snapshot = context.getSnapshotStore().currentSnapshot();
if (member.getNextSnapshotIndex() != snapshot.index()) {
member.setNextSnapshotIndex(snapshot.index()).setNextSnapshotOffset(0);
}
InstallRequest request;
synch... | class class_name[name] begin[{]
method[buildInstallRequest, return_type[type[InstallRequest]], modifier[protected], parameter[member]] begin[{]
local_variable[type[Snapshot], snapshot]
if[binary_operation[call[member.getNextSnapshotIndex, parameter[]], !=, call[snapshot.index, parameter... | Keyword[protected] identifier[InstallRequest] identifier[buildInstallRequest] operator[SEP] identifier[MemberState] identifier[member] operator[SEP] {
identifier[Snapshot] identifier[snapshot] operator[=] identifier[context] operator[SEP] identifier[getSnapshotStore] operator[SEP] operator[SEP] operator[SEP] ide... |
public void deleteOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit)
throws CmsException {
// check organizational unit in context
if (dbc.getRequestContext().getOuFqn().equals(organizationalUnit.getName())) {
throw new CmsDbConsistencyException(
... | class class_name[name] begin[{]
method[deleteOrganizationalUnit, return_type[void], modifier[public], parameter[dbc, organizationalUnit]] begin[{]
if[call[dbc.getRequestContext, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], m... | Keyword[public] Keyword[void] identifier[deleteOrganizationalUnit] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsOrganizationalUnit] identifier[organizationalUnit] operator[SEP] Keyword[throws] identifier[CmsException] {
Keyword[if] operator[SEP] identifier[dbc] operator[SEP] identifier... |
@Override
public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit)
throws IOException {
hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName());
hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName());
hiveUnit.setOutputFormat(this.serDeWrapper.getOutput... | class class_name[name] begin[{]
method[addSerDeProperties, return_type[void], modifier[public], parameter[path, hiveUnit]] begin[{]
call[hiveUnit.setSerDeType, parameter[THIS[member[None.serDeWrapper]call[None.getSerDe, parameter[]]call[None.getClass, parameter[]]call[None.getName, parameter[]]... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addSerDeProperties] operator[SEP] identifier[Path] identifier[path] , identifier[HiveRegistrationUnit] identifier[hiveUnit] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[hiveUnit] operator[SEP] identifier[setSerDeTy... |
public static boolean varyMatches(
Response cachedResponse, Headers cachedRequest, Request newRequest) {
for (String field : varyFields(cachedResponse)) {
if (!Objects.equals(cachedRequest.values(field), newRequest.headers(field))) return false;
}
return true;
} | class class_name[name] begin[{]
method[varyMatches, return_type[type[boolean]], modifier[public static], parameter[cachedResponse, cachedRequest, newRequest]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[varyMatches] operator[SEP] identifier[Response] identifier[cachedResponse] , identifier[Headers] identifier[cachedRequest] , identifier[Request] identifier[newRequest] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[field] ope... |
public final void ruleXPrimaryExpression() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXbase.g:671:2: ( ( ( rule__XPrimaryExpression__Alternatives ) ) )
// InternalXbase.g:672:2: ( ( rule__XPrimaryExpression__Alternatives ) )
... | class class_name[name] begin[{]
method[ruleXPrimaryExpression, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], stackSize]
TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOper... | Keyword[public] Keyword[final] Keyword[void] identifier[ruleXPrimaryExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[int] identifier[stackSize] operator[=] identifier[keepStackSize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
{
... |
@Nullable
public static String getClassPackageName (@Nullable final Class <?> aClass)
{
return aClass == null ? null : getClassPackageName (aClass.getName ());
} | class class_name[name] begin[{]
method[getClassPackageName, return_type[type[String]], modifier[public static], parameter[aClass]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), op... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getClassPackageName] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[aClass] operator[SEP] {
Keyword[return] identifier[aClass] operato... |
public View setTypeface(Context context, @LayoutRes int layoutRes, ViewGroup parent, @StringRes int strResId) {
return setTypeface(context, layoutRes, parent, mApplication.getString(strResId));
} | class class_name[name] begin[{]
method[setTypeface, return_type[type[View]], modifier[public], parameter[context, layoutRes, parent, strResId]] begin[{]
return[call[.setTypeface, parameter[member[.context], member[.layoutRes], member[.parent], call[mApplication.getString, parameter[member[.strResId]]]]... | Keyword[public] identifier[View] identifier[setTypeface] operator[SEP] identifier[Context] identifier[context] , annotation[@] identifier[LayoutRes] Keyword[int] identifier[layoutRes] , identifier[ViewGroup] identifier[parent] , annotation[@] identifier[StringRes] Keyword[int] identifier[strResId] operator[SEP] {
... |
public static Set<Policy> policies(Config config) {
LruWindowTinyLfuSettings settings = new LruWindowTinyLfuSettings(config);
return settings.percentMain().stream()
.map(percentMain -> new LruWindowTinyLfuPolicy(percentMain, settings))
.collect(toSet());
} | class class_name[name] begin[{]
method[policies, return_type[type[Set]], modifier[public static], parameter[config]] begin[{]
local_variable[type[LruWindowTinyLfuSettings], settings]
return[call[settings.percentMain, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Policy] operator[>] identifier[policies] operator[SEP] identifier[Config] identifier[config] operator[SEP] {
identifier[LruWindowTinyLfuSettings] identifier[settings] operator[=] Keyword[new] identifier[LruWindowTinyLfuSettings] operator[SEP]... |
private static boolean multiPointWithinEnvelope_(MultiPoint multipoint_a,
Envelope envelope_b, double tolerance,
ProgressTracker progress_tracker) {
Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
multipoint_a.queryEnvelope2D(env_a);
envelope_b.queryEnvelope2D(env_b);
if (!envelopeInfConta... | class class_name[name] begin[{]
method[multiPointWithinEnvelope_, return_type[type[boolean]], modifier[private static], parameter[multipoint_a, envelope_b, tolerance, progress_tracker]] begin[{]
local_variable[type[Envelope2D], env_a]
call[multipoint_a.queryEnvelope2D, parameter[member[... | Keyword[private] Keyword[static] Keyword[boolean] identifier[multiPointWithinEnvelope_] operator[SEP] identifier[MultiPoint] identifier[multipoint_a] , identifier[Envelope] identifier[envelope_b] , Keyword[double] identifier[tolerance] , identifier[ProgressTracker] identifier[progress_tracker] operator[SEP] {
... |
public static Predicates<Object> in(Iterable<?> iterable)
{
if (iterable instanceof SetIterable<?>)
{
return new InSetIterablePredicate((SetIterable<?>) iterable);
}
if (iterable instanceof Set<?>)
{
return new InSetPredicate((Set<?>) iterable);
... | class class_name[name] begin[{]
method[in, return_type[type[Predicates]], modifier[public static], parameter[iterable]] begin[{]
if[binary_operation[member[.iterable], instanceof, type[SetIterable]]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=iter... | Keyword[public] Keyword[static] identifier[Predicates] operator[<] identifier[Object] operator[>] identifier[in] operator[SEP] identifier[Iterable] operator[<] operator[?] operator[>] identifier[iterable] operator[SEP] {
Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[SetIterable] o... |
public static final boolean isArchive(InputStream in) throws IOException {
if (in != null) {
try (ZipInputStream zip = new ZipInputStream(in)){
return zip.getNextEntry() != null;
} catch (ZipException e) {
return false;
}
}
retu... | class class_name[name] begin[{]
method[isArchive, return_type[type[boolean]], modifier[final public static], parameter[in]] begin[{]
if[binary_operation[member[.in], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation... | Keyword[public] Keyword[static] Keyword[final] Keyword[boolean] identifier[isArchive] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[in] operator[!=] Other[null] operator[SEP] {
Keyword[try] operator[SEP... |
public TextBuilder link(final String text, final URL url) {
this.curParagraphBuilder.link(text, url);
return this;
} | class class_name[name] begin[{]
method[link, return_type[type[TextBuilder]], modifier[public], parameter[text, url]] begin[{]
THIS[member[None.curParagraphBuilder]call[None.link, parameter[member[.text], member[.url]]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[TextBuilder] identifier[link] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[URL] identifier[url] operator[SEP] {
Keyword[this] operator[SEP] identifier[curParagraphBuilder] operator[SEP] identifier[link] operator[SEP] identifier[text] , ... |
private static Node getFirstNonEmptyChild(Node n) {
for (Node c = n.getFirstChild(); c != null; c = c.getNext()) {
if (c.isBlock()) {
Node result = getFirstNonEmptyChild(c);
if (result != null) {
return result;
}
} else if (!c.isEmpty()) {
return c;
}
... | class class_name[name] begin[{]
method[getFirstNonEmptyChild, return_type[type[Node]], modifier[private static], parameter[n]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isBlock, postfix_operators=[], prefix_operators=[]... | Keyword[private] Keyword[static] identifier[Node] identifier[getFirstNonEmptyChild] operator[SEP] identifier[Node] identifier[n] operator[SEP] {
Keyword[for] operator[SEP] identifier[Node] identifier[c] operator[=] identifier[n] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] id... |
public static void setCurrentUser(UserGroupInformation ugi) {
Subject user = SecurityUtil.getSubject(ugi);
currentUser.set(user);
} | class class_name[name] begin[{]
method[setCurrentUser, return_type[void], modifier[public static], parameter[ugi]] begin[{]
local_variable[type[Subject], user]
call[currentUser.set, parameter[member[.user]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[setCurrentUser] operator[SEP] identifier[UserGroupInformation] identifier[ugi] operator[SEP] {
identifier[Subject] identifier[user] operator[=] identifier[SecurityUtil] operator[SEP] identifier[getSubject] operator[SEP] identifier[ugi] operator[SEP] operat... |
@Override
public void notifyClients()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "notifyClients");
long totalItems = getTotalMsgCount();
synchronized (this)
{
if (wlmRemoved && ((_destLowMsgs == -1) || (totalItems ... | class class_name[name] begin[{]
method[notifyClients, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], li... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[notifyClients] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabl... |
@Deprecated
public static ResourceHandler.Builder classpathHandler(String classpathRoot) {
return new Builder().withResourceProviderFactory(ResourceProviderFactory.classpathBased(classpathRoot));
} | class class_name[name] begin[{]
method[classpathHandler, return_type[type[ResourceHandler]], modifier[public static], parameter[classpathRoot]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[Me... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[ResourceHandler] operator[SEP] identifier[Builder] identifier[classpathHandler] operator[SEP] identifier[String] identifier[classpathRoot] operator[SEP] {
Keyword[return] Keyword[new] identifier[Builder] operator[SEP] operator[SEP] o... |
public void setPin(int numberPinBoxes, int inputType) {
if(numberPinBoxes<=0) {
numberPinBoxes = mNumberPinBoxes;
}
mLinearLayoutPinBoxes.removeAllViews();
setNumberPinBoxes(numberPinBoxes);
pinBoxesIds = new int[numberPinBoxes];
pinSplitsIds = new int[number... | class class_name[name] begin[{]
method[setPin, return_type[void], modifier[public], parameter[numberPinBoxes, inputType]] begin[{]
if[binary_operation[member[.numberPinBoxes], <=, literal[0]]] begin[{]
assign[member[.numberPinBoxes], member[.mNumberPinBoxes]]
els... | Keyword[public] Keyword[void] identifier[setPin] operator[SEP] Keyword[int] identifier[numberPinBoxes] , Keyword[int] identifier[inputType] operator[SEP] {
Keyword[if] operator[SEP] identifier[numberPinBoxes] operator[<=] Other[0] operator[SEP] {
identifier[numberPinBoxes] operator[=] identifier[mNum... |
@Deprecated
public final FluentIterable<T> preOrderTraversal(final T root) {
checkNotNull(root);
return new FluentIterable<T>() {
@Override
public UnmodifiableIterator<T> iterator() {
return preOrderIterator(root);
}
@Override
public void forEach(Consumer<? super T> acti... | class class_name[name] begin[{]
method[preOrderTraversal, return_type[type[FluentIterable]], modifier[final public], parameter[root]] begin[{]
call[.checkNotNull, parameter[member[.root]]]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, na... | annotation[@] identifier[Deprecated] Keyword[public] Keyword[final] identifier[FluentIterable] operator[<] identifier[T] operator[>] identifier[preOrderTraversal] operator[SEP] Keyword[final] identifier[T] identifier[root] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[root] operator[SEP] oper... |
private String getNextAsymId(String asymId) {
if (asymId.length()==1) {
if (!asymId.equals("Z")) {
return Character.toString(getNextChar(asymId.charAt(0)));
} else {
return "AA";
}
} else if (asymId.length()==2) {
if (asymId.equals("ZZ")) {
return "AAA";
}
char[] c = new char[2];
as... | class class_name[name] begin[{]
method[getNextAsymId, return_type[type[String]], modifier[private], parameter[asymId]] begin[{]
if[binary_operation[call[asymId.length, parameter[]], ==, literal[1]]] begin[{]
if[call[asymId.equals, parameter[literal["Z"]]]] begin[{]
... | Keyword[private] identifier[String] identifier[getNextAsymId] operator[SEP] identifier[String] identifier[asymId] operator[SEP] {
Keyword[if] operator[SEP] identifier[asymId] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] {
Keyword[if] operator[SEP] op... |
public ListConfigurationRevisionsResult withRevisions(ConfigurationRevision... revisions) {
if (this.revisions == null) {
setRevisions(new java.util.ArrayList<ConfigurationRevision>(revisions.length));
}
for (ConfigurationRevision ele : revisions) {
this.revisions.add(ele... | class class_name[name] begin[{]
method[withRevisions, return_type[type[ListConfigurationRevisionsResult]], modifier[public], parameter[revisions]] begin[{]
if[binary_operation[THIS[member[None.revisions]], ==, literal[null]]] begin[{]
call[.setRevisions, parameter[ClassC... | Keyword[public] identifier[ListConfigurationRevisionsResult] identifier[withRevisions] operator[SEP] identifier[ConfigurationRevision] operator[...] identifier[revisions] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[revisions] operator[==] Other[null] operator[SEP] {
... |
public void marshall(IpPermission ipPermission, ProtocolMarshaller protocolMarshaller) {
if (ipPermission == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(ipPermission.getFromPort(), FROMPORT_BINDIN... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[ipPermission, protocolMarshaller]] begin[{]
if[binary_operation[member[.ipPermission], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_opera... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[IpPermission] identifier[ipPermission] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[ipPermission] operator[==] Other[null] operator[SEP] {
Keyword[throw]... |
private static MethodRef getForNumberMethod(EnumDescriptor descriptor) {
TypeInfo enumType = enumRuntimeType(descriptor);
return MethodRef.createStaticMethod(
enumType, new Method("forNumber", enumType.type(), ONE_INT_ARG))
// Note: Enum.forNumber() returns null if there is no corresponding ... | class class_name[name] begin[{]
method[getForNumberMethod, return_type[type[MethodRef]], modifier[private static], parameter[descriptor]] begin[{]
local_variable[type[TypeInfo], enumType]
return[call[MethodRef.createStaticMethod, parameter[member[.enumType], ClassCreator(arguments=[Literal(post... | Keyword[private] Keyword[static] identifier[MethodRef] identifier[getForNumberMethod] operator[SEP] identifier[EnumDescriptor] identifier[descriptor] operator[SEP] {
identifier[TypeInfo] identifier[enumType] operator[=] identifier[enumRuntimeType] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] ... |
public void write(Object o) throws OfficeWriterException {
if (this.currentOfficeSpreadSheetWriter!=null) {
this.currentOfficeSpreadSheetWriter.write(o);
} else {
throw new OfficeWriterException(EX_NO_WRITER_INSTANTIATED);
}
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[o]] begin[{]
if[binary_operation[THIS[member[None.currentOfficeSpreadSheetWriter]], !=, literal[null]]] begin[{]
THIS[member[None.currentOfficeSpreadSheetWriter]call[None.write, ... | Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Object] identifier[o] operator[SEP] Keyword[throws] identifier[OfficeWriterException] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[currentOfficeSpreadSheetWriter] operator[!=] Other[null] operator[SEP] {
Key... |
public static BigInteger fromUnsignedByteArray(byte[] buf, int off, int length) {
byte[] mag = buf;
if (off != 0 || length != buf.length) {
mag = new byte[length];
System.arraycopy(buf, off, mag, 0, length);
}
return new BigInteger(1, mag);
} | class class_name[name] begin[{]
method[fromUnsignedByteArray, return_type[type[BigInteger]], modifier[public static], parameter[buf, off, length]] begin[{]
local_variable[type[byte], mag]
if[binary_operation[binary_operation[member[.off], !=, literal[0]], ||, binary_operation[member[.le... | Keyword[public] Keyword[static] identifier[BigInteger] identifier[fromUnsignedByteArray] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[off] , Keyword[int] identifier[length] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[mag] operator[=]... |
@Override
protected void initialiseComponentModel() {
super.initialiseComponentModel();
// Copy the custom tree (if set) to allow the nodes to be updated per user
TreeItemIdNode custom = getCustomTree();
if (custom != null) {
TreeItemIdNode copy = TreeItemUtil.copyTreeNode(custom);
setCustomTree(copy);
... | class class_name[name] begin[{]
method[initialiseComponentModel, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=initialiseComponentModel, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initialiseComponentModel] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[initialiseComponentModel] operator[SEP] operator[SEP] operator[SEP] identifier[TreeItemIdNode] identifier[custom] operator[=] identifier[g... |
public FileEntry put( DirectoryEntry parent, String name, byte[] content )
throws IOException
{
return put( parent, name, new ByteArrayInputStream( content ) );
} | class class_name[name] begin[{]
method[put, return_type[type[FileEntry]], modifier[public], parameter[parent, name, content]] begin[{]
return[call[.put, parameter[member[.parent], member[.name], ClassCreator(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] identifier[FileEntry] identifier[put] operator[SEP] identifier[DirectoryEntry] identifier[parent] , identifier[String] identifier[name] , Keyword[byte] operator[SEP] operator[SEP] identifier[content] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[put] operato... |
public void marshall(BotMetadata botMetadata, ProtocolMarshaller protocolMarshaller) {
if (botMetadata == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(botMetadata.getName(), NAME_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[botMetadata, protocolMarshaller]] begin[{]
if[binary_operation[member[.botMetadata], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operato... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BotMetadata] identifier[botMetadata] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[botMetadata] operator[==] Other[null] operator[SEP] {
Keyword[throw] Ke... |
@SuppressWarnings("static-method")
protected boolean isResponsible(Map<Object, Object> context, EObject eObject) {
// Skip the validation of an feature call if one of its container was validated previously
if (eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall) {
final XAbstractFeatureCall... | class class_name[name] begin[{]
method[isResponsible, return_type[type[boolean]], modifier[protected], parameter[context, eObject]] begin[{]
if[binary_operation[binary_operation[member[.eObject], instanceof, type[XMemberFeatureCall]], ||, binary_operation[member[.eObject], instanceof, type[XFea... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[boolean] identifier[isResponsible] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] , identifier[EObject] identifier[eObject] operator[SEP]... |
public void into(@NonNull RemoteViews remoteViews, @IdRes int viewId, int appWidgetId,
@Nullable Callback callback) {
into(remoteViews, viewId, new int[] { appWidgetId }, callback);
} | class class_name[name] begin[{]
method[into, return_type[void], modifier[public], parameter[remoteViews, viewId, appWidgetId, callback]] begin[{]
call[.into, parameter[member[.remoteViews], member[.viewId], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReferen... | Keyword[public] Keyword[void] identifier[into] operator[SEP] annotation[@] identifier[NonNull] identifier[RemoteViews] identifier[remoteViews] , annotation[@] identifier[IdRes] Keyword[int] identifier[viewId] , Keyword[int] identifier[appWidgetId] , annotation[@] identifier[Nullable] identifier[Callback] identifier[... |
public static String collapse(String name) {
if (name == null) {
return null;
}
int breakPoint = name.lastIndexOf('.');
if (breakPoint < 0) {
return name;
}
return collapseQualifier(name.substring(0, breakPoint), true) + name.substring(breakPoint); // includes last '.'
} | class class_name[name] begin[{]
method[collapse, return_type[type[String]], modifier[public static], parameter[name]] begin[{]
if[binary_operation[member[.name], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[... | Keyword[public] Keyword[static] identifier[String] identifier[collapse] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[int] identifie... |
private static double scoreToPvalue(double score, int n) {
double T= score/Math.sqrt((1-score*score)/(n-2));
return ContinuousDistributions.studentsCdf(T, n-2);
} | class class_name[name] begin[{]
method[scoreToPvalue, return_type[type[double]], modifier[private static], parameter[score, n]] begin[{]
local_variable[type[double], T]
return[call[ContinuousDistributions.studentsCdf, parameter[member[.T], binary_operation[member[.n], -, literal[2]]]]]
end[... | Keyword[private] Keyword[static] Keyword[double] identifier[scoreToPvalue] operator[SEP] Keyword[double] identifier[score] , Keyword[int] identifier[n] operator[SEP] {
Keyword[double] identifier[T] operator[=] identifier[score] operator[/] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[S... |
public static int cusparseSnnz_compress(
cusparseHandle handle,
int m,
cusparseMatDescr descr,
Pointer csrSortedValA,
Pointer csrSortedRowPtrA,
Pointer nnzPerRow,
Pointer nnzC,
float tol)
{
return checkResult(cusparseSnnz_compr... | class class_name[name] begin[{]
method[cusparseSnnz_compress, return_type[type[int]], modifier[public static], parameter[handle, m, descr, csrSortedValA, csrSortedRowPtrA, nnzPerRow, nnzC, tol]] begin[{]
return[call[.checkResult, parameter[call[.cusparseSnnz_compressNative, parameter[member[.handle], m... | Keyword[public] Keyword[static] Keyword[int] identifier[cusparseSnnz_compress] operator[SEP] identifier[cusparseHandle] identifier[handle] , Keyword[int] identifier[m] , identifier[cusparseMatDescr] identifier[descr] , identifier[Pointer] identifier[csrSortedValA] , identifier[Pointer] identifier[csrSortedRowPtrA] ... |
public static HashMap<String, ArrayList<String>> getAutoPlantingDate(HashMap data, String eDate, String lDate, String rain, String days) {
Map wthData;
ArrayList<Map> dailyData;
ArrayList<HashMap<String, String>> eventData;
Event event;
Calendar eDateCal = Calendar.getInstance()... | class class_name[name] begin[{]
method[getAutoPlantingDate, return_type[type[HashMap]], modifier[public static], parameter[data, eDate, lDate, rain, days]] begin[{]
local_variable[type[Map], wthData]
local_variable[type[ArrayList], dailyData]
local_variable[type[ArrayList], eventData]
... | Keyword[public] Keyword[static] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] identifier[getAutoPlantingDate] operator[SEP] identifier[HashMap] identifier[data] , identifier[String] identifier[eDate] , identifier[String] identifier[l... |
@Nullable
public static StaticImportInfo tryCreate(ImportTree tree, VisitorState state) {
if (!tree.isStatic()) {
return null;
}
if (!(tree.getQualifiedIdentifier() instanceof JCTree.JCFieldAccess)) {
return null;
}
JCTree.JCFieldAccess access = (JCTree.JCFieldAccess) tree.getQualified... | class class_name[name] begin[{]
method[tryCreate, return_type[type[StaticImportInfo]], modifier[public static], parameter[tree, state]] begin[{]
if[call[tree.isStatic, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[binary_op... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[StaticImportInfo] identifier[tryCreate] operator[SEP] identifier[ImportTree] identifier[tree] , identifier[VisitorState] identifier[state] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[tree] operator[SEP] identifier... |
public void unsetSla() {
boolean oldSla = sla;
boolean oldSlaESet = slaESet;
sla = SLA_EDEFAULT;
slaESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, BpsimPackage.PARAMETER__SLA, oldSla, SLA_EDEFAULT, oldSlaESet));
} | class class_name[name] begin[{]
method[unsetSla, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], oldSla]
local_variable[type[boolean], oldSlaESet]
assign[member[.sla], member[.SLA_EDEFAULT]]
assign[member[.slaESet], litera... | Keyword[public] Keyword[void] identifier[unsetSla] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[oldSla] operator[=] identifier[sla] operator[SEP] Keyword[boolean] identifier[oldSlaESet] operator[=] identifier[slaESet] operator[SEP] identifier[sla] operator[=] identifier[SLA_EDEFAULT] operator[SEP] i... |
public static int secondsDiff(Date earlierDate, Date laterDate) {
if (earlierDate == null || laterDate == null) {
return 0;
}
return (int) ((laterDate.getTime() / SECOND_MILLIS) - (earlierDate.getTime() / SECOND_MILLIS));
} | class class_name[name] begin[{]
method[secondsDiff, return_type[type[int]], modifier[public static], parameter[earlierDate, laterDate]] begin[{]
if[binary_operation[binary_operation[member[.earlierDate], ==, literal[null]], ||, binary_operation[member[.laterDate], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[int] identifier[secondsDiff] operator[SEP] identifier[Date] identifier[earlierDate] , identifier[Date] identifier[laterDate] operator[SEP] {
Keyword[if] operator[SEP] identifier[earlierDate] operator[==] Other[null] operator[||] identifier[laterDate] operator[==] Other[nu... |
public TaskAddOptions withOcpDate(DateTime ocpDate) {
if (ocpDate == null) {
this.ocpDate = null;
} else {
this.ocpDate = new DateTimeRfc1123(ocpDate);
}
return this;
} | class class_name[name] begin[{]
method[withOcpDate, return_type[type[TaskAddOptions]], modifier[public], parameter[ocpDate]] begin[{]
if[binary_operation[member[.ocpDate], ==, literal[null]]] begin[{]
assign[THIS[member[None.ocpDate]], literal[null]]
else begin[{... | Keyword[public] identifier[TaskAddOptions] identifier[withOcpDate] operator[SEP] identifier[DateTime] identifier[ocpDate] operator[SEP] {
Keyword[if] operator[SEP] identifier[ocpDate] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Other[null] opera... |
@Override
public <T extends IChemObject> T read(T object) throws CDKException {
if (object instanceof IReaction) {
return (T) readReaction(object.getBuilder());
} else if (object instanceof IReactionSet) {
IReactionSet reactionSet = object.getBuilder().newInstance(IReactionSe... | class class_name[name] begin[{]
method[read, return_type[type[T]], modifier[public], parameter[object]] begin[{]
if[binary_operation[member[.object], instanceof, type[IReaction]]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBu... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[IChemObject] operator[>] identifier[T] identifier[read] operator[SEP] identifier[T] identifier[object] operator[SEP] Keyword[throws] identifier[CDKException] {
Keyword[if] operator[SEP] identifier[object] Key... |
private <T> T convertObject(byte[] json, Class<T> claz) throws IOException {
TypeReference<RestSuccessResult<Map<?, ?>>> typeReference = new TypeReference<RestSuccessResult<Map<?, ?>>>() {
};
RestSuccessResult<T> successResponse = MAPPER.readValue(json, typeReference);
Map<?, ?> data = (... | class class_name[name] begin[{]
method[convertObject, return_type[type[T]], modifier[private], parameter[json, claz]] begin[{]
local_variable[type[TypeReference], typeReference]
local_variable[type[RestSuccessResult], successResponse]
local_variable[type[Map], data]
return[call[... | Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[convertObject] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[claz] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Ty... |
public static base_responses expire(nitro_service client, cachecontentgroup resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachecontentgroup expireresources[] = new cachecontentgroup[resources.length];
for (int i=0;i<resources.length;i++){
ex... | class class_name[name] begin[{]
method[expire, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operatio... | Keyword[public] Keyword[static] identifier[base_responses] identifier[expire] operator[SEP] identifier[nitro_service] identifier[client] , identifier[cachecontentgroup] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[r... |
public static int startsWith(String str, String[] arr)
{
if ( arr == null ) {
return -1;
}
for ( int i = 0; i < arr.length; i++ ) {
if ( arr[i].startsWith(str) ) {
return i;
}
}
return -1;
} | class class_name[name] begin[{]
method[startsWith, return_type[type[int]], modifier[public static], parameter[str, arr]] begin[{]
if[binary_operation[member[.arr], ==, literal[null]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
ForStatement(body=Blo... | Keyword[public] Keyword[static] Keyword[int] identifier[startsWith] operator[SEP] identifier[String] identifier[str] , identifier[String] operator[SEP] operator[SEP] identifier[arr] operator[SEP] {
Keyword[if] operator[SEP] identifier[arr] operator[==] Other[null] operator[SEP] {
Keyword[return] oper... |
public MockMvcRequestSpecBuilder addResultHandlers(ResultHandler resultHandler, ResultHandler... additionalResultHandlers) {
spec.resultHandlers(resultHandler, additionalResultHandlers);
return this;
} | class class_name[name] begin[{]
method[addResultHandlers, return_type[type[MockMvcRequestSpecBuilder]], modifier[public], parameter[resultHandler, additionalResultHandlers]] begin[{]
call[spec.resultHandlers, parameter[member[.resultHandler], member[.additionalResultHandlers]]]
return[T... | Keyword[public] identifier[MockMvcRequestSpecBuilder] identifier[addResultHandlers] operator[SEP] identifier[ResultHandler] identifier[resultHandler] , identifier[ResultHandler] operator[...] identifier[additionalResultHandlers] operator[SEP] {
identifier[spec] operator[SEP] identifier[resultHandlers] operator[... |
public void marshall(CreateJobRequest createJobRequest, ProtocolMarshaller protocolMarshaller) {
if (createJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(createJobRequest.getName(), NAM... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[createJobRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.createJobRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postf... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[CreateJobRequest] identifier[createJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[createJobRequest] operator[==] Other[null] operator[SEP] {
Ke... |
void unlinkEntry(FatLfnDirectoryEntry entry) {
final ShortName sn = entry.realEntry.getShortName();
if (sn.equals(ShortName.DOT) || sn.equals(ShortName.DOT_DOT)) throw
new IllegalArgumentException(
"the dot entries can not be removed");
final String ... | class class_name[name] begin[{]
method[unlinkEntry, return_type[void], modifier[default], parameter[entry]] begin[{]
local_variable[type[ShortName], sn]
if[binary_operation[call[sn.equals, parameter[member[ShortName.DOT]]], ||, call[sn.equals, parameter[member[ShortName.DOT_DOT]]]]] beg... | Keyword[void] identifier[unlinkEntry] operator[SEP] identifier[FatLfnDirectoryEntry] identifier[entry] operator[SEP] {
Keyword[final] identifier[ShortName] identifier[sn] operator[=] identifier[entry] operator[SEP] identifier[realEntry] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[... |
@SuppressWarnings({"PMD.UseVarargs", "PMD.CyclomaticComplexity", "checkstyle:CyclomaticComplexity"})
public static boolean isAssignableBounds(final Class[] one, final Class[] two) {
if (one.length == 0 || two.length == 0) {
throw new IllegalArgumentException(String.format("Incomplete bounds info... | class class_name[name] begin[{]
method[isAssignableBounds, return_type[type[boolean]], modifier[public static], parameter[one, two]] begin[{]
if[binary_operation[binary_operation[member[one.length], ==, literal[0]], ||, binary_operation[member[two.length], ==, literal[0]]]] begin[{]
... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[isAssignableBounds] operator[SEP] Keyword[final] identifier[Class] operator[SEP] operator[SEP] identifier[one] , Keyword... |
public static CertPathValidator getInstance(String algorithm)
throws NoSuchAlgorithmException {
Instance instance = GetInstance.getInstance("CertPathValidator",
CertPathValidatorSpi.class, algorithm);
return new CertPathValidator((CertPathValidatorSpi)instance.impl,
i... | class class_name[name] begin[{]
method[getInstance, return_type[type[CertPathValidator]], modifier[public static], parameter[algorithm]] begin[{]
local_variable[type[Instance], instance]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=impl, postfix_operators=[], prefix_ope... | Keyword[public] Keyword[static] identifier[CertPathValidator] identifier[getInstance] operator[SEP] identifier[String] identifier[algorithm] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] {
identifier[Instance] identifier[instance] operator[=] identifier[GetInstance] operator[SEP] identifier[... |
public static Point2D getBitmapCoordinate(double latitude, double longitude, int zoomLevel, TileFactoryInfo info)
{
double x = info.getMapCenterInPixelsAtZoom(zoomLevel).getX() + longitude
* info.getLongitudeDegreeWidthInPixels(zoomLevel);
double e = Math.sin(latitude * (Math.PI / 18... | class class_name[name] begin[{]
method[getBitmapCoordinate, return_type[type[Point2D]], modifier[public static], parameter[latitude, longitude, zoomLevel, info]] begin[{]
local_variable[type[double], x]
local_variable[type[double], e]
if[binary_operation[member[.e], >, literal[0... | Keyword[public] Keyword[static] identifier[Point2D] identifier[getBitmapCoordinate] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[longitude] , Keyword[int] identifier[zoomLevel] , identifier[TileFactoryInfo] identifier[info] operator[SEP] {
Keyword[double] identifier[x] opera... |
public static FlowElement getFlowElement(DelegateExecution execution) {
BpmnModel bpmnModel = getBpmnModel(execution);
FlowElement flowElement = bpmnModel.getFlowElement(execution.getCurrentActivityId());
if (flowElement == null) {
throw new ActivitiException("Could not find a FlowEl... | class class_name[name] begin[{]
method[getFlowElement, return_type[type[FlowElement]], modifier[public static], parameter[execution]] begin[{]
local_variable[type[BpmnModel], bpmnModel]
local_variable[type[FlowElement], flowElement]
if[binary_operation[member[.flowElement], ==, ... | Keyword[public] Keyword[static] identifier[FlowElement] identifier[getFlowElement] operator[SEP] identifier[DelegateExecution] identifier[execution] operator[SEP] {
identifier[BpmnModel] identifier[bpmnModel] operator[=] identifier[getBpmnModel] operator[SEP] identifier[execution] operator[SEP] operator[SEP] ide... |
public KeyArea setupKey(int iKeyArea)
{
KeyArea keyArea = null;
if (iKeyArea == 0)
{
keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
keyArea.addKeyField(ID, DBConstants.ASCENDING);
}
if (keyArea == null)
keyArea = super.setupKey(iKeyA... | class class_name[name] begin[{]
method[setupKey, return_type[type[KeyArea]], modifier[public], parameter[iKeyArea]] begin[{]
local_variable[type[KeyArea], keyArea]
if[binary_operation[member[.iKeyArea], ==, literal[0]]] begin[{]
assign[member[.keyArea], THIS[call... | Keyword[public] identifier[KeyArea] identifier[setupKey] operator[SEP] Keyword[int] identifier[iKeyArea] operator[SEP] {
identifier[KeyArea] identifier[keyArea] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[iKeyArea] operator[==] Other[0] operator[SEP] {
identifier[keyArea... |
private boolean decodeBulkStringEndOfLine(ByteBuf in, List<Object> out) throws Exception {
if (in.readableBytes() < RedisConstants.EOL_LENGTH) {
return false;
}
readEndOfLine(in);
out.add(FullBulkStringRedisMessage.EMPTY_INSTANCE);
resetDecoder();
return true;... | class class_name[name] begin[{]
method[decodeBulkStringEndOfLine, return_type[type[boolean]], modifier[private], parameter[in, out]] begin[{]
if[binary_operation[call[in.readableBytes, parameter[]], <, member[RedisConstants.EOL_LENGTH]]] begin[{]
return[literal[false]]
else ... | Keyword[private] Keyword[boolean] identifier[decodeBulkStringEndOfLine] operator[SEP] identifier[ByteBuf] identifier[in] , identifier[List] operator[<] identifier[Object] operator[>] identifier[out] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[in] operator[SEP] iden... |
public static String renderJson(Object o) {
Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
.create();
return gson.toJson(o);
} | class class_name[name] begin[{]
method[renderJson, return_type[type[String]], modifier[public static], parameter[o]] begin[{]
local_variable[type[Gson], gson]
return[call[gson.toJson, parameter[member[.o]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[renderJson] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
identifier[Gson] identifier[gson] operator[=] Keyword[new] identifier[GsonBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[disableHtmlEscaping] operator[SEP] opera... |
public final void writeNativeResponse(NativeResponse resp, JsonGenerator gen) throws IOException {
gen.writeStartObject();
if (factory().isRootNativeField()) {
gen.writeObjectFieldStart("native");
}
writeNativeResponseFields(resp, gen);
writeExtensions(resp, gen);
if (factory().isRootNativ... | class class_name[name] begin[{]
method[writeNativeResponse, return_type[void], modifier[final public], parameter[resp, gen]] begin[{]
call[gen.writeStartObject, parameter[]]
if[call[.factory, parameter[]]] begin[{]
call[gen.writeObjectFieldStart, paramete... | Keyword[public] Keyword[final] Keyword[void] identifier[writeNativeResponse] operator[SEP] identifier[NativeResponse] identifier[resp] , identifier[JsonGenerator] identifier[gen] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[gen] operator[SEP] identifier[writeStartObject] operator[SEP] oper... |
@Override
public Boolean convert(final String value) {
return Boolean.valueOf(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value);
} | class class_name[name] begin[{]
method[convert, return_type[type[Boolean]], modifier[public], parameter[value]] begin[{]
return[binary_operation[binary_operation[binary_operation[call[Boolean.valueOf, parameter[member[.value]]], ||, literal["1"]], ||, literal["on"]], ||, literal["yes"]]]
end[}]
END... | annotation[@] identifier[Override] Keyword[public] identifier[Boolean] identifier[convert] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[SEP] {
Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] operator[||] literal[Str... |
@Override
public Attributes getAttributes(String name) throws NamingException {
if (StringUtils.hasLength(name)) {
throw new NameNotFoundException();
}
return (Attributes) originalAttrs.clone();
} | class class_name[name] begin[{]
method[getAttributes, return_type[type[Attributes]], modifier[public], parameter[name]] begin[{]
if[call[StringUtils.hasLength, parameter[member[.name]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_argume... | annotation[@] identifier[Override] Keyword[public] identifier[Attributes] identifier[getAttributes] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[NamingException] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] ide... |
boolean isIntermediaryPath(final JsonPointer jp) {
List<String> jpRefTokens = jp.tokens();
int jpSize = jpRefTokens.size();
if (jpSize == 1) {
return false;
}
Node node = root;
for (int i = 1; i < jpSize; i++) {
Node childMatch = node.match(jpRefT... | class class_name[name] begin[{]
method[isIntermediaryPath, return_type[type[boolean]], modifier[default], parameter[jp]] begin[{]
local_variable[type[List], jpRefTokens]
local_variable[type[int], jpSize]
if[binary_operation[member[.jpSize], ==, literal[1]]] begin[{]
... | Keyword[boolean] identifier[isIntermediaryPath] operator[SEP] Keyword[final] identifier[JsonPointer] identifier[jp] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[jpRefTokens] operator[=] identifier[jp] operator[SEP] identifier[tokens] operator[SEP] operator[SEP] operator[... |
public ClassConfiguration<T> merge(ClassConfiguration<T> other) {
if (!targetClass.isAssignableFrom(other.targetClass)) {
throw new IllegalArgumentException(
"Cannot merge class configurations: " + targetClass.getName() + " is not assignable to " + other
... | class class_name[name] begin[{]
method[merge, return_type[type[ClassConfiguration]], modifier[public], parameter[other]] begin[{]
if[call[targetClass.isAssignableFrom, parameter[member[other.targetClass]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(o... | Keyword[public] identifier[ClassConfiguration] operator[<] identifier[T] operator[>] identifier[merge] operator[SEP] identifier[ClassConfiguration] operator[<] identifier[T] operator[>] identifier[other] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[targetClass] operator[SEP] identifier[isAssi... |
public String diff_text2(LinkedList<Diff> diffs) {
StringBuilder text = new StringBuilder();
for (Diff aDiff : diffs) {
if (aDiff.operation != Operation.DELETE) {
text.append(aDiff.text);
}
}
return text.toString();
} | class class_name[name] begin[{]
method[diff_text2, return_type[type[String]], modifier[public], parameter[diffs]] begin[{]
local_variable[type[StringBuilder], text]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ope... | Keyword[public] identifier[String] identifier[diff_text2] operator[SEP] identifier[LinkedList] operator[<] identifier[Diff] operator[>] identifier[diffs] operator[SEP] {
identifier[StringBuilder] identifier[text] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword... |
public ListFacetAttributesResult withAttributes(FacetAttribute... attributes) {
if (this.attributes == null) {
setAttributes(new java.util.ArrayList<FacetAttribute>(attributes.length));
}
for (FacetAttribute ele : attributes) {
this.attributes.add(ele);
}
... | class class_name[name] begin[{]
method[withAttributes, return_type[type[ListFacetAttributesResult]], modifier[public], parameter[attributes]] begin[{]
if[binary_operation[THIS[member[None.attributes]], ==, literal[null]]] begin[{]
call[.setAttributes, parameter[ClassCrea... | Keyword[public] identifier[ListFacetAttributesResult] identifier[withAttributes] operator[SEP] identifier[FacetAttribute] operator[...] identifier[attributes] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[attributes] operator[==] Other[null] operator[SEP] {
identifie... |
public void handleAckExpectedMessage(ControlAckExpected cMsg) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "handleAckExpectedMessage", new Object[] { cMsg });
int priority = cMsg.getPriority().intValue();
Reliability reliability... | class class_name[name] begin[{]
method[handleAckExpectedMessage, return_type[void], modifier[public], parameter[cMsg]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[... | Keyword[public] Keyword[void] identifier[handleAckExpectedMessage] operator[SEP] identifier[ControlAckExpected] identifier[cMsg] operator[SEP] Keyword[throws] identifier[SIResourceException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operato... |
public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException {
CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION);
getResourceType(resource).writePropertyObject(this, m_securityManager, resource, property);
} | class class_name[name] begin[{]
method[writePropertyObject, return_type[void], modifier[public], parameter[resourcename, property]] begin[{]
local_variable[type[CmsResource], resource]
call[.getResourceType, parameter[member[.resource]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[writePropertyObject] operator[SEP] identifier[String] identifier[resourcename] , identifier[CmsProperty] identifier[property] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsResource] identifier[resource] operator[=] identifier[readResource] operat... |
public static int nextPow2(int x) {
if (x < 1)
throw new IllegalArgumentException("x must be greater or equal 1");
if ((x & (x - 1)) == 0) {
if( x == 1 )
return 2;
return x; // x is already a power-of-two number
}
x |= (x >>> 1);
x |= (x >>> 2);
x |= (x >>> 4);
x |= (x >>> 8);
x |= (x >>> 1... | class class_name[name] begin[{]
method[nextPow2, return_type[type[int]], modifier[public static], parameter[x]] begin[{]
if[binary_operation[member[.x], <, literal[1]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, ... | Keyword[public] Keyword[static] Keyword[int] identifier[nextPow2] operator[SEP] Keyword[int] identifier[x] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[<] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operat... |
private boolean isExcluded(String name, String cmpname, String value) {
return exclude.contains(excludeKey(name, null, value)) || exclude.contains(excludeKey(name, cmpname, value));
} | class class_name[name] begin[{]
method[isExcluded, return_type[type[boolean]], modifier[private], parameter[name, cmpname, value]] begin[{]
return[binary_operation[call[exclude.contains, parameter[call[.excludeKey, parameter[member[.name], literal[null], member[.value]]]]], ||, call[exclude.contains, p... | Keyword[private] Keyword[boolean] identifier[isExcluded] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[cmpname] , identifier[String] identifier[value] operator[SEP] {
Keyword[return] identifier[exclude] operator[SEP] identifier[contains] operator[SEP] identifier[excludeKey] ... |
public Map<String, Object> getContext() {
final Map<String, Object> rval = newMap();
rval.putAll(context);
// replace "" with "@vocab"
if (rval.containsKey("")) {
rval.put("@vocab", rval.remove(""));
}
return rval;
} | class class_name[name] begin[{]
method[getContext, return_type[type[Map]], modifier[public], parameter[]] begin[{]
local_variable[type[Map], rval]
call[rval.putAll, parameter[member[.context]]]
if[call[rval.containsKey, parameter[literal[""]]]] begin[{]
... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getContext] operator[SEP] operator[SEP] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[rval] operator[=] identifier[newMap] operator[SEP] opera... |
public long getNumberOfQueuedMessages()
{
long count = 0;
try
{
count = itemStream.getStatistics().getTotalItemCount();
}
catch (MessageStoreException e)
{
FFDCFilter.processException(
e,
"com.ibm.ws.sib.processor.runtime.LocalQueuePoint.getNumberOfQueuedMessage... | class class_name[name] begin[{]
method[getNumberOfQueuedMessages, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[long], count]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], pref... | Keyword[public] Keyword[long] identifier[getNumberOfQueuedMessages] operator[SEP] operator[SEP] {
Keyword[long] identifier[count] operator[=] Other[0] operator[SEP] Keyword[try] {
identifier[count] operator[=] identifier[itemStream] operator[SEP] identifier[getStatistics] operator[SEP] operator[SEP] o... |
private void iniButtons() {
m_newButton = CmsToolBar.createButton(
FontOpenCms.WAND,
CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_ELEMENT_0));
m_newButton.addClickListener(new ClickListener() {
private static final long serialVersionUID = 1L;
... | class class_name[name] begin[{]
method[iniButtons, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.m_newButton], call[CmsToolBar.createButton, parameter[member[FontOpenCms.WAND], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_ADD_ELEM... | Keyword[private] Keyword[void] identifier[iniButtons] operator[SEP] operator[SEP] {
identifier[m_newButton] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[WAND] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMess... |
@FFDCIgnore(BAD_PARAM.class)
private boolean isEncodingForWASClassic(ClientRequestInfo ri) {
try {
int IBM_PV_TC_ID = 0x49424d0a;
ri.get_effective_component(IBM_PV_TC_ID);
return true;
} catch (BAD_PARAM bpe) {
// Expected if not talking to a WAS Class... | class class_name[name] begin[{]
method[isEncodingForWASClassic, return_type[type[boolean]], modifier[private], parameter[ri]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[... | annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[BAD_PARAM] operator[SEP] Keyword[class] operator[SEP] Keyword[private] Keyword[boolean] identifier[isEncodingForWASClassic] operator[SEP] identifier[ClientRequestInfo] identifier[ri] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[IB... |
protected String extractInternacionalizedMessage(ConstraintViolation<Object> v) {
return interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale.get());
} | class class_name[name] begin[{]
method[extractInternacionalizedMessage, return_type[type[String]], modifier[protected], parameter[v]] begin[{]
return[call[interpolator.interpolate, parameter[call[v.getMessageTemplate, parameter[]], ClassCreator(arguments=[MemberReference(member=v, postfix_operators=[],... | Keyword[protected] identifier[String] identifier[extractInternacionalizedMessage] operator[SEP] identifier[ConstraintViolation] operator[<] identifier[Object] operator[>] identifier[v] operator[SEP] {
Keyword[return] identifier[interpolator] operator[SEP] identifier[interpolate] operator[SEP] identifier[v] opera... |
public final ReadSession createReadSession(
TableReference tableReference, String parent, int requestedStreams) {
CreateReadSessionRequest request =
CreateReadSessionRequest.newBuilder()
.setTableReference(tableReference)
.setParent(parent)
.setRequestedStreams(req... | class class_name[name] begin[{]
method[createReadSession, return_type[type[ReadSession]], modifier[final public], parameter[tableReference, parent, requestedStreams]] begin[{]
local_variable[type[CreateReadSessionRequest], request]
return[call[.createReadSession, parameter[member[.request]]]]
... | Keyword[public] Keyword[final] identifier[ReadSession] identifier[createReadSession] operator[SEP] identifier[TableReference] identifier[tableReference] , identifier[String] identifier[parent] , Keyword[int] identifier[requestedStreams] operator[SEP] {
identifier[CreateReadSessionRequest] identifier[request] o... |
public static <T> T mode(Collection<T> values) {
Set<T> modes = modes(values);
return modes.iterator().next();
} | class class_name[name] begin[{]
method[mode, return_type[type[T]], modifier[public static], parameter[values]] begin[{]
local_variable[type[Set], modes]
return[call[modes.iterator, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[mode] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[values] operator[SEP] {
identifier[Set] operator[<] identifier[T] operator[>] identifier[modes] operator[=] identifier[modes] ... |
public static void checkNullArgument(Object obj, String variableName) {
if (null == obj) {
throw new NullPointerException(ExceptionMessageMap.getMessage("000003")
+ " { variableName=[" + variableName + "] }");
}
} | class class_name[name] begin[{]
method[checkNullArgument, return_type[void], modifier[public static], parameter[obj, variableName]] begin[{]
if[binary_operation[literal[null], ==, member[.obj]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Bina... | Keyword[public] Keyword[static] Keyword[void] identifier[checkNullArgument] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[variableName] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[obj] operator[SEP] {
Keyword[throw] Keyword[new] ide... |
public static void start() {
synchronized (lock) {
if (singleton != null) return;
ZkLeaderElection leaderElection = new ZkLeaderElection();
LeaderSelectorListener listener = new LeaderSelectorListenerAdapter() {
public void takeLeadership(CuratorFramework clie... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public static], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[member[.singleton], !=, literal[null]]] begin[{]
return[None]
else begin[{]
None
... | Keyword[public] Keyword[static] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] identifier[singleton] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[ZkLeaderEle... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.