code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public void excl(int x) {
Assert.check(currentState != BitsState.UNKNOWN);
Assert.check(x >= 0);
sizeTo((x >>> wordshift) + 1);
bits[x >>> wordshift] = bits[x >>> wordshift] &
~(1 << (x & wordmask));
currentState = BitsState.NORMAL;
} | class class_name[name] begin[{]
method[excl, return_type[void], modifier[public], parameter[x]] begin[{]
call[Assert.check, parameter[binary_operation[member[.currentState], !=, member[BitsState.UNKNOWN]]]]
call[Assert.check, parameter[binary_operation[member[.x], >=, literal[0]... | Keyword[public] Keyword[void] identifier[excl] operator[SEP] Keyword[int] identifier[x] operator[SEP] {
identifier[Assert] operator[SEP] identifier[check] operator[SEP] identifier[currentState] operator[!=] identifier[BitsState] operator[SEP] identifier[UNKNOWN] operator[SEP] operator[SEP] identifier[Assert] ope... |
public ItemTransformComponent thirdPerson(Matrix4f left, Matrix4f right)
{
this.thirdPersonLeftHand = left;
this.thirdPersonRightHand = right;
return this;
} | class class_name[name] begin[{]
method[thirdPerson, return_type[type[ItemTransformComponent]], modifier[public], parameter[left, right]] begin[{]
assign[THIS[member[None.thirdPersonLeftHand]], member[.left]]
assign[THIS[member[None.thirdPersonRightHand]], member[.right]]
... | Keyword[public] identifier[ItemTransformComponent] identifier[thirdPerson] operator[SEP] identifier[Matrix4f] identifier[left] , identifier[Matrix4f] identifier[right] operator[SEP] {
Keyword[this] operator[SEP] identifier[thirdPersonLeftHand] operator[=] identifier[left] operator[SEP] Keyword[this] operator[SE... |
public void log(Level level, String msg, Throwable thrown)
{
if (isLoggable(level))
{
MyfacesLogRecord lr = new MyfacesLogRecord(level, msg);
lr.setThrown(thrown);
doLog(lr);
}
} | class class_name[name] begin[{]
method[log, return_type[void], modifier[public], parameter[level, msg, thrown]] begin[{]
if[call[.isLoggable, parameter[member[.level]]]] begin[{]
local_variable[type[MyfacesLogRecord], lr]
call[lr.setThrown, parameter[member[.... | Keyword[public] Keyword[void] identifier[log] operator[SEP] identifier[Level] identifier[level] , identifier[String] identifier[msg] , identifier[Throwable] identifier[thrown] operator[SEP] {
Keyword[if] operator[SEP] identifier[isLoggable] operator[SEP] identifier[level] operator[SEP] operator[SEP] {
... |
@BetaApi
public final Policy getIamPolicySnapshot(ProjectGlobalSnapshotResourceName resource) {
GetIamPolicySnapshotHttpRequest request =
GetIamPolicySnapshotHttpRequest.newBuilder()
.setResource(resource == null ? null : resource.toString())
.build();
return getIamPolicySnaps... | class class_name[name] begin[{]
method[getIamPolicySnapshot, return_type[type[Policy]], modifier[final public], parameter[resource]] begin[{]
local_variable[type[GetIamPolicySnapshotHttpRequest], request]
return[call[.getIamPolicySnapshot, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Policy] identifier[getIamPolicySnapshot] operator[SEP] identifier[ProjectGlobalSnapshotResourceName] identifier[resource] operator[SEP] {
identifier[GetIamPolicySnapshotHttpRequest] identifier[request] operator[=] identifier[GetIamPolicy... |
public static Set<Policy> policies(Config config) {
HillClimberWindowTinyLfuSettings settings = new HillClimberWindowTinyLfuSettings(config);
Set<Policy> policies = new HashSet<>();
for (HillClimberType climber : settings.strategy()) {
for (double percentMain : settings.percentMain()) {
polici... | class class_name[name] begin[{]
method[policies, return_type[type[Set]], modifier[public static], parameter[config]] begin[{]
local_variable[type[HillClimberWindowTinyLfuSettings], settings]
local_variable[type[Set], policies]
ForStatement(body=BlockStatement(label=None, statements=[For... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Policy] operator[>] identifier[policies] operator[SEP] identifier[Config] identifier[config] operator[SEP] {
identifier[HillClimberWindowTinyLfuSettings] identifier[settings] operator[=] Keyword[new] identifier[HillClimberWindowTinyLfuSetting... |
public ServiceFuture<GenericResourceInner> getAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, final ServiceCallback<GenericResourceInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceR... | class class_name[name] begin[{]
method[getAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.get... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[GenericResourceInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceProviderNamespace] , identifier[String] identifier[parentResourcePath] , identifier[String] id... |
public void setIdleMin(int min)
{
if (min == _idleMin) {
// avoid update() overhead if unchanged
return;
}
if (min <= 0) {
min = DEFAULT_IDLE_MIN;
}
if (_threadMax < min)
throw new ConfigException(L.l("IdleMin ({0}) must be less than ThreadMax ({1})", min, _thread... | class class_name[name] begin[{]
method[setIdleMin, return_type[void], modifier[public], parameter[min]] begin[{]
if[binary_operation[member[.min], ==, member[._idleMin]]] begin[{]
return[None]
else begin[{]
None
end[}]
if[binary_operation[member[.min]... | Keyword[public] Keyword[void] identifier[setIdleMin] operator[SEP] Keyword[int] identifier[min] operator[SEP] {
Keyword[if] operator[SEP] identifier[min] operator[==] identifier[_idleMin] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[min] operator[<... |
public static double[] plusEquals(final double[] v1, final double[] v2) {
assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
for(int i = 0; i < v1.length; i++) {
v1[i] += v2[i];
}
return v1;
} | class class_name[name] begin[{]
method[plusEquals, return_type[type[double]], modifier[public static], parameter[v1, v2]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=v1, selectors=[]), operandr=MemberRef... | Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[plusEquals] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[v1] , Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[v2] operator[SEP] {
Keyword[assert] identifier[v1] op... |
@Override
protected Options getOptions() {
final Options options = super.getOptions();
final Option urlOption =
new Option("u",
"the page that is the startpoint of the crawl, examle http://mydomain.com/mypage");
urlOption.setLongOpt(URL);
urlOption.setArgName("URL");
urlOption... | class class_name[name] begin[{]
method[getOptions, return_type[type[Options]], modifier[protected], parameter[]] begin[{]
local_variable[type[Options], options]
local_variable[type[Option], urlOption]
call[urlOption.setLongOpt, parameter[member[.URL]]]
call[urlOp... | annotation[@] identifier[Override] Keyword[protected] identifier[Options] identifier[getOptions] operator[SEP] operator[SEP] {
Keyword[final] identifier[Options] identifier[options] operator[=] Keyword[super] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier... |
public static Map<TypeDescription, Class<?>> load(ClassLoader classLoader, Map<TypeDescription, byte[]> types) {
return load(classLoader,
types,
ClassLoadingStrategy.NO_PROTECTION_DOMAIN,
PersistenceHandler.LATENT,
PackageDefinitionStrategy.Trivial... | class class_name[name] begin[{]
method[load, return_type[type[Map]], modifier[public static], parameter[classLoader, types]] begin[{]
return[call[.load, parameter[member[.classLoader], member[.types], member[ClassLoadingStrategy.NO_PROTECTION_DOMAIN], member[PersistenceHandler.LATENT], member[PackageDe... | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[TypeDescription] , identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[load] operator[SEP] identifier[ClassLoader] identifier[classLoader] , identifier[Map] operator[<] identifier[TypeDescription] , Keyword[byte] operator... |
public static double evaluate( PlaneGeneral3D_F64 plane , Point3D_F64 point ) {
return plane.A*point.x + plane.B*point.y + plane.C*point.z - plane.D;
} | class class_name[name] begin[{]
method[evaluate, return_type[type[double]], modifier[public static], parameter[plane, point]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[member[plane.A], *, member[point.x]], +, binary_operation[member[plane.B], *, member[point.y]... | Keyword[public] Keyword[static] Keyword[double] identifier[evaluate] operator[SEP] identifier[PlaneGeneral3D_F64] identifier[plane] , identifier[Point3D_F64] identifier[point] operator[SEP] {
Keyword[return] identifier[plane] operator[SEP] identifier[A] operator[*] identifier[point] operator[SEP] identifier[x] ... |
private static String getCanonicalTypeName(DeclaredType declaredType) {
List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
if (!typeArguments.isEmpty()) {
StringBuilder typeString = new StringBuilder(declaredType.asElement().toString());
typeString.append('<');
for (int i = 0; i < ... | class class_name[name] begin[{]
method[getCanonicalTypeName, return_type[type[String]], modifier[private static], parameter[declaredType]] begin[{]
local_variable[type[List], typeArguments]
if[call[typeArguments.isEmpty, parameter[]]] begin[{]
local_variable[type[StringBuild... | Keyword[private] Keyword[static] identifier[String] identifier[getCanonicalTypeName] operator[SEP] identifier[DeclaredType] identifier[declaredType] operator[SEP] {
identifier[List] operator[<] operator[?] Keyword[extends] identifier[TypeMirror] operator[>] identifier[typeArguments] operator[=] identifier[declar... |
public boolean supportsFeature(Jid jid, CharSequence feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return supportsFeatures(jid, feature);
} | class class_name[name] begin[{]
method[supportsFeature, return_type[type[boolean]], modifier[public], parameter[jid, feature]] begin[{]
return[call[.supportsFeatures, parameter[member[.jid], member[.feature]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[supportsFeature] operator[SEP] identifier[Jid] identifier[jid] , identifier[CharSequence] identifier[feature] operator[SEP] Keyword[throws] identifier[NoResponseException] , identifier[XMPPErrorException] , identifier[NotConnectedException] , identifier[InterruptedExcepti... |
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.EPG__PAGE_NAME:
setPageName(PAGE_NAME_EDEFAULT);
return;
case AfplibPackage.EPG__TRIPLETS:
getTriplets().clear();
return;
}
super.eUnset(featureID);
} | class class_name[name] begin[{]
method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=EPG__PAGE_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Stat... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[EPG__PAGE_NAME] oper... |
public static double getUpperBound(final int numStdDev, final Memory srcMem) {
return Sketch.upperBound(getRetainedEntries(srcMem), getThetaLong(srcMem), numStdDev, getEmpty(srcMem));
} | class class_name[name] begin[{]
method[getUpperBound, return_type[type[double]], modifier[public static], parameter[numStdDev, srcMem]] begin[{]
return[call[Sketch.upperBound, parameter[call[.getRetainedEntries, parameter[member[.srcMem]]], call[.getThetaLong, parameter[member[.srcMem]]], member[.numSt... | Keyword[public] Keyword[static] Keyword[double] identifier[getUpperBound] operator[SEP] Keyword[final] Keyword[int] identifier[numStdDev] , Keyword[final] identifier[Memory] identifier[srcMem] operator[SEP] {
Keyword[return] identifier[Sketch] operator[SEP] identifier[upperBound] operator[SEP] identifier[getRet... |
@Transformer(requireTemplate = true)
public static String i18n(Object key, Object... args) {
return i18n(null, key, args);
} | class class_name[name] begin[{]
method[i18n, return_type[type[String]], modifier[public static], parameter[key, args]] begin[{]
return[call[.i18n, parameter[literal[null], member[.key], member[.args]]]]
end[}]
END[}] | annotation[@] identifier[Transformer] operator[SEP] identifier[requireTemplate] operator[=] literal[boolean] operator[SEP] Keyword[public] Keyword[static] identifier[String] identifier[i18n] operator[SEP] identifier[Object] identifier[key] , identifier[Object] operator[...] identifier[args] operator[SEP] {
Keyw... |
public static boolean validateTables(final Document doc) {
final NodeList tables = doc.getElementsByTagName("table");
for (int i = 0; i < tables.getLength(); i++) {
final Element table = (Element) tables.item(i);
if (!validateTableRows(table)) {
return false;
... | class class_name[name] begin[{]
method[validateTables, return_type[type[boolean]], modifier[public static], parameter[doc]] begin[{]
local_variable[type[NodeList], tables]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDecl... | Keyword[public] Keyword[static] Keyword[boolean] identifier[validateTables] operator[SEP] Keyword[final] identifier[Document] identifier[doc] operator[SEP] {
Keyword[final] identifier[NodeList] identifier[tables] operator[=] identifier[doc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[Str... |
public void setVpcIds(java.util.Collection<String> vpcIds) {
if (vpcIds == null) {
this.vpcIds = null;
return;
}
this.vpcIds = new com.amazonaws.internal.SdkInternalList<String>(vpcIds);
} | class class_name[name] begin[{]
method[setVpcIds, return_type[void], modifier[public], parameter[vpcIds]] begin[{]
if[binary_operation[member[.vpcIds], ==, literal[null]]] begin[{]
assign[THIS[member[None.vpcIds]], literal[null]]
return[None]
else beg... | Keyword[public] Keyword[void] identifier[setVpcIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[vpcIds] operator[SEP] {
Keyword[if] operator[SEP] identifier[vpcIds] operator[==] Other[null] operator[SEP] ... |
@Override
@SuppressWarnings("unchecked")
public <E> Comparator<E> getOrderBy() {
return ObjectUtils.defaultIfNull(ComparatorHolder.get(), ObjectUtils.defaultIfNull(
orderBy, ComparableComparator.INSTANCE));
} | class class_name[name] begin[{]
method[getOrderBy, return_type[type[Comparator]], modifier[public], parameter[]] begin[{]
return[call[ObjectUtils.defaultIfNull, parameter[call[ComparatorHolder.get, parameter[]], call[ObjectUtils.defaultIfNull, parameter[member[.orderBy], member[ComparableComparator.INS... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[E] operator[>] identifier[Comparator] operator[<] identifier[E] operator[>] identifier[getOrderBy] operator[SEP] operator[SEP] {
Keyword[return] identif... |
public void addFile(String zipEntry, String filename) throws IOException {
addFile(zipEntry, new File(filename));
} | class class_name[name] begin[{]
method[addFile, return_type[void], modifier[public], parameter[zipEntry, filename]] begin[{]
call[.addFile, parameter[member[.zipEntry], ClassCreator(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]... | Keyword[public] Keyword[void] identifier[addFile] operator[SEP] identifier[String] identifier[zipEntry] , identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[addFile] operator[SEP] identifier[zipEntry] , Keyword[new] identifier[File] operator[SEP] identifi... |
public static Application asApplication(Object context) {
if(ContextUtils.isApplication(context))
return Application.class.cast(context);
else
return ContextUtils.asActivity(context).getApplication();
} | class class_name[name] begin[{]
method[asApplication, return_type[type[Application]], modifier[public static], parameter[context]] begin[{]
if[call[ContextUtils.isApplication, parameter[member[.context]]]] begin[{]
return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, sel... | Keyword[public] Keyword[static] identifier[Application] identifier[asApplication] operator[SEP] identifier[Object] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] identifier[ContextUtils] operator[SEP] identifier[isApplication] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[r... |
public void writePreamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
writer.putNextEntry(new ZipEntry("content.xml"));
writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
writer.write(
"<office:document-content xmlns:office=\"urn:oasis:names:... | class class_name[name] begin[{]
method[writePreamble, return_type[void], modifier[public], parameter[util, writer]] begin[{]
call[writer.putNextEntry, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="content.xml")], body=N... | Keyword[public] Keyword[void] identifier[writePreamble] operator[SEP] Keyword[final] identifier[XMLUtil] identifier[util] , Keyword[final] identifier[ZipUTF8Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writer] operator[SEP] identifier[putNextEntry] operator[SEP] ... |
public void buildInterfaceSummary(XMLNode node, Content packageSummaryContentTree) {
String interfaceTableSummary =
configuration.getText("doclet.Member_Table_Summary",
configuration.getText("doclet.Interface_Summary"),
configuration.getText("doclet.interfaces"));... | class class_name[name] begin[{]
method[buildInterfaceSummary, return_type[void], modifier[public], parameter[node, packageSummaryContentTree]] begin[{]
local_variable[type[String], interfaceTableSummary]
local_variable[type[String], interfaceTableHeader]
local_variable[type[ClassDoc], i... | Keyword[public] Keyword[void] identifier[buildInterfaceSummary] operator[SEP] identifier[XMLNode] identifier[node] , identifier[Content] identifier[packageSummaryContentTree] operator[SEP] {
identifier[String] identifier[interfaceTableSummary] operator[=] identifier[configuration] operator[SEP] identifier[getTe... |
private static String arrayToString(int[] x) {
StringBuilder sb = new StringBuilder("(");
for (int j = 0; j < x.length; j++) {
sb.append(x[j]);
if (j != x.length - 1) {
sb.append(", ");
}
}
sb.append(")");
return sb.toString();
} | class class_name[name] begin[{]
method[arrayToString, return_type[type[String]], modifier[private static], parameter[x]] begin[{]
local_variable[type[StringBuilder], sb]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberRef... | Keyword[private] Keyword[static] identifier[String] identifier[arrayToString] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[x] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] ... |
public boolean isReplicationActive(final String iClusterName, final String iLocalNode) {
final Collection<String> servers = getClusterConfiguration(iClusterName).field(SERVERS);
if (servers != null && !servers.isEmpty()) {
return true;
}
return false;
} | class class_name[name] begin[{]
method[isReplicationActive, return_type[type[boolean]], modifier[public], parameter[iClusterName, iLocalNode]] begin[{]
local_variable[type[Collection], servers]
if[binary_operation[binary_operation[member[.servers], !=, literal[null]], &&, call[servers.i... | Keyword[public] Keyword[boolean] identifier[isReplicationActive] operator[SEP] Keyword[final] identifier[String] identifier[iClusterName] , Keyword[final] identifier[String] identifier[iLocalNode] operator[SEP] {
Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[servers... |
public static String last(String string, char separator)
{
if(string == null) {
return null;
}
if(string.isEmpty()) {
return "";
}
return string.substring(string.lastIndexOf(separator) + 1);
} | class class_name[name] begin[{]
method[last, return_type[type[String]], modifier[public static], parameter[string, separator]] begin[{]
if[binary_operation[member[.string], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
i... | Keyword[public] Keyword[static] identifier[String] identifier[last] operator[SEP] identifier[String] identifier[string] , Keyword[char] identifier[separator] operator[SEP] {
Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]... |
public Property build() {
if (null == type) {
throw new IllegalStateException("type is required");
}
if (null == name) {
throw new IllegalStateException("name is required");
}
return PropertyUtil.forType(
type,
name,
... | class class_name[name] begin[{]
method[build, return_type[type[Property]], modifier[public], parameter[]] begin[{]
if[binary_operation[literal[null], ==, member[.type]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qua... | Keyword[public] identifier[Property] identifier[build] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[type] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
... |
public void save(File... files) throws IOException {
Nd4j.saveBinary(getMin(), files[0]);
Nd4j.saveBinary(getMax(), files[1]);
if (isFitLabel()) {
Nd4j.saveBinary(getLabelMin(), files[2]);
Nd4j.saveBinary(getLabelMax(), files[3]);
}
} | class class_name[name] begin[{]
method[save, return_type[void], modifier[public], parameter[files]] begin[{]
call[Nd4j.saveBinary, parameter[call[.getMin, parameter[]], member[.files]]]
call[Nd4j.saveBinary, parameter[call[.getMax, parameter[]], member[.files]]]
... | Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[File] operator[...] identifier[files] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Nd4j] operator[SEP] identifier[saveBinary] operator[SEP] identifier[getMin] operator[SEP] operator[SEP] , identifier[files] operator[SE... |
static AttrInactivity createFromString(final String str)
throws BOSHException {
if (str == null) {
return null;
} else {
return new AttrInactivity(str);
}
} | class class_name[name] begin[{]
method[createFromString, return_type[type[AttrInactivity]], modifier[static], parameter[str]] begin[{]
if[binary_operation[member[.str], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
return[ClassCreator(arguments... | Keyword[static] identifier[AttrInactivity] identifier[createFromString] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] Keyword[throws] identifier[BOSHException] {
Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[nul... |
public static String valueOf(char source[], int start, int limit, int offset16) {
switch (bounds(source, start, limit, offset16)) {
case LEAD_SURROGATE_BOUNDARY:
return new String(source, start + offset16, 2);
case TRAIL_SURROGATE_BOUNDARY:
return new String(source, start... | class class_name[name] begin[{]
method[valueOf, return_type[type[String]], modifier[public static], parameter[source, start, limit, offset16]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['LEAD_SURROGATE_BOUNDARY'], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberRefer... | Keyword[public] Keyword[static] identifier[String] identifier[valueOf] operator[SEP] Keyword[char] identifier[source] operator[SEP] operator[SEP] , Keyword[int] identifier[start] , Keyword[int] identifier[limit] , Keyword[int] identifier[offset16] operator[SEP] {
Keyword[switch] operator[SEP] identifier[bound... |
public void drawTank(Graphics g, float xpos, float ypos, float rot) {
// work out the centre of the tank in rendering coordinates and then
// spit onto the screen
int cx = (int) (xpos * 32);
int cy = (int) (ypos * 32);
g.rotate(cx,cy,rot);
player.draw(cx-16,cy-16);
g.rotate(cx,cy,-rot);
} | class class_name[name] begin[{]
method[drawTank, return_type[void], modifier[public], parameter[g, xpos, ypos, rot]] begin[{]
local_variable[type[int], cx]
local_variable[type[int], cy]
call[g.rotate, parameter[member[.cx], member[.cy], member[.rot]]]
call[player... | Keyword[public] Keyword[void] identifier[drawTank] operator[SEP] identifier[Graphics] identifier[g] , Keyword[float] identifier[xpos] , Keyword[float] identifier[ypos] , Keyword[float] identifier[rot] operator[SEP] {
Keyword[int] identifier[cx] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP... |
public DiagnosticAnalysisInner getSiteAnalysis(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) {
return getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).toBlocking().single().body();
} | class class_name[name] begin[{]
method[getSiteAnalysis, return_type[type[DiagnosticAnalysisInner]], modifier[public], parameter[resourceGroupName, siteName, diagnosticCategory, analysisName]] begin[{]
return[call[.getSiteAnalysisWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.si... | Keyword[public] identifier[DiagnosticAnalysisInner] identifier[getSiteAnalysis] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[siteName] , identifier[String] identifier[diagnosticCategory] , identifier[String] identifier[analysisName] operator[SEP] {
Keyword[ret... |
@Override
public List<Variant> create(VariantStudyMetadata metadata, String line) throws IllegalArgumentException, NotAVariantException {
String[] fields = line.split("\t");
if (fields.length < 8) {
throw new IllegalArgumentException("Not enough fields provided (min 8)");
}
// ... | class class_name[name] begin[{]
method[create, return_type[type[List]], modifier[public], parameter[metadata, line]] begin[{]
local_variable[type[String], fields]
if[binary_operation[member[fields.length], <, literal[8]]] begin[{]
ThrowStatement(expression=ClassCreator(argum... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Variant] operator[>] identifier[create] operator[SEP] identifier[VariantStudyMetadata] identifier[metadata] , identifier[String] identifier[line] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[N... |
public static void info(final MethodVisitor mv, final MethodInfo methodInfo, final int argsOff) {
mv.visitTypeInsn(Opcodes.NEW, PROXY_TARGET_INFO);
mv.visitInsn(DUP);
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, PROXY_TARGET_INFO, "<init>", "()V", false);
// int argsOff = methodInfo.getAllArgumentsSize();
// args... | class class_name[name] begin[{]
method[info, return_type[void], modifier[public static], parameter[mv, methodInfo, argsOff]] begin[{]
call[mv.visitTypeInsn, parameter[member[Opcodes.NEW], member[.PROXY_TARGET_INFO]]]
call[mv.visitInsn, parameter[member[.DUP]]]
ca... | Keyword[public] Keyword[static] Keyword[void] identifier[info] operator[SEP] Keyword[final] identifier[MethodVisitor] identifier[mv] , Keyword[final] identifier[MethodInfo] identifier[methodInfo] , Keyword[final] Keyword[int] identifier[argsOff] operator[SEP] {
identifier[mv] operator[SEP] identifier[visitType... |
public static <K, V> HashMap<K, V> newHashMapWithExpectedSize(int expectedSize) {
return new HashMap<>(capacity(expectedSize));
} | class class_name[name] begin[{]
method[newHashMapWithExpectedSize, return_type[type[HashMap]], modifier[public static], parameter[expectedSize]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=expectedSize, postfix_operators=[], prefix_operators=[], qualifier=... | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[HashMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[newHashMapWithExpectedSize] operator[SEP] Keyword[int] identifier[expectedSize] operator[SEP] {
Keyword[return] Keyword[new] identifier[Hash... |
public static SanitizedContent jsIdentifier(String identifier) {
checkArgument(
VALID_JS_IDENTIFIER_PATTERN.matcher(identifier).matches(),
"JS identifier '%s' should match the pattern '%s'",
identifier,
VALID_JS_IDENTIFIER_PATTERN.pattern());
checkArgument(
!INVALID_JS_ID... | class class_name[name] begin[{]
method[jsIdentifier, return_type[type[SanitizedContent]], modifier[public static], parameter[identifier]] begin[{]
call[.checkArgument, parameter[call[VALID_JS_IDENTIFIER_PATTERN.matcher, parameter[member[.identifier]]], literal["JS identifier '%s' should match t... | Keyword[public] Keyword[static] identifier[SanitizedContent] identifier[jsIdentifier] operator[SEP] identifier[String] identifier[identifier] operator[SEP] {
identifier[checkArgument] operator[SEP] identifier[VALID_JS_IDENTIFIER_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[identifier] oper... |
@Override
public NonExceptionPostdominatorsAnalysis analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
throws CheckedAnalysisException {
CFG cfg = getCFG(analysisCache, descriptor);
ReverseDepthFirstSearch rdfs = getReverseDepthFirstSearch(analysisCache, descriptor);
... | class class_name[name] begin[{]
method[analyze, return_type[type[NonExceptionPostdominatorsAnalysis]], modifier[public], parameter[analysisCache, descriptor]] begin[{]
local_variable[type[CFG], cfg]
local_variable[type[ReverseDepthFirstSearch], rdfs]
local_variable[type[NonExceptionPost... | annotation[@] identifier[Override] Keyword[public] identifier[NonExceptionPostdominatorsAnalysis] identifier[analyze] operator[SEP] identifier[IAnalysisCache] identifier[analysisCache] , identifier[MethodDescriptor] identifier[descriptor] operator[SEP] Keyword[throws] identifier[CheckedAnalysisException] {
iden... |
@Override
public <VALUEBASE, VALUE extends VALUEBASE, KEY extends Key<CoreMap, VALUEBASE>>
VALUE set(Class<KEY> key, VALUE value) {
if (immutableKeys.contains(key)) {
throw new HashableCoreMapException("Attempt to change value " +
"of immutable field "+key.getSimpleName());
}
... | class class_name[name] begin[{]
method[set, return_type[type[VALUE]], modifier[public], parameter[key, value]] begin[{]
if[call[immutableKeys.contains, parameter[member[.key]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(opera... | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[VALUEBASE] , identifier[VALUE] Keyword[extends] identifier[VALUEBASE] , identifier[KEY] Keyword[extends] identifier[Key] operator[<] identifier[CoreMap] , identifier[VALUEBASE] operator[>] operator[>] identifier[VALUE] identifier[set] operator... |
void logContainerStateChangesAndReset() {
ContainerStateChangeReport changeReport = createContainerStateChangeReport(true);
if (changeReport != null) {
final String msg = createChangeReportLogMessage(changeReport, false);
ROOT_LOGGER.info(msg);
}
} | class class_name[name] begin[{]
method[logContainerStateChangesAndReset, return_type[void], modifier[default], parameter[]] begin[{]
local_variable[type[ContainerStateChangeReport], changeReport]
if[binary_operation[member[.changeReport], !=, literal[null]]] begin[{]
local_v... | Keyword[void] identifier[logContainerStateChangesAndReset] operator[SEP] operator[SEP] {
identifier[ContainerStateChangeReport] identifier[changeReport] operator[=] identifier[createContainerStateChangeReport] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[changeR... |
public synchronized void logWatchTerminated() {
final Iterable<Follower> followersToTerminate = new ObjectLinkedOpenHashSet<>(this.runningFollowerStartMarks.keySet());
followersToTerminate.forEach(this::followerTerminated);
this.sweeping.stop();
} | class class_name[name] begin[{]
method[logWatchTerminated, return_type[void], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[Iterable], followersToTerminate]
call[followersToTerminate.forEach, parameter[MethodReference(expression=This(postfix_operators=[], pref... | Keyword[public] Keyword[synchronized] Keyword[void] identifier[logWatchTerminated] operator[SEP] operator[SEP] {
Keyword[final] identifier[Iterable] operator[<] identifier[Follower] operator[>] identifier[followersToTerminate] operator[=] Keyword[new] identifier[ObjectLinkedOpenHashSet] operator[<] operator[>] o... |
public void setEnablecfoutputonly(Object enablecfoutputonly) throws PageException {
if (enablecfoutputonly instanceof String && Caster.toString(enablecfoutputonly).trim().equalsIgnoreCase("reset")) {
pageContext.setCFOutputOnly((short) 0);
}
else {
pageContext.setCFOutputOnly(Caster.toBooleanValue(enablecf... | class class_name[name] begin[{]
method[setEnablecfoutputonly, return_type[void], modifier[public], parameter[enablecfoutputonly]] begin[{]
if[binary_operation[binary_operation[member[.enablecfoutputonly], instanceof, type[String]], &&, call[Caster.toString, parameter[member[.enablecfoutputonly]... | Keyword[public] Keyword[void] identifier[setEnablecfoutputonly] operator[SEP] identifier[Object] identifier[enablecfoutputonly] operator[SEP] Keyword[throws] identifier[PageException] {
Keyword[if] operator[SEP] identifier[enablecfoutputonly] Keyword[instanceof] identifier[String] operator[&&] identifier[Caster]... |
public static <T> boolean all(Iterable<T> it, Predicate<? super T> p) {
if (it == null) {
return false;
}
for (T elem : it) {
if (!p.apply(elem)) {
return false;
}
}
return true;
} | class class_name[name] begin[{]
method[all, return_type[type[boolean]], modifier[public static], parameter[it, p]] begin[{]
if[binary_operation[member[.it], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
ForStatement(body=BlockS... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[all] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[it] , identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[p] operator[SEP] {
Ke... |
public static String getLastXpathElement(String path) {
int pos = path.lastIndexOf('/');
if (pos >= 0) {
path = path.substring(pos + 1);
}
return CmsXmlUtils.removeXpathIndex(path);
} | class class_name[name] begin[{]
method[getLastXpathElement, return_type[type[String]], modifier[public static], parameter[path]] begin[{]
local_variable[type[int], pos]
if[binary_operation[member[.pos], >=, literal[0]]] begin[{]
assign[member[.path], call[path.su... | Keyword[public] Keyword[static] identifier[String] identifier[getLastXpathElement] operator[SEP] identifier[String] identifier[path] operator[SEP] {
Keyword[int] identifier[pos] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if... |
public double getAndAdd(int row, int col, double delta) {
checkIndices(row, col);
AtomicSparseVector rowEntry = getRow(row, col, true);
return rowEntry.getAndAdd(col, delta);
} | class class_name[name] begin[{]
method[getAndAdd, return_type[type[double]], modifier[public], parameter[row, col, delta]] begin[{]
call[.checkIndices, parameter[member[.row], member[.col]]]
local_variable[type[AtomicSparseVector], rowEntry]
return[call[rowEntry.getAndAdd, param... | Keyword[public] Keyword[double] identifier[getAndAdd] operator[SEP] Keyword[int] identifier[row] , Keyword[int] identifier[col] , Keyword[double] identifier[delta] operator[SEP] {
identifier[checkIndices] operator[SEP] identifier[row] , identifier[col] operator[SEP] operator[SEP] identifier[AtomicSparseVector... |
@Override
public Map<String, Object> executeSelectOne(String sql, Object... bindValues) {
return executeSelectOne(UniversalRowMapper.INSTANCE, sql, bindValues);
} | class class_name[name] begin[{]
method[executeSelectOne, return_type[type[Map]], modifier[public], parameter[sql, bindValues]] begin[{]
return[call[.executeSelectOne, parameter[member[UniversalRowMapper.INSTANCE], member[.sql], member[.bindValues]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[executeSelectOne] operator[SEP] identifier[String] identifier[sql] , identifier[Object] operator[...] identifier[bindValues] operator[SEP] {
Keyword[return] identifier[e... |
@OperationsPerInvocation(SIZE)
@Benchmark
public int array_get() {
int sum = 0;
for (int i = 0; i < SIZE; ++i) {
sum += array[i];
}
return sum;
} | class class_name[name] begin[{]
method[array_get, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], sum]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sum, postfix_ope... | annotation[@] identifier[OperationsPerInvocation] operator[SEP] identifier[SIZE] operator[SEP] annotation[@] identifier[Benchmark] Keyword[public] Keyword[int] identifier[array_get] operator[SEP] operator[SEP] {
Keyword[int] identifier[sum] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[in... |
private void removeCssLinks() {
if (this.isInit) {
return;
}
this.isInit = true;
// Remove all existing link element
NodeList<Element> links = this.getHead().getElementsByTagName(LinkElement.TAG);
int size = links.getLength();
for (int i = 0; i < size; i++) {
LinkElement elem = LinkElement.as(links.... | class class_name[name] begin[{]
method[removeCssLinks, return_type[void], modifier[private], parameter[]] begin[{]
if[THIS[member[None.isInit]]] begin[{]
return[None]
else begin[{]
None
end[}]
assign[THIS[member[None.isInit]], literal[true]]
l... | Keyword[private] Keyword[void] identifier[removeCssLinks] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isInit] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[this] operator[SEP] identifier[isInit] operator[=] literal[boolean] ope... |
public static boolean checkPassPhrase(File keyFilePath, String passPhrase) {
KeyPair key = parsePrivateKeyFile(keyFilePath);
boolean isValidPhrase = passPhrase != null && !passPhrase.trim().isEmpty();
if (key == null) {
return false;
} else if (key.isEncrypted() != isValidPhr... | class class_name[name] begin[{]
method[checkPassPhrase, return_type[type[boolean]], modifier[public static], parameter[keyFilePath, passPhrase]] begin[{]
local_variable[type[KeyPair], key]
local_variable[type[boolean], isValidPhrase]
if[binary_operation[member[.key], ==, literal... | Keyword[public] Keyword[static] Keyword[boolean] identifier[checkPassPhrase] operator[SEP] identifier[File] identifier[keyFilePath] , identifier[String] identifier[passPhrase] operator[SEP] {
identifier[KeyPair] identifier[key] operator[=] identifier[parsePrivateKeyFile] operator[SEP] identifier[keyFilePath] op... |
public BaseWindowedBolt<T> timeWindow(Time size, Time slide) {
long s = size.toMilliseconds();
long l = slide.toMilliseconds();
ensurePositiveTime(s, l);
ensureSizeGreaterThanSlide(s, l);
setSizeAndSlide(s, l);
this.windowAssigner = SlidingProcessingTimeWindows.of(s, l);... | class class_name[name] begin[{]
method[timeWindow, return_type[type[BaseWindowedBolt]], modifier[public], parameter[size, slide]] begin[{]
local_variable[type[long], s]
local_variable[type[long], l]
call[.ensurePositiveTime, parameter[member[.s], member[.l]]]
cal... | Keyword[public] identifier[BaseWindowedBolt] operator[<] identifier[T] operator[>] identifier[timeWindow] operator[SEP] identifier[Time] identifier[size] , identifier[Time] identifier[slide] operator[SEP] {
Keyword[long] identifier[s] operator[=] identifier[size] operator[SEP] identifier[toMilliseconds] operato... |
@Override
public void introspect(OutputStream out) throws IOException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(this, tc, "introspect");
PrintWriter writer = new PrintWriter(out, true);
activeRequest... | class class_name[name] begin[{]
method[introspect, return_type[void], modifier[public], parameter[out]] begin[{]
local_variable[type[boolean], isTraceOn]
if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[Tr.entry, parameter[THIS... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[introspect] operator[SEP] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identif... |
public void writeNullEnum(Enum<?> e) throws IOException {
writeBoolean(e != null);
if(e != null) writeUTF(e.name());
} | class class_name[name] begin[{]
method[writeNullEnum, return_type[void], modifier[public], parameter[e]] begin[{]
call[.writeBoolean, parameter[binary_operation[member[.e], !=, literal[null]]]]
if[binary_operation[member[.e], !=, literal[null]]] begin[{]
call[.writeU... | Keyword[public] Keyword[void] identifier[writeNullEnum] operator[SEP] identifier[Enum] operator[<] operator[?] operator[>] identifier[e] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writeBoolean] operator[SEP] identifier[e] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[if] op... |
public void setDiskIds(java.util.Collection<String> diskIds) {
if (diskIds == null) {
this.diskIds = null;
return;
}
this.diskIds = new com.amazonaws.internal.SdkInternalList<String>(diskIds);
} | class class_name[name] begin[{]
method[setDiskIds, return_type[void], modifier[public], parameter[diskIds]] begin[{]
if[binary_operation[member[.diskIds], ==, literal[null]]] begin[{]
assign[THIS[member[None.diskIds]], literal[null]]
return[None]
else... | Keyword[public] Keyword[void] identifier[setDiskIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[diskIds] operator[SEP] {
Keyword[if] operator[SEP] identifier[diskIds] operator[==] Other[null] operator[SE... |
protected void seekInput(MemorySegment segment, int positionInSegment, int limitInSegment) {
this.currentSegment = segment;
this.positionInSegment = positionInSegment;
this.limitInSegment = limitInSegment;
} | class class_name[name] begin[{]
method[seekInput, return_type[void], modifier[protected], parameter[segment, positionInSegment, limitInSegment]] begin[{]
assign[THIS[member[None.currentSegment]], member[.segment]]
assign[THIS[member[None.positionInSegment]], member[.positionInSe... | Keyword[protected] Keyword[void] identifier[seekInput] operator[SEP] identifier[MemorySegment] identifier[segment] , Keyword[int] identifier[positionInSegment] , Keyword[int] identifier[limitInSegment] operator[SEP] {
Keyword[this] operator[SEP] identifier[currentSegment] operator[=] identifier[segment] operat... |
public long readLELong() throws IOException {
readFully(w, 0, 8);
return
(long) (w[7] & 0xff) << 56 |
(long) (w[6] & 0xff) << 48 |
(long) (w[5] & 0xff) << 40 |
(long) (w[4] & 0xff) << 32 |
(long) (w[3] & 0xff) << 24 |
... | class class_name[name] begin[{]
method[readLELong, return_type[type[long]], modifier[public], parameter[]] begin[{]
call[.readFully, parameter[member[.w], literal[0], literal[8]]]
return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operatio... | Keyword[public] Keyword[long] identifier[readLELong] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[readFully] operator[SEP] identifier[w] , Other[0] , Other[8] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[w] op... |
@Override
protected ConsistentKeyLockStatus writeSingleLock(KeyColumn lockID, StoreTransaction txh) throws Throwable {
final StaticBuffer lockKey = serializer.toLockKey(lockID.getKey(), lockID.getColumn());
StaticBuffer oldLockCol = null;
for (int i = 0; i < lockRetryCount; i++) {
... | class class_name[name] begin[{]
method[writeSingleLock, return_type[type[ConsistentKeyLockStatus]], modifier[protected], parameter[lockID, txh]] begin[{]
local_variable[type[StaticBuffer], lockKey]
local_variable[type[StaticBuffer], oldLockCol]
ForStatement(body=BlockStatement(label=Non... | annotation[@] identifier[Override] Keyword[protected] identifier[ConsistentKeyLockStatus] identifier[writeSingleLock] operator[SEP] identifier[KeyColumn] identifier[lockID] , identifier[StoreTransaction] identifier[txh] operator[SEP] Keyword[throws] identifier[Throwable] {
Keyword[final] identifier[StaticBuffer... |
public void finishEnvSetup(boolean transactional) throws Exception {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
logger.logp(Level.FINE, CLASS_NAME, "finishEnvSetup", "enter");
}
// unset the classloader
UnsynchronizedStack env... | class class_name[name] begin[{]
method[finishEnvSetup, return_type[void], modifier[public], parameter[transactional]] 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[finishEnvSetup] operator[SEP] Keyword[boolean] identifier[transactional] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP]... |
@Override
protected void initializeGraph() {
super.initializeGraph();
mGraphPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mGraphPaint.setStyle(Paint.Style.FILL);
mLegendPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.LINEAR_TEXT_FLAG);
mLegendPaint.setColor(mLegendColor);
... | class class_name[name] begin[{]
method[initializeGraph, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=initializeGraph, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
assign[... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initializeGraph] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[initializeGraph] operator[SEP] operator[SEP] operator[SEP] identifier[mGraphPaint] operator[=] Keyword[new] identifier[Paint] operator[SEP] identif... |
public static String path2unix(File file)
{
return file != null ? path2unix(file.getPath()) : null;
} | class class_name[name] begin[{]
method[path2unix, return_type[type[String]], modifier[public static], parameter[file]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal... | Keyword[public] Keyword[static] identifier[String] identifier[path2unix] operator[SEP] identifier[File] identifier[file] operator[SEP] {
Keyword[return] identifier[file] operator[!=] Other[null] operator[?] identifier[path2unix] operator[SEP] identifier[file] operator[SEP] identifier[getPath] operator[SEP] opera... |
public void setExtraParams(java.util.Collection<ExtraParam> extraParams) {
if (extraParams == null) {
this.extraParams = null;
return;
}
this.extraParams = new com.amazonaws.internal.SdkInternalList<ExtraParam>(extraParams);
} | class class_name[name] begin[{]
method[setExtraParams, return_type[void], modifier[public], parameter[extraParams]] begin[{]
if[binary_operation[member[.extraParams], ==, literal[null]]] begin[{]
assign[THIS[member[None.extraParams]], literal[null]]
return[No... | Keyword[public] Keyword[void] identifier[setExtraParams] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ExtraParam] operator[>] identifier[extraParams] operator[SEP] {
Keyword[if] operator[SEP] identifier[extraParams] operator[==] Other[n... |
public ResponseWrapper retractMessage(String username, long messageId)
throws APIConnectionException, APIRequestException {
StringUtils.checkUsername(username);
return _httpClient.sendPost(_baseUrl + messagePath + "/" + username + "/" + messageId + "/retract", null);
} | class class_name[name] begin[{]
method[retractMessage, return_type[type[ResponseWrapper]], modifier[public], parameter[username, messageId]] begin[{]
call[StringUtils.checkUsername, parameter[member[.username]]]
return[call[_httpClient.sendPost, parameter[binary_operation[binary_operati... | Keyword[public] identifier[ResponseWrapper] identifier[retractMessage] operator[SEP] identifier[String] identifier[username] , Keyword[long] identifier[messageId] operator[SEP] Keyword[throws] identifier[APIConnectionException] , identifier[APIRequestException] {
identifier[StringUtils] operator[SEP] identifie... |
private Node doToModel(NodeDO nodeDo) {
Node node = new Node();
try {
node.setId(nodeDo.getId());
node.setIp(nodeDo.getIp());
node.setName(nodeDo.getName());
node.setPort(nodeDo.getPort());
node.setDescription(nodeDo.getDescription());
... | class class_name[name] begin[{]
method[doToModel, return_type[type[Node]], modifier[private], parameter[nodeDo]] begin[{]
local_variable[type[Node], node]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operator... | Keyword[private] identifier[Node] identifier[doToModel] operator[SEP] identifier[NodeDO] identifier[nodeDo] operator[SEP] {
identifier[Node] identifier[node] operator[=] Keyword[new] identifier[Node] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[node] operator[SEP] identifier[set... |
@Override
public final void process(final Map<String, Object> pRqVs,
final IRequestData pRqDt) throws Exception {
OnlineBuyer buyer = this.buySr.getAuthBuyr(pRqVs, pRqDt);
if (buyer == null) {
String procNm = pRqDt.getParameter("nmPrcRed");
IProcessor proc = this.procFac.lazyGet(pRqVs, procNm)... | class class_name[name] begin[{]
method[process, return_type[void], modifier[final public], parameter[pRqVs, pRqDt]] begin[{]
local_variable[type[OnlineBuyer], buyer]
if[binary_operation[member[.buyer], ==, literal[null]]] begin[{]
local_variable[type[String], procNm]
... | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[process] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pRqVs] , Keyword[final] identifier[IRequestData] identifier[pRqDt] operator[SEP] Keyword[throws] i... |
@Override
public UpdateScriptResult updateScript(UpdateScriptRequest request) {
request = beforeClientExecution(request);
return executeUpdateScript(request);
} | class class_name[name] begin[{]
method[updateScript, return_type[type[UpdateScriptResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeUpdateScript, parameter[member[.request]]]]
... | annotation[@] identifier[Override] Keyword[public] identifier[UpdateScriptResult] identifier[updateScript] operator[SEP] identifier[UpdateScriptRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[S... |
private JobVertex createSingleInputVertex(SingleInputPlanNode node) throws CompilerException {
final String taskName = node.getNodeName();
final DriverStrategy ds = node.getDriverStrategy();
// check, whether chaining is possible
boolean chaining;
{
Channel inConn = node.getInput();
PlanNode pred = i... | class class_name[name] begin[{]
method[createSingleInputVertex, return_type[type[JobVertex]], modifier[private], parameter[node]] begin[{]
local_variable[type[String], taskName]
local_variable[type[DriverStrategy], ds]
local_variable[type[boolean], chaining]
local_variab... | Keyword[private] identifier[JobVertex] identifier[createSingleInputVertex] operator[SEP] identifier[SingleInputPlanNode] identifier[node] operator[SEP] Keyword[throws] identifier[CompilerException] {
Keyword[final] identifier[String] identifier[taskName] operator[=] identifier[node] operator[SEP] identifier[getN... |
public static @Nonnull Predicate evaluating(final @Nonnull String pattern) {
return new Predicate() {
@Override
public boolean isValid(@Nonnull ProcessThread<?, ?, ?> thread) {
for (StackTraceElement element : thread.getStackTrace().getElements()) {
if... | class class_name[name] begin[{]
method[evaluating, return_type[type[Predicate]], modifier[public static], parameter[pattern]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ForStatement(body=BlockStatement(label=None, stat... | Keyword[public] Keyword[static] annotation[@] identifier[Nonnull] identifier[Predicate] identifier[evaluating] operator[SEP] Keyword[final] annotation[@] identifier[Nonnull] identifier[String] identifier[pattern] operator[SEP] {
Keyword[return] Keyword[new] identifier[Predicate] operator[SEP] operator[SEP] {
... |
protected void updateSite(Site value, String xmlTag, Counter counter, Element element)
{
boolean shouldExist = value != null;
Element root = updateElement(counter, element, xmlTag, shouldExist);
if (shouldExist)
{
Counter innerCount = new Counter(counter.getDepth() + 1);
fin... | class class_name[name] begin[{]
method[updateSite, return_type[void], modifier[protected], parameter[value, xmlTag, counter, element]] begin[{]
local_variable[type[boolean], shouldExist]
local_variable[type[Element], root]
if[member[.shouldExist]] begin[{]
local_vari... | Keyword[protected] Keyword[void] identifier[updateSite] operator[SEP] identifier[Site] identifier[value] , identifier[String] identifier[xmlTag] , identifier[Counter] identifier[counter] , identifier[Element] identifier[element] operator[SEP] {
Keyword[boolean] identifier[shouldExist] operator[=] identifier[v... |
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
public static boolean hasSipFeature(Context context) {
return hasSipFeature(context.getPackageManager());
} | class class_name[name] begin[{]
method[hasSipFeature, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{]
return[call[.hasSipFeature, parameter[call[context.getPackageManager, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[GINGERBREAD] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[hasSipFeature] operator[SEP] identifier[Context] identifier[context] operator[SEP] {
Keyword[... |
void createDirectory(Path path) throws IOException {
if (Files.exists(path) && Files.isDirectory(path)) {
return;
}
if (this.readOnly) {
throw new FileNotFoundException(
"The requested directory \""
+ path.toString()
+ "\" does not exist and we are in read-only mode, so it cannot be crea... | class class_name[name] begin[{]
method[createDirectory, return_type[void], modifier[default], parameter[path]] begin[{]
if[binary_operation[call[Files.exists, parameter[member[.path]]], &&, call[Files.isDirectory, parameter[member[.path]]]]] begin[{]
return[None]
else begin[... | Keyword[void] identifier[createDirectory] operator[SEP] identifier[Path] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[Files] operator[SEP] identifier[exists] operator[SEP] identifier[path] operator[SEP] operator[&&] identifier[Files] operator[SEP] ... |
public Observable<ServiceResponse<DatabaseVulnerabilityAssessmentScansExportInner>> exportWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is re... | class class_name[name] begin[{]
method[exportWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName, databaseName, scanId]] begin[{]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
ThrowStatemen... | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[DatabaseVulnerabilityAssessmentScansExportInner] operator[>] operator[>] identifier[exportWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[server... |
public DiscreteInterval minus(DiscreteInterval other) {
return new DiscreteInterval(this.min - other.max, this.max - other.min);
} | class class_name[name] begin[{]
method[minus, return_type[type[DiscreteInterval]], modifier[public], parameter[other]] begin[{]
return[ClassCreator(arguments=[BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=min, postfix_operator... | Keyword[public] identifier[DiscreteInterval] identifier[minus] operator[SEP] identifier[DiscreteInterval] identifier[other] operator[SEP] {
Keyword[return] Keyword[new] identifier[DiscreteInterval] operator[SEP] Keyword[this] operator[SEP] identifier[min] operator[-] identifier[other] operator[SEP] identifier[ma... |
@Override
public final AbstractGauge init(final int WIDTH, final int HEIGHT) {
final int GAUGE_WIDTH = isFrameVisible() ? WIDTH : getGaugeBounds().width;
final int GAUGE_HEIGHT = isFrameVisible() ? HEIGHT : getGaugeBounds().height;
if (GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1) {
re... | class class_name[name] begin[{]
method[init, return_type[type[AbstractGauge]], modifier[final public], parameter[WIDTH, HEIGHT]] begin[{]
local_variable[type[int], GAUGE_WIDTH]
local_variable[type[int], GAUGE_HEIGHT]
if[binary_operation[binary_operation[member[.GAUGE_WIDTH], <=,... | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[AbstractGauge] identifier[init] operator[SEP] Keyword[final] Keyword[int] identifier[WIDTH] , Keyword[final] Keyword[int] identifier[HEIGHT] operator[SEP] {
Keyword[final] Keyword[int] identifier[GAUGE_WIDTH] operator[=] identifier[isF... |
@Override
public AppEngineGetList<E> sort(Order<?, ?>... orders) {
if (orders == null) {
throw new IllegalArgumentException("'orders' must not be [" + orders + "]");
}
this.orders = Arrays.asList(orders);
return this;
} | class class_name[name] begin[{]
method[sort, return_type[type[AppEngineGetList]], modifier[public], parameter[orders]] begin[{]
if[binary_operation[member[.orders], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperatio... | annotation[@] identifier[Override] Keyword[public] identifier[AppEngineGetList] operator[<] identifier[E] operator[>] identifier[sort] operator[SEP] identifier[Order] operator[<] operator[?] , operator[?] operator[>] operator[...] identifier[orders] operator[SEP] {
Keyword[if] operator[SEP] identifier[orders] o... |
private Set<OrderBy> copyOrderingSet() {
Set<OrderBy> orderingCopy = Sets.newLinkedHashSet();
for (OrderBy order : this.ordering) {
OrderBy copyOrder = new OrderBy();
copyOrder.setField(order.getField());
copyOrder.setSortOrder(order.getSortOrder());
orderingCopy.add(copyOrder);
}
... | class class_name[name] begin[{]
method[copyOrderingSet, return_type[type[Set]], modifier[private], parameter[]] begin[{]
local_variable[type[Set], orderingCopy]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime... | Keyword[private] identifier[Set] operator[<] identifier[OrderBy] operator[>] identifier[copyOrderingSet] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[OrderBy] operator[>] identifier[orderingCopy] operator[=] identifier[Sets] operator[SEP] identifier[newLinkedHashSet] operator[SEP] operato... |
public List<Integer> getPageRange() {
List<Integer> r = new ArrayList<Integer>();
for (int i = 1; i <= getPages(); i++) {
r.add(i);
}
return r;
} | class class_name[name] begin[{]
method[getPageRange, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], r]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postf... | Keyword[public] identifier[List] operator[<] identifier[Integer] operator[>] identifier[getPageRange] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Integer] operator[>] identifier[r] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Integer] operator[>] operator[SEP] o... |
public static HttpURLConnection createHttpURLConnection(URL pURL, Properties pProperties, boolean pFollowRedirects, int pTimeout)
throws IOException {
// Open the connection, and get the stream
HttpURLConnection conn;
if (pTimeout > 0) {
// Supports timeout
... | class class_name[name] begin[{]
method[createHttpURLConnection, return_type[type[HttpURLConnection]], modifier[public static], parameter[pURL, pProperties, pFollowRedirects, pTimeout]] begin[{]
local_variable[type[HttpURLConnection], conn]
if[binary_operation[member[.pTimeout], >, liter... | Keyword[public] Keyword[static] identifier[HttpURLConnection] identifier[createHttpURLConnection] operator[SEP] identifier[URL] identifier[pURL] , identifier[Properties] identifier[pProperties] , Keyword[boolean] identifier[pFollowRedirects] , Keyword[int] identifier[pTimeout] operator[SEP] Keyword[throws] identifie... |
@RequestMapping(value = "project/{projectId}/builds/search", method = RequestMethod.GET)
public Resources<BuildView> buildSearch(@PathVariable ID projectId, @Valid BuildSearchForm form) {
return Resources.of(
structureService.buildSearch(projectId, form).stream()
.map... | class class_name[name] begin[{]
method[buildSearch, return_type[type[Resources]], modifier[public], parameter[projectId, form]] begin[{]
return[call[Resources.of, parameter[call[structureService.buildSearch, parameter[member[.projectId], member[.form]]], call[.uri, parameter[call[.on, parameter[call[.g... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] identifier[Resources] operator[<] identifier[BuildView] operator[>] identifier[buildSearch] operato... |
public static String extractBasePath(String targetTmpPath, String tmpSuffix)
{
int lastIndex = targetTmpPath.lastIndexOf(tmpSuffix);
String result = targetTmpPath.substring(0, lastIndex);
return result;
} | class class_name[name] begin[{]
method[extractBasePath, return_type[type[String]], modifier[public static], parameter[targetTmpPath, tmpSuffix]] begin[{]
local_variable[type[int], lastIndex]
local_variable[type[String], result]
return[member[.result]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[extractBasePath] operator[SEP] identifier[String] identifier[targetTmpPath] , identifier[String] identifier[tmpSuffix] operator[SEP] {
Keyword[int] identifier[lastIndex] operator[=] identifier[targetTmpPath] operator[SEP] identifier[lastIndexOf] oper... |
@Override
public void beforeStep(StepExecution stepExecution) {
super.beforeStep(stepExecution);
clearErrors();
try {
new Retrier().execute(new Retriable() {
/*
* (non-Javadoc)
*
* @see org.duracloud.common.retry.... | class class_name[name] begin[{]
method[beforeStep, return_type[void], modifier[public], parameter[stepExecution]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=stepExecution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=beforeStep, postfix_ope... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[beforeStep] operator[SEP] identifier[StepExecution] identifier[stepExecution] operator[SEP] {
Keyword[super] operator[SEP] identifier[beforeStep] operator[SEP] identifier[stepExecution] operator[SEP] operator[SEP] identifier[clearErrors]... |
public ScheduledFuture<?> queueAfter(long delay, TimeUnit unit, Consumer<? super T> success)
{
return queueAfter(delay, unit, success, api.get().getRateLimitPool());
} | class class_name[name] begin[{]
method[queueAfter, return_type[type[ScheduledFuture]], modifier[public], parameter[delay, unit, success]] begin[{]
return[call[.queueAfter, parameter[member[.delay], member[.unit], member[.success], call[api.get, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[ScheduledFuture] operator[<] operator[?] operator[>] identifier[queueAfter] operator[SEP] Keyword[long] identifier[delay] , identifier[TimeUnit] identifier[unit] , identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[success] operator[SEP] {
... |
private void unregisterResourceIDForResourceBuilder(ResourceBuilderModel resourceBuilder) {
List<? extends ResourceModel> resources = resourceBuilder.announceResources();
resources.stream().map(resource -> resourceIDs.get(resource.getResourceID()))
.filter(Objects::nonNull)
... | class class_name[name] begin[{]
method[unregisterResourceIDForResourceBuilder, return_type[void], modifier[private], parameter[resourceBuilder]] begin[{]
local_variable[type[List], resources]
call[resources.stream, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[unregisterResourceIDForResourceBuilder] operator[SEP] identifier[ResourceBuilderModel] identifier[resourceBuilder] operator[SEP] {
identifier[List] operator[<] operator[?] Keyword[extends] identifier[ResourceModel] operator[>] identifier[resources] operator[=] identifier... |
public ListDeviceInstancesResult withDeviceInstances(DeviceInstance... deviceInstances) {
if (this.deviceInstances == null) {
setDeviceInstances(new java.util.ArrayList<DeviceInstance>(deviceInstances.length));
}
for (DeviceInstance ele : deviceInstances) {
this.deviceIns... | class class_name[name] begin[{]
method[withDeviceInstances, return_type[type[ListDeviceInstancesResult]], modifier[public], parameter[deviceInstances]] begin[{]
if[binary_operation[THIS[member[None.deviceInstances]], ==, literal[null]]] begin[{]
call[.setDeviceInstances,... | Keyword[public] identifier[ListDeviceInstancesResult] identifier[withDeviceInstances] operator[SEP] identifier[DeviceInstance] operator[...] identifier[deviceInstances] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[deviceInstances] operator[==] Other[null] operator[SEP] {
... |
public Vector<Object> getAllEnvironmentTypes()
{
try
{
List<EnvironmentType> envTypes = service.getAllEnvironmentTypes();
log.debug("Retrieved All Environment Types number: " + envTypes.size());
return XmlRpcDataMarshaller.toXmlRpcEnvironmentTypesParameters(envTy... | class class_name[name] begin[{]
method[getAllEnvironmentTypes, return_type[type[Vector]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAllEnvironme... | Keyword[public] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[getAllEnvironmentTypes] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[List] operator[<] identifier[EnvironmentType] operator[>] identifier[envTypes] operator[=] identifier[service] operator[SEP] identifi... |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long labelId)
throws RemoteException {
// Get the CreativeWrapperService.
CreativeWrapperServiceInterface creativeWrapperService =
adManagerServices.get(session, CreativeWrapperServiceInterface.clas... | class class_name[name] begin[{]
method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, labelId]] begin[{]
local_variable[type[CreativeWrapperServiceInterface], creativeWrapperService]
local_variable[type[CreativeWrapper], innerCreativeWrapper]
... | Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[labelId] operator[SEP] Keyword[throws] identifier[RemoteException] {
identifier[CreativeWr... |
public Deferred<Object> deleteAsync(final String name) {
if (tsdb == null) {
throw new IllegalStateException("The TSDB is null for this UID object.");
}
final byte[] uid = new byte[id_width];
final ArrayList<Deferred<Object>> deferreds =
new ArrayList<Deferred<Object>>(2);
/** Ca... | class class_name[name] begin[{]
method[deleteAsync, return_type[type[Deferred]], modifier[public], parameter[name]] begin[{]
if[binary_operation[member[.tsdb], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operato... | Keyword[public] identifier[Deferred] operator[<] identifier[Object] operator[>] identifier[deleteAsync] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[tsdb] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] ident... |
private void handleFileInformation()
throws IOException
{
fileIdAtt = new Attribute( this.fileIdAttName, headerInfo.get(HeaderInfoTitle.FILE_ID.toString() ) );
datasetIdAtt = new Attribute( this.datasetIdAttName, headerInfo.get(HeaderInfoTitle.DATA_SET_ID.toString() ) );
recordSizeInBytes = Inte... | class class_name[name] begin[{]
method[handleFileInformation, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.fileIdAtt], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fileIdAttName, postfix_o... | Keyword[private] Keyword[void] identifier[handleFileInformation] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[fileIdAtt] operator[=] Keyword[new] identifier[Attribute] operator[SEP] Keyword[this] operator[SEP] identifier[fileIdAttName] , identifier[headerInfo] operator[SEP] i... |
protected static void update(String[] ec, Set<String> predicateSet, Map<String, Integer> counter, int cutoff) {
for (String s : ec) {
Integer val = counter.get(s);
val = val == null ? 1 : val + 1;
counter.put(s, val);
if (!predicateSet.contains(s) && counter.get(... | class class_name[name] begin[{]
method[update, return_type[void], modifier[static protected], parameter[ec, predicateSet, counter, cutoff]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializ... | Keyword[protected] Keyword[static] Keyword[void] identifier[update] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[ec] , identifier[Set] operator[<] identifier[String] operator[>] identifier[predicateSet] , identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] iden... |
public Time getTime(int columnIndex, Calendar cal) throws SQLException {
checkObjectRange(columnIndex);
return row.getInternalTime(columnsInformation[columnIndex - 1], cal, timeZone);
} | class class_name[name] begin[{]
method[getTime, return_type[type[Time]], modifier[public], parameter[columnIndex, cal]] begin[{]
call[.checkObjectRange, parameter[member[.columnIndex]]]
return[call[row.getInternalTime, parameter[member[.columnsInformation], member[.cal], member[.timeZon... | Keyword[public] identifier[Time] identifier[getTime] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[Calendar] identifier[cal] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[checkObjectRange] operator[SEP] identifier[columnIndex] operator[SEP] operator[SEP] Keyword[return] i... |
@Override
public T apply(T entity) {
switch (this.mode) {
case NEW_VALUE_MODE:
return value(entity, this.element, this.value, false);
case MIN_MODE:
return min(entity, this.element);
case MAX_MODE:
return max(entity, this.e... | class class_name[name] begin[{]
method[apply, return_type[type[T]], modifier[public], parameter[entity]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['NEW_VALUE_MODE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], p... | annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[apply] operator[SEP] identifier[T] identifier[entity] operator[SEP] {
Keyword[switch] operator[SEP] Keyword[this] operator[SEP] identifier[mode] operator[SEP] {
Keyword[case] identifier[NEW_VALUE_MODE] operator[:] Keyword[ret... |
public void setPartitionKeys(java.util.Collection<Column> partitionKeys) {
if (partitionKeys == null) {
this.partitionKeys = null;
return;
}
this.partitionKeys = new java.util.ArrayList<Column>(partitionKeys);
} | class class_name[name] begin[{]
method[setPartitionKeys, return_type[void], modifier[public], parameter[partitionKeys]] begin[{]
if[binary_operation[member[.partitionKeys], ==, literal[null]]] begin[{]
assign[THIS[member[None.partitionKeys]], literal[null]]
r... | Keyword[public] Keyword[void] identifier[setPartitionKeys] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Column] operator[>] identifier[partitionKeys] operator[SEP] {
Keyword[if] operator[SEP] identifier[partitionKeys] operator[==] Other... |
private synchronized LocaleDisplayNames getLocaleDisplayNames() {
LocaleDisplayNames locNames = null;
if (_localeDisplayNamesRef != null) {
locNames = _localeDisplayNamesRef.get();
}
if (locNames == null) {
locNames = LocaleDisplayNames.getInstance(_locale);
... | class class_name[name] begin[{]
method[getLocaleDisplayNames, return_type[type[LocaleDisplayNames]], modifier[synchronized private], parameter[]] begin[{]
local_variable[type[LocaleDisplayNames], locNames]
if[binary_operation[member[._localeDisplayNamesRef], !=, literal[null]]] begin[{]... | Keyword[private] Keyword[synchronized] identifier[LocaleDisplayNames] identifier[getLocaleDisplayNames] operator[SEP] operator[SEP] {
identifier[LocaleDisplayNames] identifier[locNames] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[_localeDisplayNamesRef] operator[!=] Other[null] ope... |
@Override
public String format(AuditEvent event) {
String formatText = super.format(event);
try {
return util.encrypt(formatText);
} catch (InvalidKeyException e) {
throw new Audit4jRuntimeException("", e);
} catch (IllegalBlockSizeException e) {
... | class class_name[name] begin[{]
method[format, return_type[type[String]], modifier[public], parameter[event]] begin[{]
local_variable[type[String], formatText]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=formatText, postfix_operators=[], pre... | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[format] operator[SEP] identifier[AuditEvent] identifier[event] operator[SEP] {
identifier[String] identifier[formatText] operator[=] Keyword[super] operator[SEP] identifier[format] operator[SEP] identifier[event] operator[SEP] opera... |
protected void isCDATASectionWellFormed(CDATASection node) {
// Does the data valid XML character data
Character invalidChar = isWFXMLChar(node.getData());
//if (!isWFXMLChar(node.getData(), invalidChar)) {
if (invalidChar != null) {
String msg =
Utils... | class class_name[name] begin[{]
method[isCDATASectionWellFormed, return_type[void], modifier[protected], parameter[node]] begin[{]
local_variable[type[Character], invalidChar]
if[binary_operation[member[.invalidChar], !=, literal[null]]] begin[{]
local_variable[type[String],... | Keyword[protected] Keyword[void] identifier[isCDATASectionWellFormed] operator[SEP] identifier[CDATASection] identifier[node] operator[SEP] {
identifier[Character] identifier[invalidChar] operator[=] identifier[isWFXMLChar] operator[SEP] identifier[node] operator[SEP] identifier[getData] operator[SEP] operator[S... |
public static Package getProcessPackage(Long processId) {
try {
if (processId != null) {
for (Package pkg : getPackageList()) {
if (pkg.containsProcess(processId))
return pkg;
}
}
return Package.getDefaul... | class class_name[name] begin[{]
method[getProcessPackage, return_type[type[Package]], modifier[public static], parameter[processId]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=processId, postfix_operators=[], prefix_operators=[], qualifier=, selec... | Keyword[public] Keyword[static] identifier[Package] identifier[getProcessPackage] operator[SEP] identifier[Long] identifier[processId] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] identifier[processId] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] ident... |
public static int processResponses(PushNotificationManager notificationManager) {
List<ResponsePacket> responses = readResponses(notificationManager.getActiveSocket());
handleResponses(responses, notificationManager);
return responses.size();
} | class class_name[name] begin[{]
method[processResponses, return_type[type[int]], modifier[public static], parameter[notificationManager]] begin[{]
local_variable[type[List], responses]
call[.handleResponses, parameter[member[.responses], member[.notificationManager]]]
return[cal... | Keyword[public] Keyword[static] Keyword[int] identifier[processResponses] operator[SEP] identifier[PushNotificationManager] identifier[notificationManager] operator[SEP] {
identifier[List] operator[<] identifier[ResponsePacket] operator[>] identifier[responses] operator[=] identifier[readResponses] operator[SEP]... |
public BigMoney minus(BigDecimal amountToSubtract) {
MoneyUtils.checkNotNull(amountToSubtract, "Amount must not be null");
if (amountToSubtract.compareTo(BigDecimal.ZERO) == 0) {
return this;
}
BigDecimal newAmount = amount.subtract(amountToSubtract);
return Big... | class class_name[name] begin[{]
method[minus, return_type[type[BigMoney]], modifier[public], parameter[amountToSubtract]] begin[{]
call[MoneyUtils.checkNotNull, parameter[member[.amountToSubtract], literal["Amount must not be null"]]]
if[binary_operation[call[amountToSubtract.co... | Keyword[public] identifier[BigMoney] identifier[minus] operator[SEP] identifier[BigDecimal] identifier[amountToSubtract] operator[SEP] {
identifier[MoneyUtils] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[amountToSubtract] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP... |
@SuppressWarnings("unchecked")
protected void cullPathsByBodyFilter(History history) throws Exception {
RequestInformation requestInfo = requestInformation.get();
try {
String requestBody = history.getRequestPostData();
ArrayList<EndpointOverride> removePaths = new ArrayList<... | class class_name[name] begin[{]
method[cullPathsByBodyFilter, return_type[void], modifier[protected], parameter[history]] begin[{]
local_variable[type[RequestInformation], requestInfo]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], in... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[cullPathsByBodyFilter] operator[SEP] identifier[History] identifier[history] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[RequestInformation] identifier[requestIn... |
public static ByteBuffer decodeURL(byte[] source, int off, int limit) throws IOException {
return Decoder.decode(source, off, limit, true);
} | class class_name[name] begin[{]
method[decodeURL, return_type[type[ByteBuffer]], modifier[public static], parameter[source, off, limit]] begin[{]
return[call[Decoder.decode, parameter[member[.source], member[.off], member[.limit], literal[true]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[decodeURL] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[off] , Keyword[int] identifier[limit] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[Decoder] ope... |
static int computeWrappedManhattan(
IntTuple t0, IntTuple t1, IntTuple size)
{
Utils.checkForEqualSize(t0, t1);
int sum = 0;
for (int i=0; i<t0.getSize(); i++)
{
int d = MathUtils.wrappedDistance(
t0.get(i), t1.get(i), size.get(i));
... | class class_name[name] begin[{]
method[computeWrappedManhattan, return_type[type[int]], modifier[static], parameter[t0, t1, size]] begin[{]
call[Utils.checkForEqualSize, parameter[member[.t0], member[.t1]]]
local_variable[type[int], sum]
ForStatement(body=BlockStatement(label=No... | Keyword[static] Keyword[int] identifier[computeWrappedManhattan] operator[SEP] identifier[IntTuple] identifier[t0] , identifier[IntTuple] identifier[t1] , identifier[IntTuple] identifier[size] operator[SEP] {
identifier[Utils] operator[SEP] identifier[checkForEqualSize] operator[SEP] identifier[t0] , identifi... |
private void processInstanceEvent(InstanceContentEvent instanceEvent) {
Instance instance = instanceEvent.getInstance();
boolean predictionCovered = false;
boolean trainingCovered = false;
boolean continuePrediction = instanceEvent.isTesting();
boolean continueTraining = instanceEvent.isTraining();
Error... | class class_name[name] begin[{]
method[processInstanceEvent, return_type[void], modifier[private], parameter[instanceEvent]] begin[{]
local_variable[type[Instance], instance]
local_variable[type[boolean], predictionCovered]
local_variable[type[boolean], trainingCovered]
local_va... | Keyword[private] Keyword[void] identifier[processInstanceEvent] operator[SEP] identifier[InstanceContentEvent] identifier[instanceEvent] operator[SEP] {
identifier[Instance] identifier[instance] operator[=] identifier[instanceEvent] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] ... |
private void processArgs(final String[] arguments) {
args = argumentParser.processArgs(arguments);
final Map<String, Object> definedProps = new HashMap<>(args.definedProps);
buildFile = args.buildFile;
if (args.justPrintUsage || args.justPrintVersion || args.justPrintDiagnostics || args... | class class_name[name] begin[{]
method[processArgs, return_type[void], modifier[private], parameter[arguments]] begin[{]
assign[member[.args], call[argumentParser.processArgs, parameter[member[.arguments]]]]
local_variable[type[Map], definedProps]
assign[member[.buildFil... | Keyword[private] Keyword[void] identifier[processArgs] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] {
identifier[args] operator[=] identifier[argumentParser] operator[SEP] identifier[processArgs] operator[SEP] identifier[arguments] operator[SEP] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.