code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
static String search(String word) {
word = word.replaceAll(" ", "+");
String u;
if(isUseBaidu)
u = URL_BAIDU.replace("${wd}", word);
else
u = URL_GOOGLE.replace("${wd}", word);
URL url;
try {
url = new URL(u);
} catch (MalformedURLException e2) {
// TODO Auto-generated catch block
e2.printS... | class class_name[name] begin[{]
method[search, return_type[type[String]], modifier[static], parameter[word]] begin[{]
assign[member[.word], call[word.replaceAll, parameter[literal[" "], literal["+"]]]]
local_variable[type[String], u]
if[member[.isUseBaidu]] begin[{]
... | Keyword[static] identifier[String] identifier[search] operator[SEP] identifier[String] identifier[word] operator[SEP] {
identifier[word] operator[=] identifier[word] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[u] ... |
@Override
public DeletePlaybackConfigurationResult deletePlaybackConfiguration(DeletePlaybackConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeletePlaybackConfiguration(request);
} | class class_name[name] begin[{]
method[deletePlaybackConfiguration, return_type[type[DeletePlaybackConfigurationResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeletePlayback... | annotation[@] identifier[Override] Keyword[public] identifier[DeletePlaybackConfigurationResult] identifier[deletePlaybackConfiguration] operator[SEP] identifier[DeletePlaybackConfigurationRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP]... |
public NodeGroup withNodeGroupMembers(NodeGroupMember... nodeGroupMembers) {
if (this.nodeGroupMembers == null) {
setNodeGroupMembers(new com.amazonaws.internal.SdkInternalList<NodeGroupMember>(nodeGroupMembers.length));
}
for (NodeGroupMember ele : nodeGroupMembers) {
th... | class class_name[name] begin[{]
method[withNodeGroupMembers, return_type[type[NodeGroup]], modifier[public], parameter[nodeGroupMembers]] begin[{]
if[binary_operation[THIS[member[None.nodeGroupMembers]], ==, literal[null]]] begin[{]
call[.setNodeGroupMembers, parameter[C... | Keyword[public] identifier[NodeGroup] identifier[withNodeGroupMembers] operator[SEP] identifier[NodeGroupMember] operator[...] identifier[nodeGroupMembers] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[nodeGroupMembers] operator[==] Other[null] operator[SEP] {
identi... |
public CdnPathBuilder sharp(int strength) {
if (strength < 0 || strength > 20) {
strength = 5;
}
sb.append("/-/sharp/")
.append(strength);
return this;
} | class class_name[name] begin[{]
method[sharp, return_type[type[CdnPathBuilder]], modifier[public], parameter[strength]] begin[{]
if[binary_operation[binary_operation[member[.strength], <, literal[0]], ||, binary_operation[member[.strength], >, literal[20]]]] begin[{]
ass... | Keyword[public] identifier[CdnPathBuilder] identifier[sharp] operator[SEP] Keyword[int] identifier[strength] operator[SEP] {
Keyword[if] operator[SEP] identifier[strength] operator[<] Other[0] operator[||] identifier[strength] operator[>] Other[20] operator[SEP] {
identifier[strength] operator[=] Othe... |
public boolean match(String str, String regex) {
if (str == null || regex == null)
return false;
if (regex.trim().isEmpty())
return true;
return Pattern.compile(regex.trim()).matcher(str).find();
} | class class_name[name] begin[{]
method[match, return_type[type[boolean]], modifier[public], parameter[str, regex]] begin[{]
if[binary_operation[binary_operation[member[.str], ==, literal[null]], ||, binary_operation[member[.regex], ==, literal[null]]]] begin[{]
return[literal[false]]
el... | Keyword[public] Keyword[boolean] identifier[match] operator[SEP] identifier[String] identifier[str] , identifier[String] identifier[regex] operator[SEP] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[||] identifier[regex] operator[==] Other[null] operator[SEP] Keyword[return] lite... |
public Weighting createWeighting(HintsMap hintsMap, FlagEncoder encoder, Graph graph) {
String weightingStr = toLowerCase(hintsMap.getWeighting());
Weighting weighting = null;
if (encoder.supports(GenericWeighting.class)) {
weighting = new GenericWeighting((DataFlagEncoder) encoder,... | class class_name[name] begin[{]
method[createWeighting, return_type[type[Weighting]], modifier[public], parameter[hintsMap, encoder, graph]] begin[{]
local_variable[type[String], weightingStr]
local_variable[type[Weighting], weighting]
if[call[encoder.supports, parameter[ClassRe... | Keyword[public] identifier[Weighting] identifier[createWeighting] operator[SEP] identifier[HintsMap] identifier[hintsMap] , identifier[FlagEncoder] identifier[encoder] , identifier[Graph] identifier[graph] operator[SEP] {
identifier[String] identifier[weightingStr] operator[=] identifier[toLowerCase] operator[... |
public void setTargetFolder(CmsUUID structureId) throws CmsException {
CmsObject cms = A_CmsUI.getCmsObject();
CmsResource res = cms.readResource(structureId);
setTargetForlder(res);
} | class class_name[name] begin[{]
method[setTargetFolder, return_type[void], modifier[public], parameter[structureId]] begin[{]
local_variable[type[CmsObject], cms]
local_variable[type[CmsResource], res]
call[.setTargetForlder, parameter[member[.res]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setTargetFolder] operator[SEP] identifier[CmsUUID] identifier[structureId] operator[SEP] Keyword[throws] identifier[CmsException] {
identifier[CmsObject] identifier[cms] operator[=] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] ope... |
public void resetCheckpoint() {
synchronized (lock) {
if (c4ReplStatus != null && c4ReplStatus
.getActivityLevel() != C4ReplicatorStatus.ActivityLevel.STOPPED) {
throw new IllegalStateException(
"Replicator is not stopped. Resetting checkpoint is o... | class class_name[name] begin[{]
method[resetCheckpoint, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[binary_operation[member[.c4ReplStatus], !=, literal[null]], &&, binary_operation[call[c4ReplStatus.... | Keyword[public] Keyword[void] identifier[resetCheckpoint] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] identifier[c4ReplStatus] operator[!=] Other[null] operator[&&] identifier[c4ReplStatus] operator[SEP] identifier[getAct... |
public java.lang.String getFilename() {
java.lang.Object ref = filename_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
filena... | class class_name[name] begin[{]
method[getFilename, return_type[type[java]], modifier[public], parameter[]] begin[{]
local_variable[type[java], ref]
if[binary_operation[member[.ref], instanceof, type[java]]] begin[{]
return[Cast(expression=MemberReference(member=ref, postfix... | Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getFilename] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[filename_] operator[SEP] Keyword[if] opera... |
public static WorkUnit create(Extract extract, WatermarkInterval watermarkInterval) {
return new WorkUnit(null, extract, watermarkInterval);
} | class class_name[name] begin[{]
method[create, return_type[type[WorkUnit]], modifier[public static], parameter[extract, watermarkInterval]] begin[{]
return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=extrac... | Keyword[public] Keyword[static] identifier[WorkUnit] identifier[create] operator[SEP] identifier[Extract] identifier[extract] , identifier[WatermarkInterval] identifier[watermarkInterval] operator[SEP] {
Keyword[return] Keyword[new] identifier[WorkUnit] operator[SEP] Other[null] , identifier[extract] , identi... |
public XsdSchema getSchema(List<XsdSchema> schemas, Document doc) {
XsdSchema schema = null;
for (XsdSchemaMappingStrategy strategy : strategies) {
schema = strategy.getSchema(schemas, doc);
if (schema != null) {
return schema;
}
... | class class_name[name] begin[{]
method[getSchema, return_type[type[XsdSchema]], modifier[public], parameter[schemas, doc]] begin[{]
local_variable[type[XsdSchema], schema]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberRefere... | Keyword[public] identifier[XsdSchema] identifier[getSchema] operator[SEP] identifier[List] operator[<] identifier[XsdSchema] operator[>] identifier[schemas] , identifier[Document] identifier[doc] operator[SEP] {
identifier[XsdSchema] identifier[schema] operator[=] Other[null] operator[SEP] Keyword[for] operator... |
@Override
public void generateParseOnJacksonAsString(BindTypeContext context, MethodSpec.Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) {
// TODO QUA
// TypeName typeName = resolveTypeName(property.getParent(),
// property.getPropertyType().getTypeName());
... | class class_name[name] begin[{]
method[generateParseOnJacksonAsString, return_type[void], modifier[public], parameter[context, methodBuilder, parserName, beanClass, beanName, property]] begin[{]
local_variable[type[TypeName], typeName]
local_variable[type[String], bindName]
if[c... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[generateParseOnJacksonAsString] operator[SEP] identifier[BindTypeContext] identifier[context] , identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[methodBuilder] , identifier[String] identifier[parserName] , identifier[TypeN... |
private static long simulate(long bytesPerSecond, long latency, int bytes, long timeTaken, boolean roundUp) {
if ( bytesPerSecond <= 0) { //< defensive code
return 0;
}
// workout how much we should have waited to read this amount of bytes
double d = ((double) bytes / bytesP... | class class_name[name] begin[{]
method[simulate, return_type[type[long]], modifier[private static], parameter[bytesPerSecond, latency, bytes, timeTaken, roundUp]] begin[{]
if[binary_operation[member[.bytesPerSecond], <=, literal[0]]] begin[{]
return[literal[0]]
else begin[{]... | Keyword[private] Keyword[static] Keyword[long] identifier[simulate] operator[SEP] Keyword[long] identifier[bytesPerSecond] , Keyword[long] identifier[latency] , Keyword[int] identifier[bytes] , Keyword[long] identifier[timeTaken] , Keyword[boolean] identifier[roundUp] operator[SEP] {
Keyword[if] operator[SEP... |
private Map<String, String> expandConfig(Map<String, String> map) {
return expandAllProperties(map, getPropertyLookup().getPropertiesMap());
} | class class_name[name] begin[{]
method[expandConfig, return_type[type[Map]], modifier[private], parameter[map]] begin[{]
return[call[.expandAllProperties, parameter[member[.map], call[.getPropertyLookup, parameter[]]]]]
end[}]
END[}] | Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[expandConfig] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[SEP] {
Keyword[return] identifier[expandAllProperties] operator[SEP] i... |
boolean isFailure(ExecutionResult result) {
return failureConditions.isEmpty() ?
result.getFailure() != null :
isFailure((R) result.getResult(), result.getFailure());
} | class class_name[name] begin[{]
method[isFailure, return_type[type[boolean]], modifier[default], parameter[result]] begin[{]
return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=failureConditions, selectors=[], type_argum... | Keyword[boolean] identifier[isFailure] operator[SEP] identifier[ExecutionResult] identifier[result] operator[SEP] {
Keyword[return] identifier[failureConditions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] identifier[result] operator[SEP] identifier[getFailure] operator[SEP] operato... |
protected boolean updateDerivates() {
functionGradientHessian(x,true, gradient, hessian);
if( config.hessianScaling) {
computeHessianScaling();
applyHessianScaling();
}
hessian.extractDiagonals(diagOrig);
if( checkConvergenceGTest(gradient) ) {
if( verbose != null ) {
verbose.println("Converge... | class class_name[name] begin[{]
method[updateDerivates, return_type[type[boolean]], modifier[protected], parameter[]] begin[{]
call[.functionGradientHessian, parameter[member[.x], literal[true], member[.gradient], member[.hessian]]]
if[member[config.hessianScaling]] begin[{]
... | Keyword[protected] Keyword[boolean] identifier[updateDerivates] operator[SEP] operator[SEP] {
identifier[functionGradientHessian] operator[SEP] identifier[x] , literal[boolean] , identifier[gradient] , identifier[hessian] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[config] operator[SEP] i... |
public double getCurrentMaxBondOrder(IAtom atom, IAtomContainer ac) throws CDKException {
IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol());
if (atomTypes.length == 0) return 0;
double bondOrderSum = ac.getBondOrderSum(atom);
Integer hcount = at... | class class_name[name] begin[{]
method[getCurrentMaxBondOrder, return_type[type[double]], modifier[public], parameter[atom, ac]] begin[{]
local_variable[type[IAtomType], atomTypes]
if[binary_operation[member[atomTypes.length], ==, literal[0]]] begin[{]
return[literal[0]]
else be... | Keyword[public] Keyword[double] identifier[getCurrentMaxBondOrder] operator[SEP] identifier[IAtom] identifier[atom] , identifier[IAtomContainer] identifier[ac] operator[SEP] Keyword[throws] identifier[CDKException] {
identifier[IAtomType] operator[SEP] operator[SEP] identifier[atomTypes] operator[=] identifier[... |
private boolean checkForAddOnAccess() {
Class[] classContext = getClassContext();
for (Class clazz : classContext) {
if (clazz.getClassLoader() instanceof IzouPluginClassLoader) {
return true;
}
}
return false;
} | class class_name[name] begin[{]
method[checkForAddOnAccess, return_type[type[boolean]], modifier[private], parameter[]] begin[{]
local_variable[type[Class], classContext]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arg... | Keyword[private] Keyword[boolean] identifier[checkForAddOnAccess] operator[SEP] operator[SEP] {
identifier[Class] operator[SEP] operator[SEP] identifier[classContext] operator[=] identifier[getClassContext] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] identifier[clazz] o... |
private static void storeRecentConnectionSettings(Hashtable settings) {
try {
if (recentSettings == null) {
setHomeDir();
if (homedir == null) {
return;
}
recentSettings = new File(homedir, fileName);
... | class class_name[name] begin[{]
method[storeRecentConnectionSettings, return_type[void], modifier[private static], parameter[settings]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=recentSettings, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[private] Keyword[static] Keyword[void] identifier[storeRecentConnectionSettings] operator[SEP] identifier[Hashtable] identifier[settings] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[recentSettings] operator[==] Other[null] operator[SEP] {
identifier[setHo... |
public Document getDocument(String xmlFilename) throws CmsXmlException {
// try to get it from the cache
Document document = m_cache.get(xmlFilename);
if (document == null) {
try {
document = CmsXmlUtils.unmarshalHelper(
new InputSource(new FileR... | class class_name[name] begin[{]
method[getDocument, return_type[type[Document]], modifier[public], parameter[xmlFilename]] begin[{]
local_variable[type[Document], document]
if[binary_operation[member[.document], ==, literal[null]]] begin[{]
TryStatement(block=[StatementExpre... | Keyword[public] identifier[Document] identifier[getDocument] operator[SEP] identifier[String] identifier[xmlFilename] operator[SEP] Keyword[throws] identifier[CmsXmlException] {
identifier[Document] identifier[document] operator[=] identifier[m_cache] operator[SEP] identifier[get] operator[SEP] identifier[xmlFil... |
private static final Atom[] getFragment(Atom[] caall, int pos, int fragmentLength ,
boolean clone){
if ( pos+fragmentLength > caall.length)
return null;
Atom[] tmp = new Atom[fragmentLength];
for (int i=0;i< fragmentLength;i++){
if (clone){
tmp[i] = (Atom)caall[i+pos].clone();
} else {
tmp[... | class class_name[name] begin[{]
method[getFragment, return_type[type[Atom]], modifier[final private static], parameter[caall, pos, fragmentLength, clone]] begin[{]
if[binary_operation[binary_operation[member[.pos], +, member[.fragmentLength]], >, member[caall.length]]] begin[{]
return[literal[n... | Keyword[private] Keyword[static] Keyword[final] identifier[Atom] operator[SEP] operator[SEP] identifier[getFragment] operator[SEP] identifier[Atom] operator[SEP] operator[SEP] identifier[caall] , Keyword[int] identifier[pos] , Keyword[int] identifier[fragmentLength] , Keyword[boolean] identifier[clone] operator[SEP]... |
private void writeHandleXMINillableAttribute(PrintWriter out, String indent, ModelAttribute attribute, String object) {
ModelMethod method = attribute.method;
String fieldName = method.field.name;
String typeName = method.getType().getJavaImplTypeName();
out.append(indent).append(" ... | class class_name[name] begin[{]
method[writeHandleXMINillableAttribute, return_type[void], modifier[private], parameter[out, indent, attribute, object]] begin[{]
local_variable[type[ModelMethod], method]
local_variable[type[String], fieldName]
local_variable[type[String], typeName]
... | Keyword[private] Keyword[void] identifier[writeHandleXMINillableAttribute] operator[SEP] identifier[PrintWriter] identifier[out] , identifier[String] identifier[indent] , identifier[ModelAttribute] identifier[attribute] , identifier[String] identifier[object] operator[SEP] {
identifier[ModelMethod] identifier... |
@Override
protected ResultSet findChildNodesByParentIdentifierCQ(String parentIdentifier, List<QPathEntryFilter> pattern)
throws SQLException
{
if (pattern.isEmpty())
{
throw new SQLException("Pattern list is empty.");
}
else
{
if (findNodesByParentIdAndComple... | class class_name[name] begin[{]
method[findChildNodesByParentIdentifierCQ, return_type[type[ResultSet]], modifier[protected], parameter[parentIdentifier, pattern]] begin[{]
if[call[pattern.isEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(post... | annotation[@] identifier[Override] Keyword[protected] identifier[ResultSet] identifier[findChildNodesByParentIdentifierCQ] operator[SEP] identifier[String] identifier[parentIdentifier] , identifier[List] operator[<] identifier[QPathEntryFilter] operator[>] identifier[pattern] operator[SEP] Keyword[throws] identifier[S... |
private Session getSession(boolean isSingleton) {
final MailAccount mailAccount = this.mailAccount;
Authenticator authenticator = null;
if (mailAccount.isAuth()) {
authenticator = new UserPassAuthenticator(mailAccount.getUser(), mailAccount.getPass());
}
return isSingleton ? Session.getDefaultInsta... | class class_name[name] begin[{]
method[getSession, return_type[type[Session]], modifier[private], parameter[isSingleton]] begin[{]
local_variable[type[MailAccount], mailAccount]
local_variable[type[Authenticator], authenticator]
if[call[mailAccount.isAuth, parameter[]]] begin[{]... | Keyword[private] identifier[Session] identifier[getSession] operator[SEP] Keyword[boolean] identifier[isSingleton] operator[SEP] {
Keyword[final] identifier[MailAccount] identifier[mailAccount] operator[=] Keyword[this] operator[SEP] identifier[mailAccount] operator[SEP] identifier[Authenticator] identifier[auth... |
public List<ExpandedAnnotation> expand(final Annotation[] targetAnnos) {
Objects.requireNonNull(targetAnnos);
final List<ExpandedAnnotation> expanedList = new ArrayList<>();
for(Annotation targetAnno : targetAnnos) {
expanedList.addAll(expand(targetAnno));
}
... | class class_name[name] begin[{]
method[expand, return_type[type[List]], modifier[public], parameter[targetAnnos]] begin[{]
call[Objects.requireNonNull, parameter[member[.targetAnnos]]]
local_variable[type[List], expanedList]
ForStatement(body=BlockStatement(label=None, statement... | Keyword[public] identifier[List] operator[<] identifier[ExpandedAnnotation] operator[>] identifier[expand] operator[SEP] Keyword[final] identifier[Annotation] operator[SEP] operator[SEP] identifier[targetAnnos] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[... |
public static <T> Predicate<T> iterablePresent() {
return t -> t instanceof Iterable ? ((Iterable) t).iterator()
.hasNext()
: false;
} | class class_name[name] begin[{]
method[iterablePresent, return_type[type[Predicate]], modifier[public static], parameter[]] begin[{]
return[LambdaExpression(body=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selecto... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[iterablePresent] operator[SEP] operator[SEP] {
Keyword[return] identifier[t] operator[->] identifier[t] Keyword[instanceof] identifier[Iterable] operator[?] operator[SEP] o... |
private void initHandshaker() {
switch (connectionState) {
//
// Starting a new handshake.
//
case cs_START:
case cs_DATA:
break;
//
// We're already in the middle of a handshake.
//
case cs_HANDSHAKE:
case cs_RENEGOTI... | class class_name[name] begin[{]
method[initHandshaker, return_type[void], modifier[private], parameter[]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['cs_START', 'cs_DATA'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['cs_HANDSHAKE', 'cs_RENEGOTIATE'], s... | Keyword[private] Keyword[void] identifier[initHandshaker] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[connectionState] operator[SEP] {
Keyword[case] identifier[cs_START] operator[:] Keyword[case] identifier[cs_DATA] operator[:] Keyword[break] operator[SEP] Keyword[case] id... |
public Calendar retrieveCalendar(String name, T jedis) throws JobPersistenceException{
final String calendarHashKey = redisSchema.calendarHashKey(name);
Calendar calendar;
try{
final Map<String, String> calendarMap = jedis.hgetAll(calendarHashKey);
if(calendarMap == null ... | class class_name[name] begin[{]
method[retrieveCalendar, return_type[type[Calendar]], modifier[public], parameter[name, jedis]] begin[{]
local_variable[type[String], calendarHashKey]
local_variable[type[Calendar], calendar]
TryStatement(block=[LocalVariableDeclaration(annotations=[], de... | Keyword[public] identifier[Calendar] identifier[retrieveCalendar] operator[SEP] identifier[String] identifier[name] , identifier[T] identifier[jedis] operator[SEP] Keyword[throws] identifier[JobPersistenceException] {
Keyword[final] identifier[String] identifier[calendarHashKey] operator[=] identifier[redisSche... |
public com.google.api.ads.admanager.axis.v201808.VideoPositionTargeting getVideoPositionTargeting() {
return videoPositionTargeting;
} | class class_name[name] begin[{]
method[getVideoPositionTargeting, return_type[type[com]], modifier[public], parameter[]] begin[{]
return[member[.videoPositionTargeting]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[VideoPositionTargeting] identifier[getVideoPositionTargeting] operato... |
@Override
public double distance( Object pt1, Object pt2 ) {
double[] coords1 = coords(pt1);
double[] coords2 = coords(pt2);
double sum = 0.0;
for( int i = 0; i < dimensions; i++ ) {
double d = coords1[i] - coords2[i];
sum += d * d;
}
return Ma... | class class_name[name] begin[{]
method[distance, return_type[type[double]], modifier[public], parameter[pt1, pt2]] begin[{]
local_variable[type[double], coords1]
local_variable[type[double], coords2]
local_variable[type[double], sum]
ForStatement(body=BlockStatement(label=None, ... | annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[distance] operator[SEP] identifier[Object] identifier[pt1] , identifier[Object] identifier[pt2] operator[SEP] {
Keyword[double] operator[SEP] operator[SEP] identifier[coords1] operator[=] identifier[coords] operator[SEP] identifier[pt... |
public Matrix getMatrix(int i0, int i1, int[] c)
{
Matrix X = new Matrix(i1 - i0 + 1, c.length);
double[][] B = X.getArray();
try
{
for (int i = i0; i <= i1; i++)
{
for (int j = 0; j < c.length; j++)
{
B[i - ... | class class_name[name] begin[{]
method[getMatrix, return_type[type[Matrix]], modifier[public], parameter[i0, i1, c]] begin[{]
local_variable[type[Matrix], X]
local_variable[type[double], B]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=Bl... | Keyword[public] identifier[Matrix] identifier[getMatrix] operator[SEP] Keyword[int] identifier[i0] , Keyword[int] identifier[i1] , Keyword[int] operator[SEP] operator[SEP] identifier[c] operator[SEP] {
identifier[Matrix] identifier[X] operator[=] Keyword[new] identifier[Matrix] operator[SEP] identifier[i1] ope... |
public File getCorePlatformDir() {
File platformDir = null;
File installDir = Utils.getInstallDir();
if (installDir != null) {
platformDir = new File(installDir, PLATFORM_DIR);
}
if (platformDir == null) {
throw new RuntimeException("Platform Directory n... | class class_name[name] begin[{]
method[getCorePlatformDir, return_type[type[File]], modifier[public], parameter[]] begin[{]
local_variable[type[File], platformDir]
local_variable[type[File], installDir]
if[binary_operation[member[.installDir], !=, literal[null]]] begin[{]
... | Keyword[public] identifier[File] identifier[getCorePlatformDir] operator[SEP] operator[SEP] {
identifier[File] identifier[platformDir] operator[=] Other[null] operator[SEP] identifier[File] identifier[installDir] operator[=] identifier[Utils] operator[SEP] identifier[getInstallDir] operator[SEP] operator[SEP] op... |
private KeyManager[] createKeyManagers(ContextAware context)
throws NoSuchProviderException, NoSuchAlgorithmException,
UnrecoverableKeyException, KeyStoreException {
if (getKeyStore() == null) return null;
KeyStore keyStore = getKeyStore().createKeyStore();
context.addInfo(
"key store ... | class class_name[name] begin[{]
method[createKeyManagers, return_type[type[KeyManager]], modifier[private], parameter[context]] begin[{]
if[binary_operation[call[.getKeyStore, parameter[]], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
loca... | Keyword[private] identifier[KeyManager] operator[SEP] operator[SEP] identifier[createKeyManagers] operator[SEP] identifier[ContextAware] identifier[context] operator[SEP] Keyword[throws] identifier[NoSuchProviderException] , identifier[NoSuchAlgorithmException] , identifier[UnrecoverableKeyException] , identifier[Ke... |
public static String canonicalise(final InetSocketAddress localData, final InetSocketAddress remoteData)
{
final StringBuilder builder = new StringBuilder(48);
builder.append("UDP-");
toHex(builder, localData.getAddress().getAddress())
.append('-')
.append(localData... | class class_name[name] begin[{]
method[canonicalise, return_type[type[String]], modifier[public static], parameter[localData, remoteData]] begin[{]
local_variable[type[StringBuilder], builder]
call[builder.append, parameter[literal["UDP-"]]]
call[.toHex, parameter[member... | Keyword[public] Keyword[static] identifier[String] identifier[canonicalise] operator[SEP] Keyword[final] identifier[InetSocketAddress] identifier[localData] , Keyword[final] identifier[InetSocketAddress] identifier[remoteData] operator[SEP] {
Keyword[final] identifier[StringBuilder] identifier[builder] operator... |
@Override
public void run() {
try {
this.keepOn = true;
try {
this.serverSocket = this.openServerSocket();
} catch (final IOException e) {
throw new RuntimeException(e);
}
while (this.keepOn) {
try ... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=keepOn, postfix_operators=No... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[keepOn] operator[=] literal[boolean] operator[SEP] Keyword[try] {
Keyword[this] operator[SEP] identifier[serverSocket] ope... |
public void xmlWriteOn(FormattedWriter writer) throws IOException
{
super.xmlWriteOn(writer);
writer.newLine();
writer.taggedValue("subscriberID", _subState.getSubscriberID());
writer.newLine();
writer.startTag("topics");
writer.indent();
String[] topics = _subState.getTopics();
... | class class_name[name] begin[{]
method[xmlWriteOn, return_type[void], modifier[public], parameter[writer]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=xmlWriteOn, postfix_operators=[], pre... | Keyword[public] Keyword[void] identifier[xmlWriteOn] operator[SEP] identifier[FormattedWriter] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[super] operator[SEP] identifier[xmlWriteOn] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[writer] operator[SE... |
public Closeable onCandlesticksEvent(final BiConsumer<BitfinexCandlestickSymbol, Collection<BitfinexCandle>> listener) {
candlesConsumers.offer(listener);
return () -> candlesConsumers.remove(listener);
} | class class_name[name] begin[{]
method[onCandlesticksEvent, return_type[type[Closeable]], modifier[public], parameter[listener]] begin[{]
call[candlesConsumers.offer, parameter[member[.listener]]]
return[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=listener, ... | Keyword[public] identifier[Closeable] identifier[onCandlesticksEvent] operator[SEP] Keyword[final] identifier[BiConsumer] operator[<] identifier[BitfinexCandlestickSymbol] , identifier[Collection] operator[<] identifier[BitfinexCandle] operator[>] operator[>] identifier[listener] operator[SEP] {
identifier[cand... |
public final void setPreviewShape(@NonNull final PreviewShape previewShape) {
Condition.INSTANCE.ensureNotNull(previewShape, "The preview shape may not be null");
this.previewShape = previewShape;
if (previewLoader != null) {
previewLoader.setShape(previewShape);
}
... | class class_name[name] begin[{]
method[setPreviewShape, return_type[void], modifier[final public], parameter[previewShape]] begin[{]
call[Condition.INSTANCE.ensureNotNull, parameter[member[.previewShape], literal["The preview shape may not be null"]]]
assign[THIS[member[None.pre... | Keyword[public] Keyword[final] Keyword[void] identifier[setPreviewShape] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[PreviewShape] identifier[previewShape] operator[SEP] {
identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] ... |
public VaadinForHeroku withFilterDefinition(final FilterDefinitionBuilder... filterDefs){
checkVarArgsArguments(filterDefs);
this.filterDefinitions.addAll(Arrays.asList(filterDefs));
return self();
} | class class_name[name] begin[{]
method[withFilterDefinition, return_type[type[VaadinForHeroku]], modifier[public], parameter[filterDefs]] begin[{]
call[.checkVarArgsArguments, parameter[member[.filterDefs]]]
THIS[member[None.filterDefinitions]call[None.addAll, parameter[call[Arr... | Keyword[public] identifier[VaadinForHeroku] identifier[withFilterDefinition] operator[SEP] Keyword[final] identifier[FilterDefinitionBuilder] operator[...] identifier[filterDefs] operator[SEP] {
identifier[checkVarArgsArguments] operator[SEP] identifier[filterDefs] operator[SEP] operator[SEP] Keyword[this] opera... |
public byte[] compHandshakeData(CommsConnection conn, int version, byte[] data) {
try {
return SchemaManager.receiveHandshake(conn, data);
} catch (Exception ex) {
FFDCFilter.processException(ex, "compData", "96", this);
return null;
}
} | class class_name[name] begin[{]
method[compHandshakeData, return_type[type[byte]], modifier[public], parameter[conn, version, data]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, se... | Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[compHandshakeData] operator[SEP] identifier[CommsConnection] identifier[conn] , Keyword[int] identifier[version] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] {
Keyword[try] {
Keyword[return] identifier... |
public void dndOff() throws WorkspaceApiException {
try {
ApiSuccessResponse response = this.voiceApi.setDNDOff(null);
throwIfNotOk("dndOff", response);
} catch (ApiException e) {
throw new WorkspaceApiException("dndOff failed.", e);
}
} | class class_name[name] begin[{]
method[dndOff, return_type[void], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[Me... | Keyword[public] Keyword[void] identifier[dndOff] operator[SEP] operator[SEP] Keyword[throws] identifier[WorkspaceApiException] {
Keyword[try] {
identifier[ApiSuccessResponse] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[voiceApi] operator[SEP] identifier[setDNDOff] operator[... |
private void loadCollisionGroups(MapTileCollision mapCollision, Media groupsConfig)
{
Verbose.info(INFO_LOAD_GROUPS, groupsConfig.getFile().getPath());
this.groupsConfig = groupsConfig;
final Xml nodeGroups = new Xml(groupsConfig);
final CollisionGroupConfig config = Collision... | class class_name[name] begin[{]
method[loadCollisionGroups, return_type[void], modifier[private], parameter[mapCollision, groupsConfig]] begin[{]
call[Verbose.info, parameter[member[.INFO_LOAD_GROUPS], call[groupsConfig.getFile, parameter[]]]]
assign[THIS[member[None.groupsConfi... | Keyword[private] Keyword[void] identifier[loadCollisionGroups] operator[SEP] identifier[MapTileCollision] identifier[mapCollision] , identifier[Media] identifier[groupsConfig] operator[SEP] {
identifier[Verbose] operator[SEP] identifier[info] operator[SEP] identifier[INFO_LOAD_GROUPS] , identifier[groupsConfig... |
private void clearEntityAttributes(CmsEntity entity) {
for (CmsEntityAttribute attribute : entity.getAttributes()) {
if (attribute.isComplexValue()) {
for (CmsEntity child : attribute.getComplexValues()) {
clearEntityAttributes(child);
r... | class class_name[name] begin[{]
method[clearEntityAttributes, return_type[void], modifier[private], parameter[entity]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isComplexValue, postfix_operators=[], prefix_operators=[],... | Keyword[private] Keyword[void] identifier[clearEntityAttributes] operator[SEP] identifier[CmsEntity] identifier[entity] operator[SEP] {
Keyword[for] operator[SEP] identifier[CmsEntityAttribute] identifier[attribute] operator[:] identifier[entity] operator[SEP] identifier[getAttributes] operator[SEP] operator[SE... |
public static void setCacheFiles(URI[] files, Configuration conf) {
String sfiles = StringUtils.uriToString(files);
conf.set("mapred.cache.files", sfiles);
} | class class_name[name] begin[{]
method[setCacheFiles, return_type[void], modifier[public static], parameter[files, conf]] begin[{]
local_variable[type[String], sfiles]
call[conf.set, parameter[literal["mapred.cache.files"], member[.sfiles]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[setCacheFiles] operator[SEP] identifier[URI] operator[SEP] operator[SEP] identifier[files] , identifier[Configuration] identifier[conf] operator[SEP] {
identifier[String] identifier[sfiles] operator[=] identifier[StringUtils] operator[SEP] identifier[uriT... |
private void writeObject(ObjectOutputStream out) throws IOException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "writeObject : " + this);
throw new NotSerializableException("This entity manager is not serializable");
} | class class_name[name] begin[{]
method[writeObject, return_type[void], modifier[private], parameter[out]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[Tr.debug, parameter[member[.tc], bin... | Keyword[private] Keyword[void] identifier[writeObject] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] i... |
@Override
public AbstractMessage nextElement()
{
if (endOfQueueReached)
throw new NoSuchElementException();
try
{
checkNotClosed();
AbstractMessage msg = fetchNext();
if (msg != null)
{
nextMessage = null; // Consume fetched message
// Make sure the message is fully deserialized and ... | class class_name[name] begin[{]
method[nextElement, return_type[type[AbstractMessage]], modifier[public], parameter[]] begin[{]
if[member[.endOfQueueReached]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_o... | annotation[@] identifier[Override] Keyword[public] identifier[AbstractMessage] identifier[nextElement] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[endOfQueueReached] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchElementException] operator[SEP] operator[SEP] operator[SEP] Keywo... |
public static Counter getCounter(TaskInputOutputContext context,
String groupName, String counterName) {
return (Counter) invoke(GET_COUNTER_METHOD, context, groupName, counterName);
} | class class_name[name] begin[{]
method[getCounter, return_type[type[Counter]], modifier[public static], parameter[context, groupName, counterName]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=GET_COUNTER_METHOD, postfix_operators=[], prefix_operators=[], qualifier... | Keyword[public] Keyword[static] identifier[Counter] identifier[getCounter] operator[SEP] identifier[TaskInputOutputContext] identifier[context] , identifier[String] identifier[groupName] , identifier[String] identifier[counterName] operator[SEP] {
Keyword[return] operator[SEP] identifier[Counter] operator[SEP]... |
@Override
public SearchResult getUsers(String pattern, int limit) throws RegistryException {
if (pattern == null) {
throw new IllegalArgumentException("pattern is null");
}
if (pattern.isEmpty()) {
throw new IllegalArgumentException("pattern is an empty String");
... | class class_name[name] begin[{]
method[getUsers, return_type[type[SearchResult]], modifier[public], parameter[pattern, limit]] begin[{]
if[binary_operation[member[.pattern], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], ... | annotation[@] identifier[Override] Keyword[public] identifier[SearchResult] identifier[getUsers] operator[SEP] identifier[String] identifier[pattern] , Keyword[int] identifier[limit] operator[SEP] Keyword[throws] identifier[RegistryException] {
Keyword[if] operator[SEP] identifier[pattern] operator[==] Other[nu... |
private String removePathFromUrl(String url) {
String path = extractPathFromUrl(url);
int end = url.indexOf(path);
return url.substring(0, end);
// Alternative: return url.replaceAll("(?<=:[0-9]{1,5})/.*", "")), assume url contains port number
} | class class_name[name] begin[{]
method[removePathFromUrl, return_type[type[String]], modifier[private], parameter[url]] begin[{]
local_variable[type[String], path]
local_variable[type[int], end]
return[call[url.substring, parameter[literal[0], member[.end]]]]
end[}]
END[}] | Keyword[private] identifier[String] identifier[removePathFromUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] {
identifier[String] identifier[path] operator[=] identifier[extractPathFromUrl] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[int] identifier[end] operator[=] iden... |
public final void updateOwner(final Map<String, Object> pAddParam,
final WageTaxLine pEntity) throws Exception {
String query =
"select sum(ITSTOTAL) as ITSTOTAL from WAGETAXLINE"
+ " join TAX on TAX.ITSID = WAGETAXLINE.TAX"
+ " where TAX.ITSTYPE=3 and ITSOWNER="
+ pEntity.getItsOwne... | class class_name[name] begin[{]
method[updateOwner, return_type[void], modifier[final public], parameter[pAddParam, pEntity]] begin[{]
local_variable[type[String], query]
local_variable[type[Double], total]
if[binary_operation[member[.total], ==, literal[null]]] begin[{]
... | Keyword[public] Keyword[final] Keyword[void] identifier[updateOwner] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[WageTaxLine] identifier[pEntity] operator[SEP] Keyword[throws] identifier[Exception] {
... |
@Override
public ScheduleExpression getSchedule()
{
boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc, "getSchedule: " + this);
// Determine if the calling bean is in a state that allows timer service
// metho... | class class_name[name] begin[{]
method[getSchedule, return_type[type[ScheduleExpression]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.ent... | annotation[@] identifier[Override] Keyword[public] identifier[ScheduleExpression] identifier[getSchedule] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if]... |
public static final Assignment fromSortedArrays(int[] vars, Object[] values) {
// Verify that the assignment is sorted and contains no duplicate values.
for (int i = 1; i < vars.length; i++) {
Preconditions.checkArgument(vars[i - 1] < vars[i], "Illegal assignment variable nums: %s %s",
vars[i - ... | class class_name[name] begin[{]
method[fromSortedArrays, return_type[type[Assignment]], modifier[final public static], parameter[vars, values]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberRef... | Keyword[public] Keyword[static] Keyword[final] identifier[Assignment] identifier[fromSortedArrays] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[vars] , identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] ope... |
@Override
public void render(final ActionRequest actionRequest, final Object resultValue) {
final PermRedirect redirectResult;
if (resultValue == null) {
redirectResult = PermRedirect.to(StringPool.SLASH);
} else {
if (resultValue instanceof String) {
redirectResult = PermRedirect.to((String)resultVal... | class class_name[name] begin[{]
method[render, return_type[void], modifier[public], parameter[actionRequest, resultValue]] begin[{]
local_variable[type[PermRedirect], redirectResult]
if[binary_operation[member[.resultValue], ==, literal[null]]] begin[{]
assign[me... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[render] operator[SEP] Keyword[final] identifier[ActionRequest] identifier[actionRequest] , Keyword[final] identifier[Object] identifier[resultValue] operator[SEP] {
Keyword[final] identifier[PermRedirect] identifier[redirectResult] oper... |
@Override
public AnnotationDefinition convert(BELAnnotationDefinition bad) {
if (bad == null) {
return null;
}
AnnotationDefinition ad = CommonModelFactory.getInstance()
.createAnnotationDefinition(bad.getName());
switch (bad.getAnnotationType()) {
... | class class_name[name] begin[{]
method[convert, return_type[type[AnnotationDefinition]], modifier[public], parameter[bad]] begin[{]
if[binary_operation[member[.bad], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[t... | annotation[@] identifier[Override] Keyword[public] identifier[AnnotationDefinition] identifier[convert] operator[SEP] identifier[BELAnnotationDefinition] identifier[bad] operator[SEP] {
Keyword[if] operator[SEP] identifier[bad] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] opera... |
@Override
public void onResume() {
super.onResume();
getDialog().setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent keyEvent) {
return keyCode != KeyEvent.ACTION_DOWN;
... | class class_name[name] begin[{]
method[onResume, return_type[void], modifier[public], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=onResume, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
call[.getDialog, paramet... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onResume] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[onResume] operator[SEP] operator[SEP] operator[SEP] identifier[getDialog] operator[SEP] operator[SEP] operator[SEP] identifier[setOnKeyListener] operator[SEP... |
@Override
public void reset(final long mNodeKey) {
super.reset(mNodeKey);
if (mArgs != null) {
for (AbsAxis ax : mArgs) {
ax.reset(mNodeKey);
}
}
} | class class_name[name] begin[{]
method[reset, return_type[void], modifier[public], parameter[mNodeKey]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=mNodeKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reset, postfix_operators=[], prefix_op... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[reset] operator[SEP] Keyword[final] Keyword[long] identifier[mNodeKey] operator[SEP] {
Keyword[super] operator[SEP] identifier[reset] operator[SEP] identifier[mNodeKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mAr... |
public QueueReference build(Map<String, String> params) throws IOException {
return build(params, null,false);
} | class class_name[name] begin[{]
method[build, return_type[type[QueueReference]], modifier[public], parameter[params]] begin[{]
return[call[.build, parameter[member[.params], literal[null], literal[false]]]]
end[}]
END[}] | Keyword[public] identifier[QueueReference] identifier[build] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[build] operator[SEP] identifier[params] , Other[null] ... |
public List<B> getOutcomesByProbability(A first) {
if (counts.containsKey(first)) {
Map<B, Double> sortedMap = MapUtils.reverse(MapUtils.sortByValue(counts.get(first)));
return Lists.newArrayList(sortedMap.keySet());
}
return Collections.emptyList();
} | class class_name[name] begin[{]
method[getOutcomesByProbability, return_type[type[List]], modifier[public], parameter[first]] begin[{]
if[call[counts.containsKey, parameter[member[.first]]]] begin[{]
local_variable[type[Map], sortedMap]
return[call[Lists.newArrayList, pa... | Keyword[public] identifier[List] operator[<] identifier[B] operator[>] identifier[getOutcomesByProbability] operator[SEP] identifier[A] identifier[first] operator[SEP] {
Keyword[if] operator[SEP] identifier[counts] operator[SEP] identifier[containsKey] operator[SEP] identifier[first] operator[SEP] operator[SEP] ... |
@BackpressureSupport(BackpressureKind.FULL)
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Flowable<T> concatArrayEager(SingleSource<? extends T>... sources) {
return Flowable.fromArray(sources).concatMapEager(SingleInternalHelper.<T>toFlowable());
} | class class_name[name] begin[{]
method[concatArrayEager, return_type[type[Flowable]], modifier[public static], parameter[sources]] begin[{]
return[call[Flowable.fromArray, parameter[member[.sources]]]]
end[}]
END[}] | annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[publ... |
void delay(long alreadyElapsed) {
recorder.recordValue(alreadyElapsed);
if (distribution != null) {
long nextPermitted = Math.round(distribution.sample() * 1000000000.0);
if (nextPermitted > alreadyElapsed) {
LockSupport.parkNanos(nextPermitted - alreadyElapsed);
}
}
} | class class_name[name] begin[{]
method[delay, return_type[void], modifier[default], parameter[alreadyElapsed]] begin[{]
call[recorder.recordValue, parameter[member[.alreadyElapsed]]]
if[binary_operation[member[.distribution], !=, literal[null]]] begin[{]
local_variab... | Keyword[void] identifier[delay] operator[SEP] Keyword[long] identifier[alreadyElapsed] operator[SEP] {
identifier[recorder] operator[SEP] identifier[recordValue] operator[SEP] identifier[alreadyElapsed] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[distribution] operator[!=] Other[null] operat... |
static SessionPool createPool(SpannerOptions spannerOptions, DatabaseId db, SpannerImpl spanner) {
return createPool(
spannerOptions.getSessionPoolOptions(),
((GrpcTransportOptions) spannerOptions.getTransportOptions()).getExecutorFactory(),
db,
spanner);
} | class class_name[name] begin[{]
method[createPool, return_type[type[SessionPool]], modifier[static], parameter[spannerOptions, db, spanner]] begin[{]
return[call[.createPool, parameter[call[spannerOptions.getSessionPoolOptions, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=getTran... | Keyword[static] identifier[SessionPool] identifier[createPool] operator[SEP] identifier[SpannerOptions] identifier[spannerOptions] , identifier[DatabaseId] identifier[db] , identifier[SpannerImpl] identifier[spanner] operator[SEP] {
Keyword[return] identifier[createPool] operator[SEP] identifier[spannerOptions... |
private int binaryFirstSearch() {
int low = 0;
int high = count;
int mid = 0;
int compare = 0;
int found = count;
while (low < high) {
mid = (low + high) / 2;
compare = compare(mid);
if (compare < 0) {
... | class class_name[name] begin[{]
method[binaryFirstSearch, return_type[type[int]], modifier[private], parameter[]] begin[{]
local_variable[type[int], low]
local_variable[type[int], high]
local_variable[type[int], mid]
local_variable[type[int], compare]
local_variable[type... | Keyword[private] Keyword[int] identifier[binaryFirstSearch] operator[SEP] operator[SEP] {
Keyword[int] identifier[low] operator[=] Other[0] operator[SEP] Keyword[int] identifier[high] operator[=] identifier[count] operator[SEP] Keyword[int] identifier[mid] operator[=] Other[0] operator[SEP] Keyword[int] identifi... |
public void serviceName_transferCredits_POST(String serviceName, Double credits, String smsAccountTarget) throws IOException {
String qPath = "/sms/{serviceName}/transferCredits";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "credits", credits... | class class_name[name] begin[{]
method[serviceName_transferCredits_POST, return_type[void], modifier[public], parameter[serviceName, credits, smsAccountTarget]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
local_variable[type[HashMap], o]
... | Keyword[public] Keyword[void] identifier[serviceName_transferCredits_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[Double] identifier[credits] , identifier[String] identifier[smsAccountTarget] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qP... |
private static int toWidth(int style) {
switch (style) {
case Calendar.SHORT_FORMAT:
case Calendar.SHORT_STANDALONE:
return DateFormatSymbols.ABBREVIATED;
case Calendar.NARROW_FORMAT:
case Calendar.NARROW_STANDALONE:
return DateForm... | class class_name[name] begin[{]
method[toWidth, return_type[type[int]], modifier[private static], parameter[style]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SHORT_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), MemberReferenc... | Keyword[private] Keyword[static] Keyword[int] identifier[toWidth] operator[SEP] Keyword[int] identifier[style] operator[SEP] {
Keyword[switch] operator[SEP] identifier[style] operator[SEP] {
Keyword[case] identifier[Calendar] operator[SEP] identifier[SHORT_FORMAT] operator[:] Keyword[case] identifier... |
@Override
public AddTagsResult addTags(AddTagsRequest request) {
request = beforeClientExecution(request);
return executeAddTags(request);
} | class class_name[name] begin[{]
method[addTags, return_type[type[AddTagsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeAddTags, parameter[member[.request]]]]
end[}]
END[... | annotation[@] identifier[Override] Keyword[public] identifier[AddTagsResult] identifier[addTags] operator[SEP] identifier[AddTagsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[ret... |
public void removeActiveMessages(int messageCount)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "removeActiveMessages", Integer.valueOf(messageCount));
boolean resumeConsumers = false;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
... | class class_name[name] begin[{]
method[removeActiveMessages, return_type[void], modifier[public], parameter[messageCount]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parame... | Keyword[public] Keyword[void] identifier[removeActiveMessages] operator[SEP] Keyword[int] identifier[messageCount] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[is... |
@SuppressWarnings({ "unchecked", "rawtypes" })
public void activate() throws InvalidStateException {
if (!this.state.isInactive()) {
throw new InvalidStateException("entity " + name + " is in state: "
+ this.state);
}
this.state = ResourceAdaptorEntityState.ACTIVE;
// if slee is running then act... | class class_name[name] begin[{]
method[activate, return_type[void], modifier[public], parameter[]] begin[{]
if[THIS[member[None.state]call[None.isInactive, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Bin... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[public] Keyword[void] identifier[activate] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidStateException] {
Keyword[if] operator[SEP] operator[!] Keyword[this] operator[S... |
public static String changeFormatAndTimeZoneToDefaultUtcFormat(
String dateFormat, String zoneId, String dateString) {
return JMOptional.getOptional(zoneId)
.map(zId -> getTimeAsDefaultUtcFormat(
changeTimestampToLong(dateFormat,
... | class class_name[name] begin[{]
method[changeFormatAndTimeZoneToDefaultUtcFormat, return_type[type[String]], modifier[public static], parameter[dateFormat, zoneId, dateString]] begin[{]
return[call[JMOptional.getOptional, parameter[member[.zoneId]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[changeFormatAndTimeZoneToDefaultUtcFormat] operator[SEP] identifier[String] identifier[dateFormat] , identifier[String] identifier[zoneId] , identifier[String] identifier[dateString] operator[SEP] {
Keyword[return] identifier[JMOptional] operator[SE... |
public static File getParent(File file, int level) {
if (level < 1 || null == file) {
return file;
}
File parentFile;
try {
parentFile = file.getCanonicalFile().getParentFile();
} catch (IOException e) {
throw new IORuntimeException(e);
}
if (1 == level) {
return parentFile;
}
... | class class_name[name] begin[{]
method[getParent, return_type[type[File]], modifier[public static], parameter[file, level]] begin[{]
if[binary_operation[binary_operation[member[.level], <, literal[1]], ||, binary_operation[literal[null], ==, member[.file]]]] begin[{]
return[member[.... | Keyword[public] Keyword[static] identifier[File] identifier[getParent] operator[SEP] identifier[File] identifier[file] , Keyword[int] identifier[level] operator[SEP] {
Keyword[if] operator[SEP] identifier[level] operator[<] Other[1] operator[||] Other[null] operator[==] identifier[file] operator[SEP] {
... |
protected EClient<HttpURLConnection> client() throws CadiException {
try {
if(uri==null) {
Item item = hman.loc.best();
if(item==null) {
throw new CadiException("No service available for " + hman.loc.toString());
}
uri = hman.loc.get(item);
}
return new HClient(ss,uri,connectionTimeout);... | class class_name[name] begin[{]
method[client, return_type[type[EClient]], modifier[protected], parameter[]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(pos... | Keyword[protected] identifier[EClient] operator[<] identifier[HttpURLConnection] operator[>] identifier[client] operator[SEP] operator[SEP] Keyword[throws] identifier[CadiException] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[uri] operator[==] Other[null] operator[SEP] {
ident... |
public void setLoadPermissions(java.util.Collection<LoadPermission> loadPermissions) {
if (loadPermissions == null) {
this.loadPermissions = null;
return;
}
this.loadPermissions = new com.amazonaws.internal.SdkInternalList<LoadPermission>(loadPermissions);
} | class class_name[name] begin[{]
method[setLoadPermissions, return_type[void], modifier[public], parameter[loadPermissions]] begin[{]
if[binary_operation[member[.loadPermissions], ==, literal[null]]] begin[{]
assign[THIS[member[None.loadPermissions]], literal[null]]
... | Keyword[public] Keyword[void] identifier[setLoadPermissions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[LoadPermission] operator[>] identifier[loadPermissions] operator[SEP] {
Keyword[if] operator[SEP] identifier[loadPermissions] oper... |
private boolean containsPlaceholders( final KojiArchiveInfo archive )
{
return contains( trimToEmpty( archive.getArtifactId() ), "${" )
|| contains( trimToEmpty( archive.getGroupId() ), "${" )
|| contains( trimToEmpty( archive.getVersion() ), "${" );
} | class class_name[name] begin[{]
method[containsPlaceholders, return_type[type[boolean]], modifier[private], parameter[archive]] begin[{]
return[binary_operation[binary_operation[call[.contains, parameter[call[.trimToEmpty, parameter[call[archive.getArtifactId, parameter[]]]], literal["${"]]], ||, call[... | Keyword[private] Keyword[boolean] identifier[containsPlaceholders] operator[SEP] Keyword[final] identifier[KojiArchiveInfo] identifier[archive] operator[SEP] {
Keyword[return] identifier[contains] operator[SEP] identifier[trimToEmpty] operator[SEP] identifier[archive] operator[SEP] identifier[getArtifactId] oper... |
private List<String> findMatchesWithLowestScore(final List<ScoredHost> scored) {
final int minScore = scored.get(0).score;
final ImmutableList.Builder<String> minScoreHosts = ImmutableList.builder();
for (final ScoredHost score : scored) {
if (score.score == minScore) {
minScoreHosts.add(score... | class class_name[name] begin[{]
method[findMatchesWithLowestScore, return_type[type[List]], modifier[private], parameter[scored]] begin[{]
local_variable[type[int], minScore]
local_variable[type[ImmutableList], minScoreHosts]
ForStatement(body=BlockStatement(label=None, statements=[IfSt... | Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[findMatchesWithLowestScore] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[ScoredHost] operator[>] identifier[scored] operator[SEP] {
Keyword[final] Keyword[int] identifier[minScore] operator[=] identifi... |
public static MutableTreeNode leftShift(MutableTreeNode self, MutableTreeNode node) {
self.insert(node, self.getChildCount());
return self;
} | class class_name[name] begin[{]
method[leftShift, return_type[type[MutableTreeNode]], modifier[public static], parameter[self, node]] begin[{]
call[self.insert, parameter[member[.node], call[self.getChildCount, parameter[]]]]
return[member[.self]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[MutableTreeNode] identifier[leftShift] operator[SEP] identifier[MutableTreeNode] identifier[self] , identifier[MutableTreeNode] identifier[node] operator[SEP] {
identifier[self] operator[SEP] identifier[insert] operator[SEP] identifier[node] , identifier[self] operato... |
@SuppressFBWarnings("PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS")
public void initServiceRegistryIfNecessary() {
val size = this.serviceRegistry.size();
LOGGER.trace("Service registry contains [{}] service definition(s)", size);
LOGGER.warn("Service registry [{}] will be auto-initialized from JSO... | class class_name[name] begin[{]
method[initServiceRegistryIfNecessary, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[val], size]
call[LOGGER.trace, parameter[literal["Service registry contains [{}] service definition(s)"], member[.size]]]
... | annotation[@] identifier[SuppressFBWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[initServiceRegistryIfNecessary] operator[SEP] operator[SEP] {
identifier[val] identifier[size] operator[=] Keyword[this] operator[SEP] identifier[serviceRegistry] operator[SEP] identi... |
public String principal() {
if (getSubject() != null) {
// Get the principal to print out
Object principal = getSubject().getPrincipal();
return principal.toString();
}
return "Guest";
} | class class_name[name] begin[{]
method[principal, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[.getSubject, parameter[]], !=, literal[null]]] begin[{]
local_variable[type[Object], principal]
return[call[principal.toString, p... | Keyword[public] identifier[String] identifier[principal] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[getSubject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[Object] identifier[principal] operator[=] identifier[getSubject] operator[SEP] operato... |
public static Pattern newMustacheTagPattern(Configuration configuration) {
StringBuilder regex = new StringBuilder();
regex.append(Pattern.quote(configuration
.getStringPropertyValue(EngineConfigurationKey.START_DELIMITER)));
regex.append(".*?");
regex.append(Pattern.quot... | class class_name[name] begin[{]
method[newMustacheTagPattern, return_type[type[Pattern]], modifier[public static], parameter[configuration]] begin[{]
local_variable[type[StringBuilder], regex]
call[regex.append, parameter[call[Pattern.quote, parameter[call[configuration.getStringPropert... | Keyword[public] Keyword[static] identifier[Pattern] identifier[newMustacheTagPattern] operator[SEP] identifier[Configuration] identifier[configuration] operator[SEP] {
identifier[StringBuilder] identifier[regex] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifi... |
public void write(byte[] b, int off, int len) throws IOException
{
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15
logger.logp(Level.FINE, CLASS_NAME,"write", "Writing");
}
if (_observer != null)
_obser... | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[b, off, len]] begin[{]
if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{]
... | Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] ope... |
@Override
public void run() // F73234
{
synchronized (this) // d601399
{
if (ivIsCanceled) // d583637
{
//if this instance has been canceled, we do no more processing.
// this also guarantees that a future alarm is not created.
... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[THIS[]] BEGIN[{]
if[member[.ivIsCanceled]] begin[{]
return[None]
else begin[{]
None
end[}]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] {
Keyword[if] operator[SEP] identifier[ivIsCanceled] operator[SEP] {
Keyword[return] operator[SEP]
} ... |
public static Field getField(String fieldName, Object object) {
return getField(fieldName, object.getClass());
} | class class_name[name] begin[{]
method[getField, return_type[type[Field]], modifier[public static], parameter[fieldName, object]] begin[{]
return[call[.getField, parameter[member[.fieldName], call[object.getClass, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Field] identifier[getField] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[object] operator[SEP] {
Keyword[return] identifier[getField] operator[SEP] identifier[fieldName] , identifier[object] operator[SEP] identifier[getClass] ... |
public static int pitch_fr3( /* output: integer part of pitch period */
float exc[],int excs, /* input : excitation buffer */
float xn[],int xns, /* input : target vector */
float h[], int hs, /* input : impulse response of fi... | class class_name[name] begin[{]
method[pitch_fr3, return_type[type[int]], modifier[public static], parameter[exc, excs, xn, xns, h, hs, l_subfr, t0_min, t0_max, i_subfr, pit_frac]] begin[{]
local_variable[type[int], i]
local_variable[type[int], lag]
local_variable[type[float], max]
... | Keyword[public] Keyword[static] Keyword[int] identifier[pitch_fr3] operator[SEP] Keyword[float] identifier[exc] operator[SEP] operator[SEP] , Keyword[int] identifier[excs] , Keyword[float] identifier[xn] operator[SEP] operator[SEP] , Keyword[int] identifier[xns] , Keyword[float] identifier[h] operator[SEP] operator... |
public Observable<ServiceResponse<ManagementLockObjectInner>> createOrUpdateByScopeWithServiceResponseAsync(String scope, String lockName, ManagementLockObjectInner parameters) {
if (scope == null) {
throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
}
... | class class_name[name] begin[{]
method[createOrUpdateByScopeWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[scope, lockName, parameters]] begin[{]
if[binary_operation[member[.scope], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCre... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ManagementLockObjectInner] operator[>] operator[>] identifier[createOrUpdateByScopeWithServiceResponseAsync] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[lockName] , identifier[M... |
@SuppressWarnings("unchecked")
public static AppYaml parse(InputStream input) throws AppEngineException {
try {
// our needs are simple so just load using primitive objects
Yaml yaml = new Yaml(new SafeConstructor());
Map<String, ?> contents = (Map<String, ?>) yaml.load(input);
return new ... | class class_name[name] begin[{]
method[parse, return_type[type[AppYaml]], modifier[public static], parameter[input]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[], body=N... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[AppYaml] identifier[parse] operator[SEP] identifier[InputStream] identifier[input] operator[SEP] Keyword[throws] identifier[AppEngineException] {
Keyword[try] {
identifier[... |
private void createSegment() throws IOException {
segmentsAttempted = 0;
bytesWritten = 0;
boolean success = false;
while (!success) {
Path path = workOutputPath.suffix(String.format(extensionFormat, segmentsCreated, segmentsAttempted));
FileSystem fs = path.getF... | class class_name[name] begin[{]
method[createSegment, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.segmentsAttempted], literal[0]]
assign[member[.bytesWritten], literal[0]]
local_variable[type[boolean], success]
while[member[... | Keyword[private] Keyword[void] identifier[createSegment] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[segmentsAttempted] operator[=] Other[0] operator[SEP] identifier[bytesWritten] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[bool... |
private void checkVitalService(final Class service, final Throwable t) {
if (t != null) {
logger.error("Vital service {} failed to start with {}, aborting.", service.getSimpleName(), t.getMessage() );
System.err.println("Vital service " + service.getSimpleName() + " failed to start with " + t.getMessage() + "... | class class_name[name] begin[{]
method[checkVitalService, return_type[void], modifier[private], parameter[service, t]] begin[{]
if[binary_operation[member[.t], !=, literal[null]]] begin[{]
call[logger.error, parameter[literal["Vital service {} failed to start with {}, ab... | Keyword[private] Keyword[void] identifier[checkVitalService] operator[SEP] Keyword[final] identifier[Class] identifier[service] , Keyword[final] identifier[Throwable] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[SEP] {
identifier[logger] oper... |
public final String dumpConfiguration() {
if (properties.isEmpty())
return "No configuration settings stored";
StringBuilder response = new StringBuilder("TSD Configuration:\n");
response.append("File [" + config_location + "]\n");
int line = 0;
for (Map.Entry<String, String> entry : properti... | class class_name[name] begin[{]
method[dumpConfiguration, return_type[type[String]], modifier[final public], parameter[]] begin[{]
if[call[properties.isEmpty, parameter[]]] begin[{]
return[literal["No configuration settings stored"]]
else begin[{]
None
end[}]
local_varia... | Keyword[public] Keyword[final] identifier[String] identifier[dumpConfiguration] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[properties] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[StringBuilder] identi... |
@VisibleForTesting
C createServiceClient(Object soapClient, D adsServiceDescriptor, S adsSession) {
return adsServiceClientFactory.create(soapClient, adsServiceDescriptor, adsSession);
} | class class_name[name] begin[{]
method[createServiceClient, return_type[type[C]], modifier[default], parameter[soapClient, adsServiceDescriptor, adsSession]] begin[{]
return[call[adsServiceClientFactory.create, parameter[member[.soapClient], member[.adsServiceDescriptor], member[.adsSession]]]]
end... | annotation[@] identifier[VisibleForTesting] identifier[C] identifier[createServiceClient] operator[SEP] identifier[Object] identifier[soapClient] , identifier[D] identifier[adsServiceDescriptor] , identifier[S] identifier[adsSession] operator[SEP] {
Keyword[return] identifier[adsServiceClientFactory] operator[... |
public static <II extends ImageGray<II>>
FastHessianFeatureDetector<II> fastHessian( @Nullable ConfigFastHessian config ) {
if( config == null )
config = new ConfigFastHessian();
config.checkValidity();
// ignore border is overwritten by Fast Hessian at detection time
NonMaxSuppression extractor = Factory... | class class_name[name] begin[{]
method[fastHessian, return_type[type[FastHessianFeatureDetector]], modifier[public static], parameter[config]] begin[{]
if[binary_operation[member[.config], ==, literal[null]]] begin[{]
assign[member[.config], ClassCreator(arguments=[], body=None, con... | Keyword[public] Keyword[static] operator[<] identifier[II] Keyword[extends] identifier[ImageGray] operator[<] identifier[II] operator[>] operator[>] identifier[FastHessianFeatureDetector] operator[<] identifier[II] operator[>] identifier[fastHessian] operator[SEP] annotation[@] identifier[Nullable] identifier[ConfigFas... |
@Override
public <T extends Endpoint> Strategy<T> create() {
return new XorShiftRandomStrategy<T>(broker, preferLocal);
} | class class_name[name] begin[{]
method[create, return_type[type[Strategy]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=broker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=preferLocal, postfix_operators=[... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Endpoint] operator[>] identifier[Strategy] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[XorShiftRandomStrategy] operator[<] id... |
public void rollbackBreakIteration(List objectsToStore)
{
// now we mix up different api's and use PB-api too
log.info("rollbackBreakIteration");
/*
store list of objects, then get these objects with Iterator, start
iteration, then break
*/
storeObject... | class class_name[name] begin[{]
method[rollbackBreakIteration, return_type[void], modifier[public], parameter[objectsToStore]] begin[{]
call[log.info, parameter[literal["rollbackBreakIteration"]]]
call[.storeObjects, parameter[member[.objectsToStore]]]
local_variable[typ... | Keyword[public] Keyword[void] identifier[rollbackBreakIteration] operator[SEP] identifier[List] identifier[objectsToStore] operator[SEP] {
identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[storeObjects] operator[SEP] identifier[objectsToStore] ope... |
public void shutdownNow() throws Exception {
this.server.stop();
this.server.destroy();
getFlowRunnerManager().shutdownNow();
this.mbeanRegistrationManager.closeMBeans();
} | class class_name[name] begin[{]
method[shutdownNow, return_type[void], modifier[public], parameter[]] begin[{]
THIS[member[None.server]call[None.stop, parameter[]]]
THIS[member[None.server]call[None.destroy, parameter[]]]
call[.getFlowRunnerManager, parameter[]]
... | Keyword[public] Keyword[void] identifier[shutdownNow] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[this] operator[SEP] identifier[server] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[server] operator[SEP] identifier... |
public PagedList<ExpressRouteCircuitInner> list() {
ServiceResponse<Page<ExpressRouteCircuitInner>> response = listSinglePageAsync().toBlocking().single();
return new PagedList<ExpressRouteCircuitInner>(response.body()) {
@Override
public Page<ExpressRouteCircuitInner> nextPage(S... | class class_name[name] begin[{]
method[list, return_type[type[PagedList]], modifier[public], parameter[]] begin[{]
local_variable[type[ServiceResponse], response]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=body, postfix_operators=[], prefix_operators=[], qualifier=resp... | Keyword[public] identifier[PagedList] operator[<] identifier[ExpressRouteCircuitInner] operator[>] identifier[list] operator[SEP] operator[SEP] {
identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ExpressRouteCircuitInner] operator[>] operator[>] identifier[response] operator[=] iden... |
public boolean deleteMetric(Metric metric) {
String metricName = metric.getName();
checkMetricIsEmpty(metricName);
QueryPart<Metric> queryPart = new Query<Metric>("metrics")
.path(metricName, true);
return httpClientManager.updateMetaData(queryPart, delete());
} | class class_name[name] begin[{]
method[deleteMetric, return_type[type[boolean]], modifier[public], parameter[metric]] begin[{]
local_variable[type[String], metricName]
call[.checkMetricIsEmpty, parameter[member[.metricName]]]
local_variable[type[QueryPart], queryPart]
re... | Keyword[public] Keyword[boolean] identifier[deleteMetric] operator[SEP] identifier[Metric] identifier[metric] operator[SEP] {
identifier[String] identifier[metricName] operator[=] identifier[metric] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[checkMetricIsEmpty] operato... |
public void dereferenceLocalisation(LocalizationPoint ptoPMessageItemStream)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "dereferenceLocalisation", ptoPMessageItemStream);
// Reset the reference to the local messages itemstream if it is being removed.
synchr... | class class_name[name] begin[{]
method[dereferenceLocalisation, return_type[void], modifier[public], parameter[ptoPMessageItemStream]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.e... | Keyword[public] Keyword[void] identifier[dereferenceLocalisation] operator[SEP] identifier[LocalizationPoint] identifier[ptoPMessageItemStream] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc... |
private void updateProgress() {
// Start panel data settings
HostProcess hp = getSelectedHostProcess();
if (scan.getHostProcesses() != null && hp != null) {
// Update the main table entries
model.updateValues(scan, hp);
if (scan.isStopped()) {
t... | class class_name[name] begin[{]
method[updateProgress, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[HostProcess], hp]
if[binary_operation[binary_operation[call[scan.getHostProcesses, parameter[]], !=, literal[null]], &&, binary_operation[member[.hp], !... | Keyword[private] Keyword[void] identifier[updateProgress] operator[SEP] operator[SEP] {
identifier[HostProcess] identifier[hp] operator[=] identifier[getSelectedHostProcess] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scan] operator[SEP] identifier[getHostProcesses] operator[SE... |
public String processOutbound(final HttpServletRequest request, final HttpServletResponse response,
final RewriteRule rule, final String url)
{
String result = url;
if ((rule != null) && rule.isOutbound() && rule.matches(url))
{
for (Processor p : processors)
{
... | class class_name[name] begin[{]
method[processOutbound, return_type[type[String]], modifier[public], parameter[request, response, rule, url]] begin[{]
local_variable[type[String], result]
if[binary_operation[binary_operation[binary_operation[member[.rule], !=, literal[null]], &&, call[r... | Keyword[public] identifier[String] identifier[processOutbound] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[RewriteRule] identifier[rule] , Keyword[final] identifier[String] identifier... |
public void removeBlockQuotePrefix()
{
Line line = this.lines;
while (line != null)
{
if (!line.isEmpty)
{
if (line.value.charAt(line.leading) == '>')
{
int rem = line.leading + 1;
if (line.leadin... | class class_name[name] begin[{]
method[removeBlockQuotePrefix, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Line], line]
while[binary_operation[member[.line], !=, literal[null]]] begin[{]
if[member[line.isEmpty]] begin[{]
... | Keyword[public] Keyword[void] identifier[removeBlockQuotePrefix] operator[SEP] operator[SEP] {
identifier[Line] identifier[line] operator[=] Keyword[this] operator[SEP] identifier[lines] operator[SEP] Keyword[while] operator[SEP] identifier[line] operator[!=] Other[null] operator[SEP] {
Keyword[if] op... |
void triggerControlTask() {
migrationQueue.clear();
if (!node.getClusterService().isJoined()) {
logger.fine("Node is not joined, will not trigger ControlTask");
return;
}
if (!node.isMaster()) {
logger.fine("Node is not master, will not trigger Control... | class class_name[name] begin[{]
method[triggerControlTask, return_type[void], modifier[default], parameter[]] begin[{]
call[migrationQueue.clear, parameter[]]
if[call[node.getClusterService, parameter[]]] begin[{]
call[logger.fine, parameter[literal["Node... | Keyword[void] identifier[triggerControlTask] operator[SEP] operator[SEP] {
identifier[migrationQueue] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[node] operator[SEP] identifier[getClusterService] operator[SEP] operator[SEP] operator[S... |
public List<Milestone> getMilestones(Object projectIdOrPath) throws GitLabApiException {
return (getMilestones(projectIdOrPath, getDefaultPerPage()).all());
} | class class_name[name] begin[{]
method[getMilestones, return_type[type[List]], modifier[public], parameter[projectIdOrPath]] begin[{]
return[call[.getMilestones, parameter[member[.projectIdOrPath], call[.getDefaultPerPage, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[Milestone] operator[>] identifier[getMilestones] operator[SEP] identifier[Object] identifier[projectIdOrPath] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[SEP] identifier[getMilestones] operator[SEP] identifier[pro... |
public void setSliderPosition(float x, float y) {
if (x > 255) {
x = 255;
}
if (x < 0) {
x = 0;
}
if (y > 255) {
y = 255;
}
if (y < 0) {
y = 0;
}
x -= 7;
y -= 7;
m_sli... | class class_name[name] begin[{]
method[setSliderPosition, return_type[void], modifier[public], parameter[x, y]] begin[{]
if[binary_operation[member[.x], >, literal[255]]] begin[{]
assign[member[.x], literal[255]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[void] identifier[setSliderPosition] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] {
Keyword[if] operator[SEP] identifier[x] operator[>] Other[255] operator[SEP] {
identifier[x] operator[=] Other[255] operator[SEP]
}
Keywo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.