code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private Map<String, Object> parseFacet(String facet) throws Exception {
Map<String, Object> outputMap = new HashMap<>();
if (facet.contains(AGGREGATION_IDENTIFIER)) {
// Validate function
for (String function : AGGREGATION_FUNCTIONS) {
if (facet.startsWith(functio... | class class_name[name] begin[{]
method[parseFacet, return_type[type[Map]], modifier[private], parameter[facet]] begin[{]
local_variable[type[Map], outputMap]
if[call[facet.contains, parameter[member[.AGGREGATION_IDENTIFIER]]]] begin[{]
ForStatement(body=BlockStatement(label=... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parseFacet] operator[SEP] identifier[String] identifier[facet] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identi... |
@Override
public boolean hasTileToRetrieve(int x, int y, int zoom) {
// Determine if the tile should be drawn
boolean drawTile = true;
for (GeoPackageOverlay geoPackageOverlay : linkedOverlays) {
if (geoPackageOverlay.hasTile(x, y, zoom)) {
drawTile = false;
... | class class_name[name] begin[{]
method[hasTileToRetrieve, return_type[type[boolean]], modifier[public], parameter[x, y, zoom]] begin[{]
local_variable[type[boolean], drawTile]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberRefere... | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasTileToRetrieve] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[zoom] operator[SEP] {
Keyword[boolean] identifier[drawTile] operator[=] literal[boolean] operator[SEP] Keyword[for] o... |
public void setColor(Color color) {
String hex = null;
Double opacity = null;
if (color != null) {
hex = color.getColorHexShorthand();
opacity = new Double(color.getOpacity());
}
setColor(hex);
setOpacity(opacity);
} | class class_name[name] begin[{]
method[setColor, return_type[void], modifier[public], parameter[color]] begin[{]
local_variable[type[String], hex]
local_variable[type[Double], opacity]
if[binary_operation[member[.color], !=, literal[null]]] begin[{]
assig... | Keyword[public] Keyword[void] identifier[setColor] operator[SEP] identifier[Color] identifier[color] operator[SEP] {
identifier[String] identifier[hex] operator[=] Other[null] operator[SEP] identifier[Double] identifier[opacity] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[color] op... |
public MethodDescriptor[] getMethodDescriptors() {
BeanInfo info = getBeanInfo();
if (info == null) {
return null;
}
MethodDescriptor[] mds = info.getMethodDescriptors();
getTeaToolsUtils().sortMethodDescriptors(mds);
return mds;
} | class class_name[name] begin[{]
method[getMethodDescriptors, return_type[type[MethodDescriptor]], modifier[public], parameter[]] begin[{]
local_variable[type[BeanInfo], info]
if[binary_operation[member[.info], ==, literal[null]]] begin[{]
return[literal[null]]
else b... | Keyword[public] identifier[MethodDescriptor] operator[SEP] operator[SEP] identifier[getMethodDescriptors] operator[SEP] operator[SEP] {
identifier[BeanInfo] identifier[info] operator[=] identifier[getBeanInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[info] operator[==] Other... |
public static <E extends AbstractCommand> void start(String[] args, Class<E> clazz) {
initEnv();
E command = ContextFactory.getBean(clazz);
command.start(args);
} | class class_name[name] begin[{]
method[start, return_type[void], modifier[public static], parameter[args, clazz]] begin[{]
call[.initEnv, parameter[]]
local_variable[type[E], command]
call[command.start, parameter[member[.args]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[AbstractCommand] operator[>] Keyword[void] identifier[start] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] , identifier[Class] operator[<] identifier[E] operator[>] identifier[clazz] operator[SEP] {
... |
public static String getSLLL(String[] soilParas) {
if (soilParas != null && soilParas.length >= 3) {
return divide(calcMoisture1500Kpa(soilParas[0], soilParas[1], soilParas[2]), "100", 3);
} else {
return null;
}
} | class class_name[name] begin[{]
method[getSLLL, return_type[type[String]], modifier[public static], parameter[soilParas]] begin[{]
if[binary_operation[binary_operation[member[.soilParas], !=, literal[null]], &&, binary_operation[member[soilParas.length], >=, literal[3]]]] begin[{]
r... | Keyword[public] Keyword[static] identifier[String] identifier[getSLLL] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[soilParas] operator[SEP] {
Keyword[if] operator[SEP] identifier[soilParas] operator[!=] Other[null] operator[&&] identifier[soilParas] operator[SEP] identifier[length] op... |
private void flattenNameRef(String alias, Node n, Node parent,
String originalName) {
Preconditions.checkArgument(
n.isGetProp(), "Expected GETPROP, found %s. Node: %s", n.getToken(), n);
// BEFORE:
// getprop
// getprop
// name a
// string b
// string c
... | class class_name[name] begin[{]
method[flattenNameRef, return_type[void], modifier[private], parameter[alias, n, parent, originalName]] begin[{]
call[Preconditions.checkArgument, parameter[call[n.isGetProp, parameter[]], literal["Expected GETPROP, found %s. Node: %s"], call[n.getToken, paramete... | Keyword[private] Keyword[void] identifier[flattenNameRef] operator[SEP] identifier[String] identifier[alias] , identifier[Node] identifier[n] , identifier[Node] identifier[parent] , identifier[String] identifier[originalName] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] op... |
public void marshall(DeleteFlowRequest deleteFlowRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteFlowRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteFlowRequest.getFlowArn... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[deleteFlowRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.deleteFlowRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(pos... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeleteFlowRequest] identifier[deleteFlowRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[deleteFlowRequest] operator[==] Other[null] operator[SEP] {
... |
@Override
public List<CommercePriceList> findAll() {
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findAll, return_type[type[List]], modifier[public], parameter[]] begin[{]
return[call[.findAll, parameter[member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommercePriceList] operator[>] identifier[findAll] operator[SEP] operator[SEP] {
Keyword[return] identifier[findAll] operator[SEP] identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[S... |
public static void hess(Matrix A, ExecutorService threadpool)
{
if(!A.isSquare())
throw new ArithmeticException("Only square matrices can be converted to Upper Hessenberg form");
int m = A.rows();
/**
* Space used to store the vector for updating the columns of A
... | class class_name[name] begin[{]
method[hess, return_type[void], modifier[public static], parameter[A, threadpool]] begin[{]
if[call[A.isSquare, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[... | Keyword[public] Keyword[static] Keyword[void] identifier[hess] operator[SEP] identifier[Matrix] identifier[A] , identifier[ExecutorService] identifier[threadpool] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[A] operator[SEP] identifier[isSquare] operator[SEP] operator[SEP] operator[SEP] Keyw... |
private void readStreamResult(InH3 hIn, HeadersAmp headers)
throws IOException
{
ServiceRefAmp serviceRef = readToAddress(hIn);
long id = hIn.readLong();
QueryRefAmp queryRef = serviceRef.getQueryRef(id);
if (queryRef != null) {
ClassLoader loader = queryRef.getClassLoader();
T... | class class_name[name] begin[{]
method[readStreamResult, return_type[void], modifier[private], parameter[hIn, headers]] begin[{]
local_variable[type[ServiceRefAmp], serviceRef]
local_variable[type[long], id]
local_variable[type[QueryRefAmp], queryRef]
if[binary_operation... | Keyword[private] Keyword[void] identifier[readStreamResult] operator[SEP] identifier[InH3] identifier[hIn] , identifier[HeadersAmp] identifier[headers] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ServiceRefAmp] identifier[serviceRef] operator[=] identifier[readToAddress] operator[SEP] ide... |
@Nullable
public static JsonReader enterPath(JsonReader reader, String path1, String path2)
throws IOException {
return enterPath(reader, path1) != null ? enterPath(reader, path2) : null;
} | class class_name[name] begin[{]
method[enterPath, return_type[type[JsonReader]], modifier[public static], parameter[reader, path1, path2]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operato... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[JsonReader] identifier[enterPath] operator[SEP] identifier[JsonReader] identifier[reader] , identifier[String] identifier[path1] , identifier[String] identifier[path2] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[r... |
public static boolean checkpointsMatch(
Collection<CompletedCheckpoint> first,
Collection<CompletedCheckpoint> second) {
if (first.size() != second.size()) {
return false;
}
List<Tuple2<Long, JobID>> firstInterestingFields = new ArrayList<>(first.size());
for (CompletedCheckpoint checkpoint : first) {
... | class class_name[name] begin[{]
method[checkpointsMatch, return_type[type[boolean]], modifier[public static], parameter[first, second]] begin[{]
if[binary_operation[call[first.size, parameter[]], !=, call[second.size, parameter[]]]] begin[{]
return[literal[false]]
else begin... | Keyword[public] Keyword[static] Keyword[boolean] identifier[checkpointsMatch] operator[SEP] identifier[Collection] operator[<] identifier[CompletedCheckpoint] operator[>] identifier[first] , identifier[Collection] operator[<] identifier[CompletedCheckpoint] operator[>] identifier[second] operator[SEP] {
Keyword... |
private void flush(final boolean propagate) throws IOException {
final int avail = baseNCodec.available(context);
if (avail > 0) {
final byte[] buf = new byte[avail];
final int c = baseNCodec.readResults(buf, 0, avail, context);
if (c > 0) {
out.write(... | class class_name[name] begin[{]
method[flush, return_type[void], modifier[private], parameter[propagate]] begin[{]
local_variable[type[int], avail]
if[binary_operation[member[.avail], >, literal[0]]] begin[{]
local_variable[type[byte], buf]
local_variable[type[in... | Keyword[private] Keyword[void] identifier[flush] operator[SEP] Keyword[final] Keyword[boolean] identifier[propagate] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[int] identifier[avail] operator[=] identifier[baseNCodec] operator[SEP] identifier[available] operator[SEP] identifie... |
public static void write(final HighScoringPair hsp, final PrintWriter writer) {
checkNotNull(hsp);
checkNotNull(writer);
writer.println(hsp.toString());
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public static], parameter[hsp, writer]] begin[{]
call[.checkNotNull, parameter[member[.hsp]]]
call[.checkNotNull, parameter[member[.writer]]]
call[writer.println, parameter[call[hsp.toStrin... | Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[HighScoringPair] identifier[hsp] , Keyword[final] identifier[PrintWriter] identifier[writer] operator[SEP] {
identifier[checkNotNull] operator[SEP] identifier[hsp] operator[SEP] operator[SEP] identifier[check... |
@Nullable
public static String unifyIBAN (@Nullable final String sIBAN)
{
if (sIBAN == null)
return null;
// to uppercase
String sRealIBAN = sIBAN.toUpperCase (Locale.US);
// kick all non-IBAN chars
sRealIBAN = RegExHelper.stringReplacePattern ("[^0-9A-Z]", sRealIBAN, "");
if (sRealI... | class class_name[name] begin[{]
method[unifyIBAN, return_type[type[String]], modifier[public static], parameter[sIBAN]] begin[{]
if[binary_operation[member[.sIBAN], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[String], ... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[unifyIBAN] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sIBAN] operator[SEP] {
Keyword[if] operator[SEP] identifier[sIBAN] operator[==] Other[null] operator[SEP] Keywo... |
public ItemRequest<Tag> delete(String tag) {
String path = String.format("/tags/%s", tag);
return new ItemRequest<Tag>(this, Tag.class, path, "DELETE");
} | class class_name[name] begin[{]
method[delete, return_type[type[ItemRequest]], modifier[public], parameter[tag]] begin[{]
local_variable[type[String], path]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_opera... | Keyword[public] identifier[ItemRequest] operator[<] identifier[Tag] operator[>] identifier[delete] operator[SEP] identifier[String] identifier[tag] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[tag] ... |
public OvhLegacyVrack serviceName_legacyVrack_legacyVrack_GET(String serviceName, String legacyVrack) throws IOException {
String qPath = "/vrack/{serviceName}/legacyVrack/{legacyVrack}";
StringBuilder sb = path(qPath, serviceName, legacyVrack);
String resp = exec(qPath, "GET", sb.toString(), null);
return conv... | class class_name[name] begin[{]
method[serviceName_legacyVrack_legacyVrack_GET, return_type[type[OvhLegacyVrack]], modifier[public], parameter[serviceName, legacyVrack]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[String], res... | Keyword[public] identifier[OvhLegacyVrack] identifier[serviceName_legacyVrack_legacyVrack_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[legacyVrack] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[St... |
public BlockInfo queryBlockByNumber(Collection<Peer> peers, long blockNumber) throws InvalidArgumentException, ProposalException {
return queryBlockByNumber(peers, blockNumber, client.getUserContext());
} | class class_name[name] begin[{]
method[queryBlockByNumber, return_type[type[BlockInfo]], modifier[public], parameter[peers, blockNumber]] begin[{]
return[call[.queryBlockByNumber, parameter[member[.peers], member[.blockNumber], call[client.getUserContext, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[BlockInfo] identifier[queryBlockByNumber] operator[SEP] identifier[Collection] operator[<] identifier[Peer] operator[>] identifier[peers] , Keyword[long] identifier[blockNumber] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] , identifier[ProposalException] {
Keywo... |
@Override
public T addAsLibrary(String resourceName, String target) throws IllegalArgumentException {
Validate.notNull(resourceName, "ResourceName must be specified");
Validate.notNull(target, "Target must be specified");
return addAsLibrary(resourceName, new BasicPath(target));
} | class class_name[name] begin[{]
method[addAsLibrary, return_type[type[T]], modifier[public], parameter[resourceName, target]] begin[{]
call[Validate.notNull, parameter[member[.resourceName], literal["ResourceName must be specified"]]]
call[Validate.notNull, parameter[member[.tar... | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[addAsLibrary] operator[SEP] identifier[String] identifier[resourceName] , identifier[String] identifier[target] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
identifier[Validate] operator[SEP] identifier[notNull] ... |
public static CPDefinitionLink fetchByCPD_T_Last(long CPDefinitionId,
String type, OrderByComparator<CPDefinitionLink> orderByComparator) {
return getPersistence()
.fetchByCPD_T_Last(CPDefinitionId, type, orderByComparator);
} | class class_name[name] begin[{]
method[fetchByCPD_T_Last, return_type[type[CPDefinitionLink]], modifier[public static], parameter[CPDefinitionId, type, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPDefinitionLink] identifier[fetchByCPD_T_Last] operator[SEP] Keyword[long] identifier[CPDefinitionId] , identifier[String] identifier[type] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionLink] operator[>] identifier[orderByComparator] operator[SEP] {
... |
public void deleteFile(String name) throws IOException {
if (!fs.delete(new Path(directory, name))) {
throw new IOException("Cannot delete index file " + name);
}
} | class class_name[name] begin[{]
method[deleteFile, return_type[void], modifier[public], parameter[name]] begin[{]
if[call[fs.delete, parameter[ClassCreator(arguments=[MemberReference(member=directory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n... | Keyword[public] Keyword[void] identifier[deleteFile] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[fs] operator[SEP] identifier[delete] operator[SEP] Keyword[new] identifier[Path] operator[SEP] identifier... |
private float getConstrainedDestinationScale(float scale) {
scale = Math.max(scale, mEffectiveMinScale);
scale = Math.min(scale, mMaxScale);
return scale;
} | class class_name[name] begin[{]
method[getConstrainedDestinationScale, return_type[type[float]], modifier[private], parameter[scale]] begin[{]
assign[member[.scale], call[Math.max, parameter[member[.scale], member[.mEffectiveMinScale]]]]
assign[member[.scale], call[Math.min, par... | Keyword[private] Keyword[float] identifier[getConstrainedDestinationScale] operator[SEP] Keyword[float] identifier[scale] operator[SEP] {
identifier[scale] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[scale] , identifier[mEffectiveMinScale] operator[SEP] operator[SEP] iden... |
public void setXUnitBase(Integer newXUnitBase) {
Integer oldXUnitBase = xUnitBase;
xUnitBase = newXUnitBase;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__XUNIT_BASE, oldXUnitBase, xUnitBase));
} | class class_name[name] begin[{]
method[setXUnitBase, return_type[void], modifier[public], parameter[newXUnitBase]] begin[{]
local_variable[type[Integer], oldXUnitBase]
assign[member[.xUnitBase], member[.newXUnitBase]]
if[call[.eNotificationRequired, parameter[]]] begin[{... | Keyword[public] Keyword[void] identifier[setXUnitBase] operator[SEP] identifier[Integer] identifier[newXUnitBase] operator[SEP] {
identifier[Integer] identifier[oldXUnitBase] operator[=] identifier[xUnitBase] operator[SEP] identifier[xUnitBase] operator[=] identifier[newXUnitBase] operator[SEP] Keyword[if] opera... |
private PHSCoverLetter12Document getPHSCoverLetter() {
PHSCoverLetter12Document phsCoverLetterDocument = PHSCoverLetter12Document.Factory
.newInstance();
PHSCoverLetter12 phsCoverLetter = PHSCoverLetter12.Factory
.newInstance();
CoverLetterFile coverLetterFile = CoverLetterFile.Factory.newInstance(... | class class_name[name] begin[{]
method[getPHSCoverLetter, return_type[type[PHSCoverLetter12Document]], modifier[private], parameter[]] begin[{]
local_variable[type[PHSCoverLetter12Document], phsCoverLetterDocument]
local_variable[type[PHSCoverLetter12], phsCoverLetter]
local_variable[ty... | Keyword[private] identifier[PHSCoverLetter12Document] identifier[getPHSCoverLetter] operator[SEP] operator[SEP] {
identifier[PHSCoverLetter12Document] identifier[phsCoverLetterDocument] operator[=] identifier[PHSCoverLetter12Document] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operat... |
public static String capitalize(String input) {
if (input == null) {
return null;
}
if (input.length() > 1) {
for (int i = 0; i < input.length(); i++) {
if (Character.isAlphabetic(input.charAt(i))) {
return input.substring(0, i) + Character.toString(input.charAt(i)).toUpperCase() + input.substrin... | class class_name[name] begin[{]
method[capitalize, return_type[type[String]], modifier[public static], parameter[input]] begin[{]
if[binary_operation[member[.input], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[binar... | Keyword[public] Keyword[static] identifier[String] identifier[capitalize] operator[SEP] identifier[String] identifier[input] operator[SEP] {
Keyword[if] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if] operat... |
public EnableMetricsCollectionRequest withMetrics(String... metrics) {
if (this.metrics == null) {
setMetrics(new com.amazonaws.internal.SdkInternalList<String>(metrics.length));
}
for (String ele : metrics) {
this.metrics.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withMetrics, return_type[type[EnableMetricsCollectionRequest]], modifier[public], parameter[metrics]] begin[{]
if[binary_operation[THIS[member[None.metrics]], ==, literal[null]]] begin[{]
call[.setMetrics, parameter[ClassCreator(arg... | Keyword[public] identifier[EnableMetricsCollectionRequest] identifier[withMetrics] operator[SEP] identifier[String] operator[...] identifier[metrics] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[metrics] operator[==] Other[null] operator[SEP] {
identifier[setMetrics... |
public void info( String msg, Throwable t )
{
if( m_delegate.isInfoEnabled() )
{
m_delegate.inform( msg, t );
}
} | class class_name[name] begin[{]
method[info, return_type[void], modifier[public], parameter[msg, t]] begin[{]
if[call[m_delegate.isInfoEnabled, parameter[]]] begin[{]
call[m_delegate.inform, parameter[member[.msg], member[.t]]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[info] operator[SEP] identifier[String] identifier[msg] , identifier[Throwable] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_delegate] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[m_deleg... |
private String getIssueFilePath(String issueComponent, Map<String, Component> components) {
Component comp = components.get(issueComponent);
String file = comp.path;
if (!Strings.isNullOrEmpty(comp.moduleKey)) {
String theKey = comp.moduleKey;
while (!theKey.isEmpty()) {
... | class class_name[name] begin[{]
method[getIssueFilePath, return_type[type[String]], modifier[private], parameter[issueComponent, components]] begin[{]
local_variable[type[Component], comp]
local_variable[type[String], file]
if[call[Strings.isNullOrEmpty, parameter[member[comp.mo... | Keyword[private] identifier[String] identifier[getIssueFilePath] operator[SEP] identifier[String] identifier[issueComponent] , identifier[Map] operator[<] identifier[String] , identifier[Component] operator[>] identifier[components] operator[SEP] {
identifier[Component] identifier[comp] operator[=] identifier[... |
private List<TestCaseDef> getFailureCases( FunctionInputDef inputDef, VarTupleSet failureTuples, VarTupleSet validTuples)
{
logger_.debug( "{}: Creating failure test cases", inputDef);
List<TestCaseDef> failureCases = new ArrayList<TestCaseDef>();
// For each failure input tuple not yet used in a ... | class class_name[name] begin[{]
method[getFailureCases, return_type[type[List]], modifier[private], parameter[inputDef, failureTuples, validTuples]] begin[{]
call[logger_.debug, parameter[literal["{}: Creating failure test cases"], member[.inputDef]]]
local_variable[type[List], failureC... | Keyword[private] identifier[List] operator[<] identifier[TestCaseDef] operator[>] identifier[getFailureCases] operator[SEP] identifier[FunctionInputDef] identifier[inputDef] , identifier[VarTupleSet] identifier[failureTuples] , identifier[VarTupleSet] identifier[validTuples] operator[SEP] {
identifier[logger_]... |
public void start() throws Exception {
bundleClassResolverHelper = new BundleClassResolverHelper(bundleContext);
bundleClassResolverHelper.setApplicationName(applicationName);
bundleClassResolverHelper.register();
} | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.bundleClassResolverHelper], ClassCreator(arguments=[MemberReference(member=bundleContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, con... | Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[bundleClassResolverHelper] operator[=] Keyword[new] identifier[BundleClassResolverHelper] operator[SEP] identifier[bundleContext] operator[SEP] operator[SEP] identifier[bundleClassResolv... |
private void registerChildInternal(IgnoreDomainResourceTypeResource child) {
child.setParent(this);
children.put(child.getName(), child);
} | class class_name[name] begin[{]
method[registerChildInternal, return_type[void], modifier[private], parameter[child]] begin[{]
call[child.setParent, parameter[THIS[]]]
call[children.put, parameter[call[child.getName, parameter[]], member[.child]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[registerChildInternal] operator[SEP] identifier[IgnoreDomainResourceTypeResource] identifier[child] operator[SEP] {
identifier[child] operator[SEP] identifier[setParent] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[children] operator[SEP] identifier... |
private Collection<String> createEnabledByQuery() {
Collection<String> query = new ArrayList<String>();
String temp = "";
//generate queries
temp = "wlpInformation.requireFeature=";
temp += getProvideFeature();
String version = findVersion();
if (version != null)... | class class_name[name] begin[{]
method[createEnabledByQuery, return_type[type[Collection]], modifier[private], parameter[]] begin[{]
local_variable[type[Collection], query]
local_variable[type[String], temp]
assign[member[.temp], literal["wlpInformation.requireFeature="]]
... | Keyword[private] identifier[Collection] operator[<] identifier[String] operator[>] identifier[createEnabledByQuery] operator[SEP] operator[SEP] {
identifier[Collection] operator[<] identifier[String] operator[>] identifier[query] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] opera... |
protected Object getValue( QueryContext context,
StaticOperand operand ) {
if (operand instanceof Literal) {
Literal literal = (Literal)operand;
return literal.value();
}
BindVariableName variable = (BindVariableName)operand;
return ... | class class_name[name] begin[{]
method[getValue, return_type[type[Object]], modifier[protected], parameter[context, operand]] begin[{]
if[binary_operation[member[.operand], instanceof, type[Literal]]] begin[{]
local_variable[type[Literal], literal]
return[call[literal.va... | Keyword[protected] identifier[Object] identifier[getValue] operator[SEP] identifier[QueryContext] identifier[context] , identifier[StaticOperand] identifier[operand] operator[SEP] {
Keyword[if] operator[SEP] identifier[operand] Keyword[instanceof] identifier[Literal] operator[SEP] {
identifier[Litera... |
@Override protected void initGraphics() {
super.initGraphics();
if (tile.isAutoScale()) tile.calcAutoScale();
minValue = tile.getMinValue();
range = tile.getRange();
angleStep = ANGLE_RANGE / range;
sectionsVisible = tile.getSec... | class class_name[name] begin[{]
method[initGraphics, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=initGraphics, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
if[call[tile.... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initGraphics] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[initGraphics] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tile] operator[SEP] identifier[isAutoScale] operator[SEP]... |
public double getUnnormalizedLogProbability(Assignment assignment) {
Preconditions.checkArgument(assignment.containsAll(variables.getVariableNumsArray()),
"Invalid assignment %s to factor graph on variables %s", assignment, variables);
double logProbability = 0.0;
for (Factor factor : factors) {
... | class class_name[name] begin[{]
method[getUnnormalizedLogProbability, return_type[type[double]], modifier[public], parameter[assignment]] begin[{]
call[Preconditions.checkArgument, parameter[call[assignment.containsAll, parameter[call[variables.getVariableNumsArray, parameter[]]]], literal["Inv... | Keyword[public] Keyword[double] identifier[getUnnormalizedLogProbability] operator[SEP] identifier[Assignment] identifier[assignment] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[assignment] operator[SEP] identifier[containsAll] operator[SEP] identifi... |
public static Object[] removeAt(Object[] array, int index) {
if (array == null) {
return null;
}
if (index < 0 || index >= array.length) {
return array;
}
Object[] retVal = (Object[]) Array.newInstance(array[0].getClass(), array.length - 1);
for (int i = 0; i < array.length... | class class_name[name] begin[{]
method[removeAt, return_type[type[Object]], modifier[public static], parameter[array, index]] begin[{]
if[binary_operation[member[.array], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
if[... | Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[removeAt] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[index] operator[SEP] {
Keyword[if] operator[SEP] identifier[array] operator[==] Other[null] operator[SEP] ... |
public Object processMessage(Object message)
{
Utility.getLogger().info("processMessage called in service message");
BaseMessage msgReplyInternal = null;
try {
BaseMessage messageIn = new TreeMessage(null, null);
new ServiceTrxMessageIn(messageIn, message);
... | class class_name[name] begin[{]
method[processMessage, return_type[type[Object]], modifier[public], parameter[message]] begin[{]
call[Utility.getLogger, parameter[]]
local_variable[type[BaseMessage], msgReplyInternal]
TryStatement(block=[LocalVariableDeclaration(annotations=[], ... | Keyword[public] identifier[Object] identifier[processMessage] operator[SEP] identifier[Object] identifier[message] operator[SEP] {
identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifie... |
public static int open(Shell parentShell) {
final SubmitEclipseLogWizard wizard = new SubmitEclipseLogWizard();
final WizardDialog dialog = new WizardDialog(parentShell, wizard);
wizard.setWizardDialog(dialog);
return dialog.open();
} | class class_name[name] begin[{]
method[open, return_type[type[int]], modifier[public static], parameter[parentShell]] begin[{]
local_variable[type[SubmitEclipseLogWizard], wizard]
local_variable[type[WizardDialog], dialog]
call[wizard.setWizardDialog, parameter[member[.dialog]]]... | Keyword[public] Keyword[static] Keyword[int] identifier[open] operator[SEP] identifier[Shell] identifier[parentShell] operator[SEP] {
Keyword[final] identifier[SubmitEclipseLogWizard] identifier[wizard] operator[=] Keyword[new] identifier[SubmitEclipseLogWizard] operator[SEP] operator[SEP] operator[SEP] Keyword[... |
private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new GridBagLayout());
JLabel question = new JLabel(Constant.messages.getString("database.newsession.question"));
jPanel.add(question, LayoutHelper.getGBC(0, 0, 2, 1.0D, new Insets(4, 4, 4, 4)));
jPan... | class class_name[name] begin[{]
method[getJPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.jPanel], ==, literal[null]]] begin[{]
assign[member[.jPanel], ClassCreator(arguments=[], body=None, constructor_type_argument... | Keyword[private] identifier[JPanel] identifier[getJPanel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[jPanel] operator[==] Other[null] operator[SEP] {
identifier[jPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[jPanel] oper... |
public void incrCounter(Enum<?> key, long incr) {
PigStatusReporter reporter = PigStatusReporter.getInstance();
if (reporter != null && reporter.getCounter(key) != null) {
HadoopCompat.incrementCounter(reporter.getCounter(key), incr);
if (counterEnumMap_.size() > 0) {
for (Map.Entry<Enum<?>,... | class class_name[name] begin[{]
method[incrCounter, return_type[void], modifier[public], parameter[key, incr]] begin[{]
local_variable[type[PigStatusReporter], reporter]
if[binary_operation[binary_operation[member[.reporter], !=, literal[null]], &&, binary_operation[call[reporter.getCou... | Keyword[public] Keyword[void] identifier[incrCounter] operator[SEP] identifier[Enum] operator[<] operator[?] operator[>] identifier[key] , Keyword[long] identifier[incr] operator[SEP] {
identifier[PigStatusReporter] identifier[reporter] operator[=] identifier[PigStatusReporter] operator[SEP] identifier[getInsta... |
protected XAbstractFeatureCall createSarlCapacityExtensionProvider(JvmIdentifiableElement thisFeature, JvmField field) {
// For capacity call redirection
if (thisFeature instanceof JvmDeclaredType) {
final JvmAnnotationReference capacityAnnotation = this.annotationLookup.findAnnotation(field,
ImportedCapaci... | class class_name[name] begin[{]
method[createSarlCapacityExtensionProvider, return_type[type[XAbstractFeatureCall]], modifier[protected], parameter[thisFeature, field]] begin[{]
if[binary_operation[member[.thisFeature], instanceof, type[JvmDeclaredType]]] begin[{]
local_variable[typ... | Keyword[protected] identifier[XAbstractFeatureCall] identifier[createSarlCapacityExtensionProvider] operator[SEP] identifier[JvmIdentifiableElement] identifier[thisFeature] , identifier[JvmField] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] identifier[thisFeature] Keyword[instanceof] identifier[J... |
public static StringBuilder replace(StringBuilder sb, String[][] mxStrings)
{
for (int x = 0; x < mxStrings.length; x++)
{
if (mxStrings[x].length != 2)
return sb;
sb = Utility.replace(sb, mxStrings[x][0], mxStrings[x][1]);
}
return sb;
} | class class_name[name] begin[{]
method[replace, return_type[type[StringBuilder]], modifier[public static], parameter[sb, mxStrings]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mxStrings, postfix_operators=[], p... | Keyword[public] Keyword[static] identifier[StringBuilder] identifier[replace] operator[SEP] identifier[StringBuilder] identifier[sb] , identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mxStrings] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=... |
@Setup(Level.Trial)
public void setupFeatureManager() {
FeatureManager featureManager = new FeatureManagerBuilder()
.featureEnums(OverheadFeature.class)
.stateRepository(new InMemoryStateRepository())
.userProvider(new NoOpUserProvider())
.buil... | class class_name[name] begin[{]
method[setupFeatureManager, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[FeatureManager], featureManager]
assign[member[.manager], member[.featureManager]]
call[StaticFeatureManagerProvider.setFeatureManag... | annotation[@] identifier[Setup] operator[SEP] identifier[Level] operator[SEP] identifier[Trial] operator[SEP] Keyword[public] Keyword[void] identifier[setupFeatureManager] operator[SEP] operator[SEP] {
identifier[FeatureManager] identifier[featureManager] operator[=] Keyword[new] identifier[FeatureManagerBuilder... |
public static <T extends Comparable<? super T>> Collector<T, ?, Seq<T>> maxAll() {
return maxAllBy(t -> t, naturalOrder());
} | class class_name[name] begin[{]
method[maxAll, return_type[type[Collector]], modifier[public static], parameter[]] begin[{]
return[call[.maxAllBy, parameter[LambdaExpression(body=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), parameters=[MemberReference(... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Seq] operator[<] identifier[T] operator[>] operator[>] identifier[ma... |
public PaginatedParallelScanList<T> parallelScan(DynamoDBScanExpression scanExpression, int totalSegments) {
return mapper.<T>parallelScan(model.targetType(), scanExpression, totalSegments);
} | class class_name[name] begin[{]
method[parallelScan, return_type[type[PaginatedParallelScanList]], modifier[public], parameter[scanExpression, totalSegments]] begin[{]
return[call[.mapper, parameter[call[model.targetType, parameter[]], member[.scanExpression], member[.totalSegments]]]]
end[}]
END[}... | Keyword[public] identifier[PaginatedParallelScanList] operator[<] identifier[T] operator[>] identifier[parallelScan] operator[SEP] identifier[DynamoDBScanExpression] identifier[scanExpression] , Keyword[int] identifier[totalSegments] operator[SEP] {
Keyword[return] identifier[mapper] operator[SEP] operator[<] i... |
public static Date strToDateWithFormat(String strDate, Format format) {
SimpleDateFormat localFormat = (SimpleDateFormat) format;
ParsePosition pos = new ParsePosition(0);
Date strtodate = localFormat.parse(strDate, pos);
return strtodate;
} | class class_name[name] begin[{]
method[strToDateWithFormat, return_type[type[Date]], modifier[public static], parameter[strDate, format]] begin[{]
local_variable[type[SimpleDateFormat], localFormat]
local_variable[type[ParsePosition], pos]
local_variable[type[Date], strtodate]
r... | Keyword[public] Keyword[static] identifier[Date] identifier[strToDateWithFormat] operator[SEP] identifier[String] identifier[strDate] , identifier[Format] identifier[format] operator[SEP] {
identifier[SimpleDateFormat] identifier[localFormat] operator[=] operator[SEP] identifier[SimpleDateFormat] operator[SEP] ... |
public static Schema partitionFieldSchema(FieldPartitioner<?, ?> fp, Schema schema) {
if (fp instanceof IdentityFieldPartitioner) {
// copy the schema directly from the entity to preserve annotations
return fieldSchema(schema, fp.getSourceName());
} else {
Class<?> fieldType = getPartitionType... | class class_name[name] begin[{]
method[partitionFieldSchema, return_type[type[Schema]], modifier[public static], parameter[fp, schema]] begin[{]
if[binary_operation[member[.fp], instanceof, type[IdentityFieldPartitioner]]] begin[{]
return[call[.fieldSchema, parameter[member[.schema]... | Keyword[public] Keyword[static] identifier[Schema] identifier[partitionFieldSchema] operator[SEP] identifier[FieldPartitioner] operator[<] operator[?] , operator[?] operator[>] identifier[fp] , identifier[Schema] identifier[schema] operator[SEP] {
Keyword[if] operator[SEP] identifier[fp] Keyword[instanceof] id... |
@Override
public void serializeInByteBufferObject(UUID object, ByteBuffer buffer, Object... hints) {
buffer.putLong(object.getMostSignificantBits());
buffer.putLong(object.getLeastSignificantBits());
} | class class_name[name] begin[{]
method[serializeInByteBufferObject, return_type[void], modifier[public], parameter[object, buffer, hints]] begin[{]
call[buffer.putLong, parameter[call[object.getMostSignificantBits, parameter[]]]]
call[buffer.putLong, parameter[call[object.getLea... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[serializeInByteBufferObject] operator[SEP] identifier[UUID] identifier[object] , identifier[ByteBuffer] identifier[buffer] , identifier[Object] operator[...] identifier[hints] operator[SEP] {
identifier[buffer] operator[SEP] identifier... |
@Pure
public boolean isFrom(UUID entityId) {
final Address iSource = getSource();
return (entityId != null) && (iSource != null)
&& entityId.equals(iSource.getUUID());
} | class class_name[name] begin[{]
method[isFrom, return_type[type[boolean]], modifier[public], parameter[entityId]] begin[{]
local_variable[type[Address], iSource]
return[binary_operation[binary_operation[binary_operation[member[.entityId], !=, literal[null]], &&, binary_operation[member[.iSource... | annotation[@] identifier[Pure] Keyword[public] Keyword[boolean] identifier[isFrom] operator[SEP] identifier[UUID] identifier[entityId] operator[SEP] {
Keyword[final] identifier[Address] identifier[iSource] operator[=] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] i... |
public ElasticsearchDomainStatus withAdvancedOptions(java.util.Map<String, String> advancedOptions) {
setAdvancedOptions(advancedOptions);
return this;
} | class class_name[name] begin[{]
method[withAdvancedOptions, return_type[type[ElasticsearchDomainStatus]], modifier[public], parameter[advancedOptions]] begin[{]
call[.setAdvancedOptions, parameter[member[.advancedOptions]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[ElasticsearchDomainStatus] identifier[withAdvancedOptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[advancedOptions] operator[SEP] {
identifier[setAdvancedOpti... |
private void fetchByTitle(Title pTitle, boolean useExactTitle)
throws WikiApiException
{
String searchString = pTitle.getPlainTitle();
if (!useExactTitle) {
searchString = pTitle.getWikiStyleTitle();
}
Session session;
session = this.wiki.__getHibernateSession();
session.beginTransaction();
Inte... | class class_name[name] begin[{]
method[fetchByTitle, return_type[void], modifier[private], parameter[pTitle, useExactTitle]] begin[{]
local_variable[type[String], searchString]
if[member[.useExactTitle]] begin[{]
assign[member[.searchString], call[pTitle.getWikiS... | Keyword[private] Keyword[void] identifier[fetchByTitle] operator[SEP] identifier[Title] identifier[pTitle] , Keyword[boolean] identifier[useExactTitle] operator[SEP] Keyword[throws] identifier[WikiApiException] {
identifier[String] identifier[searchString] operator[=] identifier[pTitle] operator[SEP] identifier... |
private Map<String, String> buildPayParams(PayRequest request, TradeType tradeType) {
Map<String, String> payParams = new TreeMap<>();
// 配置参数
buildConfigParams(payParams);
// 业务必需参数
put(payParams, WepayField.BODY, request.getBody());
put(payParams, WepayField.OUT_TRADE... | class class_name[name] begin[{]
method[buildPayParams, return_type[type[Map]], modifier[private], parameter[request, tradeType]] begin[{]
local_variable[type[Map], payParams]
call[.buildConfigParams, parameter[member[.payParams]]]
call[.put, parameter[member[.payParams],... | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[buildPayParams] operator[SEP] identifier[PayRequest] identifier[request] , identifier[TradeType] identifier[tradeType] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[String]... |
private static Direction direction(Point2d centerXy, Point2d substituentXy, Point2d horizontalXy, boolean haworth) {
double deltaX = substituentXy.x - centerXy.x;
double deltaY = substituentXy.y - centerXy.y;
// normalise vector length so threshold is independent of length
double mag =... | class class_name[name] begin[{]
method[direction, return_type[type[Direction]], modifier[private static], parameter[centerXy, substituentXy, horizontalXy, haworth]] begin[{]
local_variable[type[double], deltaX]
local_variable[type[double], deltaY]
local_variable[type[double], mag]
... | Keyword[private] Keyword[static] identifier[Direction] identifier[direction] operator[SEP] identifier[Point2d] identifier[centerXy] , identifier[Point2d] identifier[substituentXy] , identifier[Point2d] identifier[horizontalXy] , Keyword[boolean] identifier[haworth] operator[SEP] {
Keyword[double] identifier[d... |
public Boolean waitForResponse() {
if (responseReceived != null) {
return responseReceived;
}
synchronized (lock) {
try {
lock.wait(RESPONSE_WAIT_TIME);
} catch (InterruptedException e) {
log.warn("Interrupted waiting for synch... | class class_name[name] begin[{]
method[waitForResponse, return_type[type[Boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.responseReceived], !=, literal[null]]] begin[{]
return[member[.responseReceived]]
else begin[{]
None
end[}]
... | Keyword[public] identifier[Boolean] identifier[waitForResponse] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[responseReceived] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[responseReceived] operator[SEP]
}
Keyword[synchronized] operator[SEP] i... |
public void setGoalRevenue(Double goalRevenue){
if (goalRevenue != null && getGoalId() == null){
throw new IllegalStateException("GoalId must be set before GoalRevenue can be set.");
}
setParameter(GOAL_REVENUE, goalRevenue);
} | class class_name[name] begin[{]
method[setGoalRevenue, return_type[void], modifier[public], parameter[goalRevenue]] begin[{]
if[binary_operation[binary_operation[member[.goalRevenue], !=, literal[null]], &&, binary_operation[call[.getGoalId, parameter[]], ==, literal[null]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setGoalRevenue] operator[SEP] identifier[Double] identifier[goalRevenue] operator[SEP] {
Keyword[if] operator[SEP] identifier[goalRevenue] operator[!=] Other[null] operator[&&] identifier[getGoalId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] {
... |
public static boolean isDebuggable() {
boolean debuggable = false;
Context ctx = QuickUtils.getContext();
try {
PackageInfo pinfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), PackageManager.GET_SIGNATURES);
Signature signatures[] = pinfo.signatures;
... | class class_name[name] begin[{]
method[isDebuggable, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
local_variable[type[boolean], debuggable]
local_variable[type[Context], ctx]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Variable... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isDebuggable] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[debuggable] operator[=] literal[boolean] operator[SEP] identifier[Context] identifier[ctx] operator[=] identifier[QuickUtils] operator[SEP] identifier[getContext] operator[SEP] oper... |
public static I_CmsSearchConfigurationPagination create(
String pageParam,
List<Integer> pageSizes,
Integer pageNavLength) {
return (pageParam != null) || (pageSizes != null) || (pageNavLength != null)
? new CmsSearchConfigurationPagination(pageParam, pageSizes, pageNavLength)
... | class class_name[name] begin[{]
method[create, return_type[type[I_CmsSearchConfigurationPagination]], modifier[public static], parameter[pageParam, pageSizes, pageNavLength]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberRef... | Keyword[public] Keyword[static] identifier[I_CmsSearchConfigurationPagination] identifier[create] operator[SEP] identifier[String] identifier[pageParam] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[pageSizes] , identifier[Integer] identifier[pageNavLength] operator[SEP] {
Keyword[r... |
public void onSelectFilterFunction() {
int selectedIdx = view.getSelectedFunctionIndex();
if (selectedIdx >= 0) {
CoreFunctionFilter coreFilter = getCoreFilter();
CoreFunctionType functionType = getAvailableFunctions(coreFilter).get(selectedIdx);
ColumnType columnTyp... | class class_name[name] begin[{]
method[onSelectFilterFunction, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[int], selectedIdx]
if[binary_operation[member[.selectedIdx], >=, literal[0]]] begin[{]
local_variable[type[CoreFunctionFilter], coreF... | Keyword[public] Keyword[void] identifier[onSelectFilterFunction] operator[SEP] operator[SEP] {
Keyword[int] identifier[selectedIdx] operator[=] identifier[view] operator[SEP] identifier[getSelectedFunctionIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[selectedIdx] operator[... |
public static <T> List<Number> findIndexValues(Iterator<T> self, Number startIndex, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
List<Number> result = new ArrayList<Number>();
long count = 0;
long startCount = startIndex.longValue();
BooleanClosureWrapper bcw = ... | class class_name[name] begin[{]
method[findIndexValues, return_type[type[List]], modifier[public static], parameter[self, startIndex, condition]] begin[{]
local_variable[type[List], result]
local_variable[type[long], count]
local_variable[type[long], startCount]
local_variable[t... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Number] operator[>] identifier[findIndexValues] operator[SEP] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[self] , identifier[Number] identifier[startIndex] , annotation[@] identifier... |
public void execute(@Param("pipelineId") Long pipelineId, Context context, Navigator nav) throws Exception {
Channel channel = channelService.findByPipelineId(pipelineId);
if (channel.getStatus().isStart()) {
nav.redirectTo(WebConstant.ERROR_FORBIDDEN_Link);
return;
}
... | class class_name[name] begin[{]
method[execute, return_type[void], modifier[public], parameter[pipelineId, context, nav]] begin[{]
local_variable[type[Channel], channel]
if[call[channel.getStatus, parameter[]]] begin[{]
call[nav.redirectTo, parameter[member[WebCo... | Keyword[public] Keyword[void] identifier[execute] operator[SEP] annotation[@] identifier[Param] operator[SEP] literal[String] operator[SEP] identifier[Long] identifier[pipelineId] , identifier[Context] identifier[context] , identifier[Navigator] identifier[nav] operator[SEP] Keyword[throws] identifier[Exception] {
... |
public OrientVertex addVertex(Object id, final Object... prop) {
makeActive();
String className = null;
String clusterName = null;
Object[] fields = null;
if (id != null) {
if (id instanceof String) {
// PARSE ARGUMENTS
final String[] args = ((String) id).split(",");
... | class class_name[name] begin[{]
method[addVertex, return_type[type[OrientVertex]], modifier[public], parameter[id, prop]] begin[{]
call[.makeActive, parameter[]]
local_variable[type[String], className]
local_variable[type[String], clusterName]
local_variable[type[Object]... | Keyword[public] identifier[OrientVertex] identifier[addVertex] operator[SEP] identifier[Object] identifier[id] , Keyword[final] identifier[Object] operator[...] identifier[prop] operator[SEP] {
identifier[makeActive] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] ... |
public final void setStartEndPoints(final Point3D start, final Point3D end) {
final Point3D direction = start.subtract(end);
final Point3D position = start.midpoint(end);
setLength(direction.magnitude());
final Point3D axis = UP.crossProduct(direction.normalize());
super.setVisib... | class class_name[name] begin[{]
method[setStartEndPoints, return_type[void], modifier[final public], parameter[start, end]] begin[{]
local_variable[type[Point3D], direction]
local_variable[type[Point3D], position]
call[.setLength, parameter[call[direction.magnitude, parameter[]]... | Keyword[public] Keyword[final] Keyword[void] identifier[setStartEndPoints] operator[SEP] Keyword[final] identifier[Point3D] identifier[start] , Keyword[final] identifier[Point3D] identifier[end] operator[SEP] {
Keyword[final] identifier[Point3D] identifier[direction] operator[=] identifier[start] operator[SEP] ... |
LinkedEntry<K, V> createEntry(K pKey, V pValue) {
return new LinkedEntry<K, V>(pKey, pValue, null);
} | class class_name[name] begin[{]
method[createEntry, return_type[type[LinkedEntry]], modifier[default], parameter[pKey, pValue]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pValue, postf... | identifier[LinkedEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[createEntry] operator[SEP] identifier[K] identifier[pKey] , identifier[V] identifier[pValue] operator[SEP] {
Keyword[return] Keyword[new] identifier[LinkedEntry] operator[<] identifier[K] , identifier[V] operator[>] opera... |
public static <T extends Executable> T getExecutable(List<T> executables, String name, Class<?>... parameterTypes) {
for (T info : executables) {
if (name == null || info.getName().equals(name)) {
Class<?>[] types = info.getParameterTypes();
if (parameterTypes.length ... | class class_name[name] begin[{]
method[getExecutable, return_type[type[T]], modifier[public static], parameter[executables, name, parameterTypes]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(me... | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Executable] operator[>] identifier[T] identifier[getExecutable] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[executables] , identifier[String] identifier[name] , identifier[Class] operator[<] opera... |
public void setCommerceDiscountUserSegmentRelService(
com.liferay.commerce.discount.service.CommerceDiscountUserSegmentRelService commerceDiscountUserSegmentRelService) {
this.commerceDiscountUserSegmentRelService = commerceDiscountUserSegmentRelService;
} | class class_name[name] begin[{]
method[setCommerceDiscountUserSegmentRelService, return_type[void], modifier[public], parameter[commerceDiscountUserSegmentRelService]] begin[{]
assign[THIS[member[None.commerceDiscountUserSegmentRelService]], member[.commerceDiscountUserSegmentRelService]]
e... | Keyword[public] Keyword[void] identifier[setCommerceDiscountUserSegmentRelService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[discount] operator[SEP] identifier[service] operator[SEP] identifier[CommerceDiscountUserSegmentRelService] ident... |
public void depthFirstSearch(Vertex<T> v, final Visitor<T> visitor)
{
VisitorEX<T, RuntimeException> wrapper = new VisitorEX<T, RuntimeException>()
{
public void visit(Graph<T> g, Vertex<T> v) throws RuntimeException
{
if (visitor != null)
visitor.visit(g, v);... | class class_name[name] begin[{]
method[depthFirstSearch, return_type[void], modifier[public], parameter[v, visitor]] begin[{]
local_variable[type[VisitorEX], wrapper]
THIS[call[None.depthFirstSearch, parameter[member[.v], member[.wrapper]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[depthFirstSearch] operator[SEP] identifier[Vertex] operator[<] identifier[T] operator[>] identifier[v] , Keyword[final] identifier[Visitor] operator[<] identifier[T] operator[>] identifier[visitor] operator[SEP] {
identifier[VisitorEX] operator[<] identifier[T] , identi... |
public void setRefEdge(Integer newRefEdge) {
Integer oldRefEdge = refEdge;
refEdge = newRefEdge;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FINISHING_OPERATION__REF_EDGE, oldRefEdge, refEdge));
} | class class_name[name] begin[{]
method[setRefEdge, return_type[void], modifier[public], parameter[newRefEdge]] begin[{]
local_variable[type[Integer], oldRefEdge]
assign[member[.refEdge], member[.newRefEdge]]
if[call[.eNotificationRequired, parameter[]]] begin[{]
... | Keyword[public] Keyword[void] identifier[setRefEdge] operator[SEP] identifier[Integer] identifier[newRefEdge] operator[SEP] {
identifier[Integer] identifier[oldRefEdge] operator[=] identifier[refEdge] operator[SEP] identifier[refEdge] operator[=] identifier[newRefEdge] operator[SEP] Keyword[if] operator[SEP] ide... |
public List<Block.Instance> getBlockInstancesForWitness(Witness w) {
return witnessToBlockInstances.computeIfAbsent(w, v -> Collections.emptyList());
} | class class_name[name] begin[{]
method[getBlockInstancesForWitness, return_type[type[List]], modifier[public], parameter[w]] begin[{]
return[call[witnessToBlockInstances.computeIfAbsent, parameter[member[.w], LambdaExpression(body=MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], p... | Keyword[public] identifier[List] operator[<] identifier[Block] operator[SEP] identifier[Instance] operator[>] identifier[getBlockInstancesForWitness] operator[SEP] identifier[Witness] identifier[w] operator[SEP] {
Keyword[return] identifier[witnessToBlockInstances] operator[SEP] identifier[computeIfAbsent] opera... |
public ServiceFuture<LogAnalyticsOperationResultInner> beginExportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters, final ServiceCallback<LogAnalyticsOperationResultInner> serviceCallback) {
return ServiceFuture.fromResponse(beginExportRequestRateByIntervalWithServiceResponseAsy... | class class_name[name] begin[{]
method[beginExportRequestRateByIntervalAsync, return_type[type[ServiceFuture]], modifier[public], parameter[location, parameters, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.beginExportRequestRateByIntervalWithServiceResponseAsync, ... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[LogAnalyticsOperationResultInner] operator[>] identifier[beginExportRequestRateByIntervalAsync] operator[SEP] identifier[String] identifier[location] , identifier[RequestRateByIntervalInput] identifier[parameters] , Keyword[final] identifier[ServiceCall... |
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/transportation/2.0", name = "Railway", substitutionHeadNamespace = "http://www.opengis.net/citygml/transportation/2.0", substitutionHeadName = "TransportationComplex")
public JAXBElement<RailwayType> createRailway(RailwayType value) {
return new JA... | class class_name[name] begin[{]
method[createRailway, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Railway_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators... | 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 void updateCharacterStream(int columnIndex, Reader reader, int length)
throws SQLException {
updateCharacterStream(columnIndex, reader, (long) length);
} | class class_name[name] begin[{]
method[updateCharacterStream, return_type[void], modifier[public], parameter[columnIndex, reader, length]] begin[{]
call[.updateCharacterStream, parameter[member[.columnIndex], member[.reader], Cast(expression=MemberReference(member=length, postfix_operators=[], ... | Keyword[public] Keyword[void] identifier[updateCharacterStream] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[Reader] identifier[reader] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[updateCharacterStream] operator[SEP] identifier[column... |
protected String getLockErrorTitle(CmsLockInfo lockInfo) {
switch (lockInfo.getState()) {
case changed:
return Messages.get().key(Messages.ERR_LOCK_TITLE_RESOURCE_CHANGED_0);
case locked:
return Messages.get().key(Messages.ERR_LOCK_TITLE_RESOURCE_LOCKED_0... | class class_name[name] begin[{]
method[getLockErrorTitle, return_type[type[String]], modifier[protected], parameter[lockInfo]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['changed'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], pr... | Keyword[protected] identifier[String] identifier[getLockErrorTitle] operator[SEP] identifier[CmsLockInfo] identifier[lockInfo] operator[SEP] {
Keyword[switch] operator[SEP] identifier[lockInfo] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[chan... |
public List<HealthDependencyPresenter> getDependencies() {
List<HealthDependencyPresenter> dependencies = Lists.newArrayList();
if (dto.getDependencies().isPresent()) {
for (HealthDependencyDto dependencyDto : dto.getDependencies().get()) {
dependencies.add(new HealthDependencyPresenter(dependency... | class class_name[name] begin[{]
method[getDependencies, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], dependencies]
if[call[dto.getDependencies, parameter[]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[Stat... | Keyword[public] identifier[List] operator[<] identifier[HealthDependencyPresenter] operator[>] identifier[getDependencies] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[HealthDependencyPresenter] operator[>] identifier[dependencies] operator[=] identifier[Lists] operator[SEP] identifier[n... |
public ModbusRequest buildReturnQueryData(int serverAddress, int queryData) throws ModbusNumberException {
return buildDiagnostics(DiagnosticsSubFunctionCode.RETURN_QUERY_DATA, serverAddress, queryData);
} | class class_name[name] begin[{]
method[buildReturnQueryData, return_type[type[ModbusRequest]], modifier[public], parameter[serverAddress, queryData]] begin[{]
return[call[.buildDiagnostics, parameter[member[DiagnosticsSubFunctionCode.RETURN_QUERY_DATA], member[.serverAddress], member[.queryData]]]]
... | Keyword[public] identifier[ModbusRequest] identifier[buildReturnQueryData] operator[SEP] Keyword[int] identifier[serverAddress] , Keyword[int] identifier[queryData] operator[SEP] Keyword[throws] identifier[ModbusNumberException] {
Keyword[return] identifier[buildDiagnostics] operator[SEP] identifier[Diagnostics... |
public static byte[] getOverride() {
String overrideMac = System.getProperty(OVERRIDE_MAC_PROP);
byte[] macBytes = null;
if (overrideMac != null) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
String[] rawBytes = overrideMac.split(":");
if (rawByte... | class class_name[name] begin[{]
method[getOverride, return_type[type[byte]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], overrideMac]
local_variable[type[byte], macBytes]
if[binary_operation[member[.overrideMac], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getOverride] operator[SEP] operator[SEP] {
identifier[String] identifier[overrideMac] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[OVERRIDE_MAC_PROP] operator[SEP] operator[SEP] K... |
private static Map<String, Object> readAndEnrichFragment(PlatformMode platformMode, ResourceVersioning apiVersions,
File file, String appName) throws IOException {
Pattern pattern = Pattern.compile(FILENAME_PATTERN, Pattern.CASE_INSENSITIVE);
... | class class_name[name] begin[{]
method[readAndEnrichFragment, return_type[type[Map]], modifier[private static], parameter[platformMode, apiVersions, file, appName]] begin[{]
local_variable[type[Pattern], pattern]
local_variable[type[Matcher], matcher]
if[call[matcher.matches, pa... | Keyword[private] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[readAndEnrichFragment] operator[SEP] identifier[PlatformMode] identifier[platformMode] , identifier[ResourceVersioning] identifier[apiVersions] , identifier[File] identifier[file] , identifier... |
public static <T, ID> int dropTable(Dao<T, ID> dao, boolean ignoreErrors) throws SQLException {
ConnectionSource connectionSource = dao.getConnectionSource();
Class<T> dataClass = dao.getDataClass();
DatabaseType databaseType = connectionSource.getDatabaseType();
if (dao instanceof BaseDaoImpl<?, ?>) {
retur... | class class_name[name] begin[{]
method[dropTable, return_type[type[int]], modifier[public static], parameter[dao, ignoreErrors]] begin[{]
local_variable[type[ConnectionSource], connectionSource]
local_variable[type[Class], dataClass]
local_variable[type[DatabaseType], databaseType]
... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[ID] operator[>] Keyword[int] identifier[dropTable] operator[SEP] identifier[Dao] operator[<] identifier[T] , identifier[ID] operator[>] identifier[dao] , Keyword[boolean] identifier[ignoreErrors] operator[SEP] Keyword[throws] identifier[SQLExcept... |
@SuppressWarnings("unchecked")
public void addWriter(RecordWriter<Record> writer)
{
// avoid using the array-list here to reduce one level of object indirection
if (this.writers == null) {
this.writers = new RecordWriter[] {writer};
}
else {
RecordWriter<Record>[] ws = new RecordWriter[this.writers.leng... | class class_name[name] begin[{]
method[addWriter, return_type[void], modifier[public], parameter[writer]] begin[{]
if[binary_operation[THIS[member[None.writers]], ==, literal[null]]] begin[{]
assign[THIS[member[None.writers]], ArrayCreator(dimensions=[None], initializer=... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[addWriter] operator[SEP] identifier[RecordWriter] operator[<] identifier[Record] operator[>] identifier[writer] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] ide... |
@Nullable
public static Date parseDate(String dateValue, Collection<String> dateFormats, Date startDate) {
// trim single quotes around date if present
// see issue #5279
if (dateValue.length() > 1 && dateValue.startsWith("'") && dateValue.endsWith("'")) {
dateValue = dateValue.... | class class_name[name] begin[{]
method[parseDate, return_type[type[Date]], modifier[public static], parameter[dateValue, dateFormats, startDate]] begin[{]
if[binary_operation[binary_operation[binary_operation[call[dateValue.length, parameter[]], >, literal[1]], &&, call[dateValue.startsWith, pa... | annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[Date] identifier[parseDate] operator[SEP] identifier[String] identifier[dateValue] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[dateFormats] , identifier[Date] identifier[startDate] operator[SEP] {
K... |
@Override
@InterfaceAudience.Private
public Status updateIndexes(List<ViewStore> inputViews) throws CouchbaseLiteException {
Log.v(Log.TAG_VIEW, "Re-indexing view: %s", name);
if (getViewID() <= 0) {
String msg = "getViewID() < 0";
throw new CouchbaseLiteException(msg, St... | class class_name[name] begin[{]
method[updateIndexes, return_type[type[Status]], modifier[public], parameter[inputViews]] begin[{]
call[Log.v, parameter[member[Log.TAG_VIEW], literal["Re-indexing view: %s"], member[.name]]]
if[binary_operation[call[.getViewID, parameter[]], <=, ... | annotation[@] identifier[Override] annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Private] Keyword[public] identifier[Status] identifier[updateIndexes] operator[SEP] identifier[List] operator[<] identifier[ViewStore] operator[>] identifier[inputViews] operator[SEP] Keyword[throws] identifier[Couch... |
public void update(final Graphics g) {
final Dimension d = getSize();
if ( (this.offScreenImage == null) ) {
this.offScreenImage = createImage( d.width,
d.height );
}
paint( this.offScreenImage.getGraphics() );
g.drawImage( th... | class class_name[name] begin[{]
method[update, return_type[void], modifier[public], parameter[g]] begin[{]
local_variable[type[Dimension], d]
if[binary_operation[THIS[member[None.offScreenImage]], ==, literal[null]]] begin[{]
assign[THIS[member[None.offScreenImag... | Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[final] identifier[Graphics] identifier[g] operator[SEP] {
Keyword[final] identifier[Dimension] identifier[d] operator[=] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] Keyword[this] opera... |
public static ServiceInvocationException newServiceInvocationException(String message, Object... args) {
return newServiceInvocationException(null, message, args);
} | class class_name[name] begin[{]
method[newServiceInvocationException, return_type[type[ServiceInvocationException]], modifier[public static], parameter[message, args]] begin[{]
return[call[.newServiceInvocationException, parameter[literal[null], member[.message], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ServiceInvocationException] identifier[newServiceInvocationException] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyword[return] identifier[newServiceInvocationException] operator[SEP] Other[... |
public QueryCapability readXML(InputStream docIs, URI uri) throws IOException {
// get ready for XML parsing
warnMessages.setLength(0);
errMessages.setLength(0);
fatalMessages.setLength(0);
Document doc = null;
try {
doc = builder.build(docIs);
} catch (JDOMException e) {
fatal... | class class_name[name] begin[{]
method[readXML, return_type[type[QueryCapability]], modifier[public], parameter[docIs, uri]] begin[{]
call[warnMessages.setLength, parameter[literal[0]]]
call[errMessages.setLength, parameter[literal[0]]]
call[fatalMessages.setLeng... | Keyword[public] identifier[QueryCapability] identifier[readXML] operator[SEP] identifier[InputStream] identifier[docIs] , identifier[URI] identifier[uri] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[warnMessages] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] oper... |
protected long createTaskInternal(final String name, final String channel, final String data, final String key1, final String key2, final Long batchId, int postponeSec, TedStatus status) {
final String sqlLogId = "create_task";
if (status == null)
status = TedStatus.NEW;
String nextts = (status == TedStatus.NE... | class class_name[name] begin[{]
method[createTaskInternal, return_type[type[long]], modifier[protected], parameter[name, channel, data, key1, key2, batchId, postponeSec, status]] begin[{]
local_variable[type[String], sqlLogId]
if[binary_operation[member[.status], ==, literal[null]]] beg... | Keyword[protected] Keyword[long] identifier[createTaskInternal] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[channel] , Keyword[final] identifier[String] identifier[data] , Keyword[final] identifier[String] identifier[key1] , Keyword[final] identifi... |
public String getHTML(int index) {
String raw=getRaw(index);
if (raw==null) {
return raw;
}
int[] style=getStyle(index);
if (style==null) {
return raw;
}
StringBuilder html=new StringBuilder(raw.length()+32);
int offset=0;
w... | class class_name[name] begin[{]
method[getHTML, return_type[type[String]], modifier[public], parameter[index]] begin[{]
local_variable[type[String], raw]
if[binary_operation[member[.raw], ==, literal[null]]] begin[{]
return[member[.raw]]
else begin[{]
None
en... | Keyword[public] identifier[String] identifier[getHTML] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
identifier[String] identifier[raw] operator[=] identifier[getRaw] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[raw] operator[==] Other[null] oper... |
public void scaleWeights(double scale) {
for (int i = 0; i < weights.length; i++) {
for (int j = 0; j < weights[i].length; j++) {
weights[i][j] *= scale;
}
}
} | class class_name[name] begin[{]
method[scaleWeights, return_type[void], modifier[public], parameter[scale]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(me... | Keyword[public] Keyword[void] identifier[scaleWeights] operator[SEP] Keyword[double] identifier[scale] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[weights] operator[SEP] identifier[length] operator[SEP] identifier[i... |
public static String findUniqueKey(JSONArray expected) throws JSONException {
// Find a unique key for the object (id, name, whatever)
JSONObject o = (JSONObject) expected.get(0); // There's at least one at this point
for (String candidate : getKeys(o)) {
if (isUsableAsUniqueKey(cand... | class class_name[name] begin[{]
method[findUniqueKey, return_type[type[String]], modifier[public static], parameter[expected]] begin[{]
local_variable[type[JSONObject], o]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(... | Keyword[public] Keyword[static] identifier[String] identifier[findUniqueKey] operator[SEP] identifier[JSONArray] identifier[expected] operator[SEP] Keyword[throws] identifier[JSONException] {
identifier[JSONObject] identifier[o] operator[=] operator[SEP] identifier[JSONObject] operator[SEP] identifier[expected] ... |
public Optional<Nengo> findPrevious() {
if (this.court == COURT_NORTHERN) {
if (this.index == 0) {
return Optional.of(OFFICIAL_NENGOS[NENGO_KENMU.index - 1]);
} else {
return Optional.of(NORTHERN_NENGOS[this.index - 1]);
}
} else if (t... | class class_name[name] begin[{]
method[findPrevious, return_type[type[Optional]], modifier[public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.court]], ==, member[.COURT_NORTHERN]]] begin[{]
if[binary_operation[THIS[member[None.index]], ==, literal[0]]] b... | Keyword[public] identifier[Optional] operator[<] identifier[Nengo] operator[>] identifier[findPrevious] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[court] operator[==] identifier[COURT_NORTHERN] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] ... |
public void caretUpdate(CaretEvent e) {
try {
int testValue = Integer.valueOf(textField.getText()).intValue();
if ((testValue >= min) && (testValue <= max)) {
textField.setForeground(darkGreen);
setValue(testValue, false, true);
} else {
textField.setForeground(Color.red);
}
} catch (Except... | class class_name[name] begin[{]
method[caretUpdate, return_type[void], modifier[public], parameter[e]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTe... | Keyword[public] Keyword[void] identifier[caretUpdate] operator[SEP] identifier[CaretEvent] identifier[e] operator[SEP] {
Keyword[try] {
Keyword[int] identifier[testValue] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[textField] operator[SEP] identifier[getT... |
private static ReportLayout getReportLayoutForHeaderFunctions(ReportLayout layout) {
ReportLayout convertedLayout = ObjectCloner.silenceDeepCopy(layout);
List<FunctionBandElement> headerFunc = getHeaderFunctions(convertedLayout);
Band footerBand = convertedLayout.getFooterBand();
insertFunctionsInFooterBands... | class class_name[name] begin[{]
method[getReportLayoutForHeaderFunctions, return_type[type[ReportLayout]], modifier[private static], parameter[layout]] begin[{]
local_variable[type[ReportLayout], convertedLayout]
local_variable[type[List], headerFunc]
local_variable[type[Band], footerBa... | Keyword[private] Keyword[static] identifier[ReportLayout] identifier[getReportLayoutForHeaderFunctions] operator[SEP] identifier[ReportLayout] identifier[layout] operator[SEP] {
identifier[ReportLayout] identifier[convertedLayout] operator[=] identifier[ObjectCloner] operator[SEP] identifier[silenceDeepCopy] ope... |
@Override
public OperationHandle getSchemas(SessionHandle sessionHandle, String catalogName,
String schemaName) throws HiveSQLException {
return cliService.getSchemas(sessionHandle, catalogName, schemaName);
} | class class_name[name] begin[{]
method[getSchemas, return_type[type[OperationHandle]], modifier[public], parameter[sessionHandle, catalogName, schemaName]] begin[{]
return[call[cliService.getSchemas, parameter[member[.sessionHandle], member[.catalogName], member[.schemaName]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[OperationHandle] identifier[getSchemas] operator[SEP] identifier[SessionHandle] identifier[sessionHandle] , identifier[String] identifier[catalogName] , identifier[String] identifier[schemaName] operator[SEP] Keyword[throws] identifier[HiveSQLException] {... |
public ServiceFuture<List<ManagedInstanceKeyInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName, final String filter, final ListOperationCallback<ManagedInstanceKeyInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByInstanceSinglePageA... | class class_name[name] begin[{]
method[listByInstanceAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, managedInstanceName, filter, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listByInstanceSinglePageAsync, parameter[... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[ManagedInstanceKeyInner] operator[>] operator[>] identifier[listByInstanceAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[managedInstanceName... |
public void marshall(BusinessReportContentRange businessReportContentRange, ProtocolMarshaller protocolMarshaller) {
if (businessReportContentRange == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(b... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[businessReportContentRange, protocolMarshaller]] begin[{]
if[binary_operation[member[.businessReportContentRange], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argu... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BusinessReportContentRange] identifier[businessReportContentRange] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[businessReportContentRange] operator[==] Other[null]... |
@Override
public BlockChannelWriter<MemorySegment> createBlockChannelWriter(FileIOChannel.ID channelID,
LinkedBlockingQueue<MemorySegment> returnQueue) throws IOException
{
checkState(!isShutdown.get(), "I/O-Manager is shut down.");
return new AsynchronousBlockWriter(channelID, this.writers[channelID.getT... | class class_name[name] begin[{]
method[createBlockChannelWriter, return_type[type[BlockChannelWriter]], modifier[public], parameter[channelID, returnQueue]] begin[{]
call[.checkState, parameter[call[isShutdown.get, parameter[]], literal["I/O-Manager is shut down."]]]
return[ClassCreator... | annotation[@] identifier[Override] Keyword[public] identifier[BlockChannelWriter] operator[<] identifier[MemorySegment] operator[>] identifier[createBlockChannelWriter] operator[SEP] identifier[FileIOChannel] operator[SEP] identifier[ID] identifier[channelID] , identifier[LinkedBlockingQueue] operator[<] identifier[Me... |
protected void setAttributeSmart(Element element, String attr, String value)
{
if (value == null)
{
element.removeAttribute(attr);
}
else
{
element.setAttribute(attr, value);
}
} | class class_name[name] begin[{]
method[setAttributeSmart, return_type[void], modifier[protected], parameter[element, attr, value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[element.removeAttribute, parameter[member[.attr]]]
el... | Keyword[protected] Keyword[void] identifier[setAttributeSmart] operator[SEP] identifier[Element] identifier[element] , identifier[String] identifier[attr] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
ident... |
private void handlePartitioningTurnedOffOrOn(
SortedSetMultimap<TableContext, TableRuntimeContext> reconstructedPartitions
) {
for (TableContext tableContext : reconstructedPartitions.keySet()) {
final SortedSet<TableRuntimeContext> partitions = reconstructedPartitions.get(tableContext);
final ... | class class_name[name] begin[{]
method[handlePartitioningTurnedOffOrOn, return_type[void], modifier[private], parameter[reconstructedPartitions]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], ini... | Keyword[private] Keyword[void] identifier[handlePartitioningTurnedOffOrOn] operator[SEP] identifier[SortedSetMultimap] operator[<] identifier[TableContext] , identifier[TableRuntimeContext] operator[>] identifier[reconstructedPartitions] operator[SEP] {
Keyword[for] operator[SEP] identifier[TableContext] identi... |
protected boolean isDirectory(String remoteFilePath) throws IOException {
if (!ftpClient.changeWorkingDirectory(remoteFilePath)) { // not a directory or not accessible
switch (ftpClient.listFiles(remoteFilePath).length) {
case 0:
throw new CitrusRuntimeException(... | class class_name[name] begin[{]
method[isDirectory, return_type[type[boolean]], modifier[protected], parameter[remoteFilePath]] begin[{]
if[call[ftpClient.changeWorkingDirectory, parameter[member[.remoteFilePath]]]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(p... | Keyword[protected] Keyword[boolean] identifier[isDirectory] operator[SEP] identifier[String] identifier[remoteFilePath] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[ftpClient] operator[SEP] identifier[changeWorkingDirectory] operator[SEP] identifier[rem... |
public static <K, V> Map<K, V> toMap(Iterator<K> keys, Iterator<V> values) {
return toMap(keys, values, false);
} | class class_name[name] begin[{]
method[toMap, return_type[type[Map]], modifier[public static], parameter[keys, values]] begin[{]
return[call[.toMap, parameter[member[.keys], member[.values], literal[false]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[toMap] operator[SEP] identifier[Iterator] operator[<] identifier[K] operator[>] identifier[keys] , identifier[Iterator] operator[<] identifier[V] oper... |
public static base_response update(nitro_service client, policyexpression resource) throws Exception {
policyexpression updateresource = new policyexpression();
updateresource.name = resource.name;
updateresource.value = resource.value;
updateresource.description = resource.description;
updateresource.comment... | class class_name[name] begin[{]
method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{]
local_variable[type[policyexpression], updateresource]
assign[member[updateresource.name], member[resource.name]]
assign[member... | Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[policyexpression] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[policyexpression] identifier[updateresource] operator[=] Ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.