code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private void checkReadonlyAccessForNativePKs(FieldDescriptorDef fieldDef, String checkLevel)
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
String autoInc = fieldDef.getProp... | class class_name[name] begin[{]
method[checkReadonlyAccessForNativePKs, return_type[void], modifier[private], parameter[fieldDef, checkLevel]] begin[{]
if[call[CHECKLEVEL_NONE.equals, parameter[member[.checkLevel]]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[private] Keyword[void] identifier[checkReadonlyAccessForNativePKs] operator[SEP] identifier[FieldDescriptorDef] identifier[fieldDef] , identifier[String] identifier[checkLevel] operator[SEP] {
Keyword[if] operator[SEP] identifier[CHECKLEVEL_NONE] operator[SEP] identifier[equals] operator[SEP] identifier... |
public static final String getPojoSetter(ProtobufAttribute protobufAttribute, Field field)
{
final String fieldName = field.getName();
final String upperClassName = field.getDeclaringClass().getCanonicalName();
// Look at the cache first
Map<String, String> map = CLASS_TO_FIELD_SETTERS_MAP_CACHE.get(u... | class class_name[name] begin[{]
method[getPojoSetter, return_type[type[String]], modifier[final public static], parameter[protobufAttribute, field]] begin[{]
local_variable[type[String], fieldName]
local_variable[type[String], upperClassName]
local_variable[type[Map], map]
... | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[getPojoSetter] operator[SEP] identifier[ProtobufAttribute] identifier[protobufAttribute] , identifier[Field] identifier[field] operator[SEP] {
Keyword[final] identifier[String] identifier[fieldName] operator[=] identifier[field] operat... |
public static Integer[] wrap(int... values) {
if (null == values) {
return null;
}
final int length = values.length;
if (0 == length) {
return new Integer[0];
}
final Integer[] array = new Integer[length];
for (int i = 0; i < length; i++) {
array[i] = Integer.valueOf(values[i]);
}
... | class class_name[name] begin[{]
method[wrap, return_type[type[Integer]], modifier[public static], parameter[values]] begin[{]
if[binary_operation[literal[null], ==, member[.values]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type... | Keyword[public] Keyword[static] identifier[Integer] operator[SEP] operator[SEP] identifier[wrap] operator[SEP] Keyword[int] operator[...] identifier[values] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[values] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
... |
public Actions clickAndHold() {
if (isBuildingActions()) {
action.addAction(new ClickAndHoldAction(jsonMouse, null));
}
return tick(defaultMouse.createPointerDown(LEFT.asArg()));
} | class class_name[name] begin[{]
method[clickAndHold, return_type[type[Actions]], modifier[public], parameter[]] begin[{]
if[call[.isBuildingActions, parameter[]]] begin[{]
call[action.addAction, parameter[ClassCreator(arguments=[MemberReference(member=jsonMouse, postfix_... | Keyword[public] identifier[Actions] identifier[clickAndHold] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isBuildingActions] operator[SEP] operator[SEP] operator[SEP] {
identifier[action] operator[SEP] identifier[addAction] operator[SEP] Keyword[new] identifier[ClickAndHoldAction... |
@Override
public CommerceDiscountRel fetchByCN_CPK_Last(long classNameId,
long classPK, OrderByComparator<CommerceDiscountRel> orderByComparator) {
int count = countByCN_CPK(classNameId, classPK);
if (count == 0) {
return null;
}
List<CommerceDiscountRel> list = findByCN_CPK(classNameId, classPK,
co... | class class_name[name] begin[{]
method[fetchByCN_CPK_Last, return_type[type[CommerceDiscountRel]], modifier[public], parameter[classNameId, classPK, orderByComparator]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], ==, literal[0]]] begin[{]
re... | annotation[@] identifier[Override] Keyword[public] identifier[CommerceDiscountRel] identifier[fetchByCN_CPK_Last] operator[SEP] Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , identifier[OrderByComparator] operator[<] identifier[CommerceDiscountRel] operator[>] identifier[orderByComparator... |
public Content propertyTagOutput(Tag tag, String prefix) {
Content body = new ContentBuilder();
body.addContent(new RawHtml(prefix));
body.addContent(" ");
body.addContent(HtmlTree.CODE(new RawHtml(tag.text())));
body.addContent(".");
Content result = HtmlTree.P(body);
... | class class_name[name] begin[{]
method[propertyTagOutput, return_type[type[Content]], modifier[public], parameter[tag, prefix]] begin[{]
local_variable[type[Content], body]
call[body.addContent, parameter[ClassCreator(arguments=[MemberReference(member=prefix, postfix_operators=[], prefi... | Keyword[public] identifier[Content] identifier[propertyTagOutput] operator[SEP] identifier[Tag] identifier[tag] , identifier[String] identifier[prefix] operator[SEP] {
identifier[Content] identifier[body] operator[=] Keyword[new] identifier[ContentBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[bo... |
private Configuration buildToolkitConfig() {
// The toolkit configuration file.
try {
File configFile = ResourceUtil
.getFileForResource("jersey2-toolkit.properties");
return new PropertiesConfiguration(configFile);
} catch (ConfigurationException ce)... | class class_name[name] begin[{]
method[buildToolkitConfig, return_type[type[Configuration]], modifier[private], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_opera... | Keyword[private] identifier[Configuration] identifier[buildToolkitConfig] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[File] identifier[configFile] operator[=] identifier[ResourceUtil] operator[SEP] identifier[getFileForResource] operator[SEP] literal[String] operator[SEP] operator[SEP] Key... |
public static boolean isPathContained(List<String> allowedPaths, String targetPath) {
if (allowedPaths == null || allowedPaths.isEmpty() || targetPath == null) {
return false;
}
//Remove trailing slashes, if applicable
if (!targetPath.isEmpty() &&
targetPath.cha... | class class_name[name] begin[{]
method[isPathContained, return_type[type[boolean]], modifier[public static], parameter[allowedPaths, targetPath]] begin[{]
if[binary_operation[binary_operation[binary_operation[member[.allowedPaths], ==, literal[null]], ||, call[allowedPaths.isEmpty, parameter[]]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isPathContained] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[allowedPaths] , identifier[String] identifier[targetPath] operator[SEP] {
Keyword[if] operator[SEP] identifier[allowedPaths] operator[==] Other[null] ... |
public Observable<ConnectionMonitorQueryResultInner> beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) {
return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1<ServiceResponse<ConnectionMonitorQueryRe... | class class_name[name] begin[{]
method[beginQueryAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, networkWatcherName, connectionMonitorName]] begin[{]
return[call[.beginQueryWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkWatcherName], ... | Keyword[public] identifier[Observable] operator[<] identifier[ConnectionMonitorQueryResultInner] operator[>] identifier[beginQueryAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[String] identifier[connectionMonitorName] operator[SE... |
@Override
public void startElement(final String uri, final String localName, final String qName, final Attributes atts)
throws SAXException {
String d = atts.getValue(ATTRIBUTE_NAME_DOMAINS);
if (d != null) {
domains.addFirst(StringUtils.getExtProps(d));
} else {
... | class class_name[name] begin[{]
method[startElement, return_type[void], modifier[public], parameter[uri, localName, qName, atts]] begin[{]
local_variable[type[String], d]
if[binary_operation[member[.d], !=, literal[null]]] begin[{]
call[domains.addFirst, paramete... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[startElement] operator[SEP] Keyword[final] identifier[String] identifier[uri] , Keyword[final] identifier[String] identifier[localName] , Keyword[final] identifier[String] identifier[qName] , Keyword[final] identifier[Attributes] identifier[... |
private static JSONArray _fromArray( boolean[] array, JsonConfig jsonConfig ) {
if( !addInstance( array ) ){
try{
return jsonConfig.getCycleDetectionStrategy()
.handleRepeatedReferenceAsArray( array );
}catch( JSONException jsone ){
removeInstance( array... | class class_name[name] begin[{]
method[_fromArray, return_type[type[JSONArray]], modifier[private static], parameter[array, jsonConfig]] begin[{]
if[call[.addInstance, parameter[member[.array]]]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], ... | Keyword[private] Keyword[static] identifier[JSONArray] identifier[_fromArray] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[array] , identifier[JsonConfig] identifier[jsonConfig] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[addInstance] operator[SEP] identifier[array]... |
@Override
public DetachLoadBalancerFromSubnetsResult detachLoadBalancerFromSubnets(DetachLoadBalancerFromSubnetsRequest request) {
request = beforeClientExecution(request);
return executeDetachLoadBalancerFromSubnets(request);
} | class class_name[name] begin[{]
method[detachLoadBalancerFromSubnets, return_type[type[DetachLoadBalancerFromSubnetsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDetachLoad... | annotation[@] identifier[Override] Keyword[public] identifier[DetachLoadBalancerFromSubnetsResult] identifier[detachLoadBalancerFromSubnets] operator[SEP] identifier[DetachLoadBalancerFromSubnetsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operato... |
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "topoPrimitiveMember")
public JAXBElement<TopoPrimitiveMemberType> createTopoPrimitiveMember(TopoPrimitiveMemberType value) {
return new JAXBElement<TopoPrimitiveMemberType>(_TopoPrimitiveMember_QNAME, TopoPrimitiveMemberType.class, null, valu... | class class_name[name] begin[{]
method[createTopoPrimitiveMember, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_TopoPrimitiveMember_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassRef... | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[TopoPrimitiveMemberType] operator[>] identifier[createTopoPrimitiveMember] operator[SEP] i... |
private static boolean checkDate(Calendar cal, int date, int month) {
return cal.get(Calendar.DATE) == date && cal.get(Calendar.MONTH) == month;
} | class class_name[name] begin[{]
method[checkDate, return_type[type[boolean]], modifier[private static], parameter[cal, date, month]] begin[{]
return[binary_operation[binary_operation[call[cal.get, parameter[member[Calendar.DATE]]], ==, member[.date]], &&, binary_operation[call[cal.get, parameter[member... | Keyword[private] Keyword[static] Keyword[boolean] identifier[checkDate] operator[SEP] identifier[Calendar] identifier[cal] , Keyword[int] identifier[date] , Keyword[int] identifier[month] operator[SEP] {
Keyword[return] identifier[cal] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[S... |
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
if (onClickedDrawable != null) {
onClickedDrawable.draw(canvas);
}
} | class class_name[name] begin[{]
method[dispatchDraw, return_type[void], modifier[protected], parameter[canvas]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=canvas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dispatchDraw, postfix_operators=... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[dispatchDraw] operator[SEP] identifier[Canvas] identifier[canvas] operator[SEP] {
Keyword[super] operator[SEP] identifier[dispatchDraw] operator[SEP] identifier[canvas] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[... |
@Override
public void sawOpcode(int seen) {
try {
stack.precomputation(this);
if (seen == Const.INVOKESTATIC) {
String clsName = getClassConstantOperand();
if ("java/util/Arrays".equals(clsName)) {
String methodName = getNameConsta... | class class_name[name] begin[{]
method[sawOpcode, return_type[void], modifier[public], parameter[seen]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=precomputation, postfix_... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sawOpcode] operator[SEP] Keyword[int] identifier[seen] operator[SEP] {
Keyword[try] {
identifier[stack] operator[SEP] identifier[precomputation] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP]... |
@Invalidate
public void tearDown() {
if (registration != null) {
registration.unregister();
registration = null;
}
if (factoryRegistration != null) {
factoryRegistration.unregister();
factoryRegistration = null;
}
} | class class_name[name] begin[{]
method[tearDown, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.registration], !=, literal[null]]] begin[{]
call[registration.unregister, parameter[]]
assign[member[.registrat... | annotation[@] identifier[Invalidate] Keyword[public] Keyword[void] identifier[tearDown] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[registration] operator[!=] Other[null] operator[SEP] {
identifier[registration] operator[SEP] identifier[unregister] operator[SEP] operator[SEP] op... |
public static TimeZone toTimeZone(String strTimeZone, TimeZone defaultValue) {
return TimeZoneUtil.toTimeZone(strTimeZone, defaultValue);
} | class class_name[name] begin[{]
method[toTimeZone, return_type[type[TimeZone]], modifier[public static], parameter[strTimeZone, defaultValue]] begin[{]
return[call[TimeZoneUtil.toTimeZone, parameter[member[.strTimeZone], member[.defaultValue]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[TimeZone] identifier[toTimeZone] operator[SEP] identifier[String] identifier[strTimeZone] , identifier[TimeZone] identifier[defaultValue] operator[SEP] {
Keyword[return] identifier[TimeZoneUtil] operator[SEP] identifier[toTimeZone] operator[SEP] identifier[strTimeZone]... |
public String readString() throws IOException {
final int size = readRawVarint32();
if (size <= (bufferSize - bufferPos) && size > 0) {
// Fast path: We already have the bytes in a contiguous buffer, so
// just copy directly from it.
final String result = new String(buffer, bufferPos, size,... | class class_name[name] begin[{]
method[readString, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[int], size]
if[binary_operation[binary_operation[member[.size], <=, binary_operation[member[.bufferSize], -, member[.bufferPos]]], &&, binary_operati... | Keyword[public] identifier[String] identifier[readString] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] Keyword[int] identifier[size] operator[=] identifier[readRawVarint32] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[<=] op... |
public void setMask(String mask) {
if (mask != null && !mask.isEmpty()) {
AddResourcesListener.addResourceToHeadButAfterJQuery(C.BSF_LIBRARY, "js/jquery.inputmask.bundle.min.js");
}
getStateHelper().put(PropertyKeys.mask, mask);
} | class class_name[name] begin[{]
method[setMask, return_type[void], modifier[public], parameter[mask]] begin[{]
if[binary_operation[binary_operation[member[.mask], !=, literal[null]], &&, call[mask.isEmpty, parameter[]]]] begin[{]
call[AddResourcesListener.addResourceToHe... | Keyword[public] Keyword[void] identifier[setMask] operator[SEP] identifier[String] identifier[mask] operator[SEP] {
Keyword[if] operator[SEP] identifier[mask] operator[!=] Other[null] operator[&&] operator[!] identifier[mask] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
... |
Optional<PackingPlan.InstancePlan> getInstance(String componentName, int componentIndex) {
for (PackingPlan.InstancePlan instancePlan : this.instances) {
if (instancePlan.getComponentName().equals(componentName)
&& instancePlan.getComponentIndex() == componentIndex) {
return Optional.of(inst... | class class_name[name] begin[{]
method[getInstance, return_type[type[Optional]], modifier[default], parameter[componentName, componentIndex]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCompone... | identifier[Optional] operator[<] identifier[PackingPlan] operator[SEP] identifier[InstancePlan] operator[>] identifier[getInstance] operator[SEP] identifier[String] identifier[componentName] , Keyword[int] identifier[componentIndex] operator[SEP] {
Keyword[for] operator[SEP] identifier[PackingPlan] operator[SEP... |
@SuppressWarnings("rawtypes")
public Class getException() {
try {
return Class.forName(errorParam, true, Thread.currentThread().getContextClassLoader()).newInstance().getClass();
} catch (Exception e) {
return null;
}
} | class class_name[name] begin[{]
method[getException, return_type[type[Class]], modifier[public], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=errorParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Lite... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Class] identifier[getException] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[errorParam] , lit... |
public Instances samoaInstances(weka.core.Instances instances) {
Instances samoaInstances = samoaInstancesInformation(instances);
//We assume that we have only one samoaInstanceInformation for WekaToSamoaInstanceConverter
this.samoaInstanceInformation = samoaInstances;
for (int i = 0; i ... | class class_name[name] begin[{]
method[samoaInstances, return_type[type[Instances]], modifier[public], parameter[instances]] begin[{]
local_variable[type[Instances], samoaInstances]
assign[THIS[member[None.samoaInstanceInformation]], member[.samoaInstances]]
ForStatement(body=Bl... | Keyword[public] identifier[Instances] identifier[samoaInstances] operator[SEP] identifier[weka] operator[SEP] identifier[core] operator[SEP] identifier[Instances] identifier[instances] operator[SEP] {
identifier[Instances] identifier[samoaInstances] operator[=] identifier[samoaInstancesInformation] operator[SEP]... |
public static MozuUrl deletePropertyUrl(String attributeFQN, String productCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}");
formatter.formatUrl("attributeFQN", attributeFQN);
formatter.formatUrl("productCode", productCode);
... | class class_name[name] begin[{]
method[deletePropertyUrl, return_type[type[MozuUrl]], modifier[public static], parameter[attributeFQN, productCode]] begin[{]
local_variable[type[UrlFormatter], formatter]
call[formatter.formatUrl, parameter[literal["attributeFQN"], member[.attributeFQN]]... | Keyword[public] Keyword[static] identifier[MozuUrl] identifier[deletePropertyUrl] operator[SEP] identifier[String] identifier[attributeFQN] , identifier[String] identifier[productCode] operator[SEP] {
identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] ... |
public static <T> InjectionProvider<T> providerForNamedInstance(final String name, final T instance) {
return new NamedInstanceInjectionProvider<T>(name, instance);
} | class class_name[name] begin[{]
method[providerForNamedInstance, return_type[type[InjectionProvider]], modifier[public static], parameter[name, instance]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRef... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[InjectionProvider] operator[<] identifier[T] operator[>] identifier[providerForNamedInstance] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[T] identifier[instance] operator[SEP] {
Keyw... |
public String message(String key, Object... params) {
if (key == null) {
return null;
}
try {
String string = (getResourceBundle().containsKey(key)) ? getResourceBundle().getString(key) : key;
if (params != null) {
for (int i = 0; i < params.le... | class class_name[name] begin[{]
method[message, return_type[type[String]], modifier[public], parameter[key, params]] begin[{]
if[binary_operation[member[.key], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
TryStatement(block=[Lo... | Keyword[public] identifier[String] identifier[message] operator[SEP] identifier[String] identifier[key] , identifier[Object] operator[...] identifier[params] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
... |
public static InputStream getResource(String location) throws ResourceNotFoundException {
if (StringUtils.isEmpty(location)) {
throw new NullPointerException("location must not be null");
}
log.debug("获取资源[{}]", location);
try {
if (location.startsWith(ResourcePro... | class class_name[name] begin[{]
method[getResource, return_type[type[InputStream]], modifier[public static], parameter[location]] begin[{]
if[call[StringUtils.isEmpty, parameter[member[.location]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators... | Keyword[public] Keyword[static] identifier[InputStream] identifier[getResource] operator[SEP] identifier[String] identifier[location] operator[SEP] Keyword[throws] identifier[ResourceNotFoundException] {
Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[... |
public AttributeDataset summary() {
Attribute[] attr = {
new NumericAttribute("min"),
new NumericAttribute("q1"),
new NumericAttribute("median"),
new NumericAttribute("mean"),
new NumericAttribute("q3"),
new NumericA... | class class_name[name] begin[{]
method[summary, return_type[type[AttributeDataset]], modifier[public], parameter[]] begin[{]
local_variable[type[Attribute], attr]
local_variable[type[AttributeDataset], stat]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclarati... | Keyword[public] identifier[AttributeDataset] identifier[summary] operator[SEP] operator[SEP] {
identifier[Attribute] operator[SEP] operator[SEP] identifier[attr] operator[=] {
Keyword[new] identifier[NumericAttribute] operator[SEP] literal[String] operator[SEP] , Keyword[new] identifier[NumericAttrib... |
private static void countElements(byte[] fp, IAtomContainer mol) {
int b;
CountElements ce = new CountElements(mol);
b = 0;
if (ce.getCount("H") >= 4) fp[b >> 3] |= MASK[b % 8];
b = 1;
if (ce.getCount("H") >= 8) fp[b >> 3] |= MASK[b % 8];
b = 2;
if (ce.ge... | class class_name[name] begin[{]
method[countElements, return_type[void], modifier[private static], parameter[fp, mol]] begin[{]
local_variable[type[int], b]
local_variable[type[CountElements], ce]
assign[member[.b], literal[0]]
if[binary_operation[call[ce.getCoun... | Keyword[private] Keyword[static] Keyword[void] identifier[countElements] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[fp] , identifier[IAtomContainer] identifier[mol] operator[SEP] {
Keyword[int] identifier[b] operator[SEP] identifier[CountElements] identifier[ce] operator[=] Keyword[new] ... |
public void start () {
if (config.activationKey != null) {
input().keyboardEvents.connect(new Slot<Keyboard.Event>() {
public void onEmit (Keyboard.Event event) {
if (event instanceof Keyboard.KeyEvent) {
Keyboard.KeyEvent kevent = (Keyboard.KeyEvent)event;
if (kevent... | class class_name[name] begin[{]
method[start, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[config.activationKey], !=, literal[null]]] begin[{]
call[.input, parameter[]]
else begin[{]
None
end[}]
SYN... | Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[activationKey] operator[!=] Other[null] operator[SEP] {
identifier[input] operator[SEP] operator[SEP] operator[SEP] identifier[keyboardEvents] operator[SE... |
@Override
public GetIntegrationsResult getIntegrations(GetIntegrationsRequest request) {
request = beforeClientExecution(request);
return executeGetIntegrations(request);
} | class class_name[name] begin[{]
method[getIntegrations, return_type[type[GetIntegrationsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeGetIntegrations, parameter[member[.req... | annotation[@] identifier[Override] Keyword[public] identifier[GetIntegrationsResult] identifier[getIntegrations] operator[SEP] identifier[GetIntegrationsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o... |
public static String getSelectColumns(Class<?> entityClass) {
EntityTable entityTable = getEntityTable(entityClass);
if (entityTable.getBaseSelect() != null) {
return entityTable.getBaseSelect();
}
Set<EntityColumn> columnList = getColumns(entityClass);
StringBuilder ... | class class_name[name] begin[{]
method[getSelectColumns, return_type[type[String]], modifier[public static], parameter[entityClass]] begin[{]
local_variable[type[EntityTable], entityTable]
if[binary_operation[call[entityTable.getBaseSelect, parameter[]], !=, literal[null]]] begin[{]
... | Keyword[public] Keyword[static] identifier[String] identifier[getSelectColumns] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[entityClass] operator[SEP] {
identifier[EntityTable] identifier[entityTable] operator[=] identifier[getEntityTable] operator[SEP] identifier[entityClass] ... |
public static PageRange parse(String pages) {
ANTLRInputStream is = new ANTLRInputStream(pages);
InternalPageLexer lexer = new InternalPageLexer(is);
lexer.removeErrorListeners(); //do not output errors to console
CommonTokenStream tokens = new CommonTokenStream(lexer);
InternalPageParser parser = new Interna... | class class_name[name] begin[{]
method[parse, return_type[type[PageRange]], modifier[public static], parameter[pages]] begin[{]
local_variable[type[ANTLRInputStream], is]
local_variable[type[InternalPageLexer], lexer]
call[lexer.removeErrorListeners, parameter[]]
local_v... | Keyword[public] Keyword[static] identifier[PageRange] identifier[parse] operator[SEP] identifier[String] identifier[pages] operator[SEP] {
identifier[ANTLRInputStream] identifier[is] operator[=] Keyword[new] identifier[ANTLRInputStream] operator[SEP] identifier[pages] operator[SEP] operator[SEP] identifier[Inter... |
public List<ResolvedLocation> parse(String inputText, AncestryMode ancestryMode) throws Exception {
logger.trace("input: {}", inputText);
long extractStart = System.currentTimeMillis();
// first, extract location names from the text
List<LocationOccurrence> locationNames = extractor.ex... | class class_name[name] begin[{]
method[parse, return_type[type[List]], modifier[public], parameter[inputText, ancestryMode]] begin[{]
call[logger.trace, parameter[literal["input: {}"], member[.inputText]]]
local_variable[type[long], extractStart]
local_variable[type[List], locat... | Keyword[public] identifier[List] operator[<] identifier[ResolvedLocation] operator[>] identifier[parse] operator[SEP] identifier[String] identifier[inputText] , identifier[AncestryMode] identifier[ancestryMode] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[logger] operator[SEP] identifier[tra... |
public Map<String, String> getAll(RouteContext routeContext) {
String language = languages.getLanguageOrDefault(routeContext);
return getAll(language);
} | class class_name[name] begin[{]
method[getAll, return_type[type[Map]], modifier[public], parameter[routeContext]] begin[{]
local_variable[type[String], language]
return[call[.getAll, parameter[member[.language]]]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getAll] operator[SEP] identifier[RouteContext] identifier[routeContext] operator[SEP] {
identifier[String] identifier[language] operator[=] identifier[languages] operator[SEP] identifier[getLanguageOrDefau... |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
// Special case methods are looked up from a map and invoked.
// Do not trace because this includes some basic things like hashcode and equals.
// Important special case methods will take care of tracing themselv... | class class_name[name] begin[{]
method[invoke, return_type[type[Object]], modifier[public], parameter[proxy, method, args]] begin[{]
local_variable[type[WSJdbcProxyMethod], methImpl]
if[binary_operation[member[.methImpl], !=, literal[null]]] begin[{]
return[call[methImpl.invoke, paramet... | Keyword[public] identifier[Object] identifier[invoke] operator[SEP] identifier[Object] identifier[proxy] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] {
identifier[WSJdbcProxyMethod] identifier[methI... |
@Override
public Object convert(Class<?> targetType, Object value) {
// are we dealing with a number to number conversion?
if ((value instanceof Number) && Number.class.isAssignableFrom(targetType)) {
if (Integer.class.equals(targetType)) {
//intValue is the odd man out
... | class class_name[name] begin[{]
method[convert, return_type[type[Object]], modifier[public], parameter[targetType, value]] begin[{]
if[binary_operation[binary_operation[member[.value], instanceof, type[Number]], &&, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors... | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[convert] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[targetType] , identifier[Object] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[value] Keyword[instanceof... |
public Matrix4d setPerspective(double fovy, double aspect, double zNear, double zFar, boolean zZeroToOne) {
double h = Math.tan(fovy * 0.5);
m00 = 1.0 / (h * aspect);
m01 = 0.0;
m02 = 0.0;
m03 = 0.0;
m10 = 0.0;
m11 = 1.0 / h;
m12 = 0.0;
m13 = 0.0;
... | class class_name[name] begin[{]
method[setPerspective, return_type[type[Matrix4d]], modifier[public], parameter[fovy, aspect, zNear, zFar, zZeroToOne]] begin[{]
local_variable[type[double], h]
assign[member[.m00], binary_operation[literal[1.0], /, binary_operation[member[.h], *, member[... | Keyword[public] identifier[Matrix4d] identifier[setPerspective] operator[SEP] Keyword[double] identifier[fovy] , Keyword[double] identifier[aspect] , Keyword[double] identifier[zNear] , Keyword[double] identifier[zFar] , Keyword[boolean] identifier[zZeroToOne] operator[SEP] {
Keyword[double] identifier[h] op... |
public void fireAssignmentReadEvent(ResourceAssignment resourceAssignment)
{
if (m_projectListeners != null)
{
for (ProjectListener listener : m_projectListeners)
{
listener.assignmentRead(resourceAssignment);
}
}
} | class class_name[name] begin[{]
method[fireAssignmentReadEvent, return_type[void], modifier[public], parameter[resourceAssignment]] begin[{]
if[binary_operation[member[.m_projectListeners], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[Stateme... | Keyword[public] Keyword[void] identifier[fireAssignmentReadEvent] operator[SEP] identifier[ResourceAssignment] identifier[resourceAssignment] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_projectListeners] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[ProjectL... |
public void invokeInfoListener(int what, int extra) {
if (infoListener != null) {
infoListener.onInfo(player, what, extra);
}
} | class class_name[name] begin[{]
method[invokeInfoListener, return_type[void], modifier[public], parameter[what, extra]] begin[{]
if[binary_operation[member[.infoListener], !=, literal[null]]] begin[{]
call[infoListener.onInfo, parameter[member[.player], member[.what], me... | Keyword[public] Keyword[void] identifier[invokeInfoListener] operator[SEP] Keyword[int] identifier[what] , Keyword[int] identifier[extra] operator[SEP] {
Keyword[if] operator[SEP] identifier[infoListener] operator[!=] Other[null] operator[SEP] {
identifier[infoListener] operator[SEP] identifier[onInf... |
private NamingException newCannotInstantiateObjectException(String name,
Exception cause) {
String msgTxt = Tr.formatMessage(tc, "JNDI_CANNOT_INSTANTIATE_OBJECT_CWNEN1001E", name);
NamingException nex = new NamingException(msgTxt);
... | class class_name[name] begin[{]
method[newCannotInstantiateObjectException, return_type[type[NamingException]], modifier[private], parameter[name, cause]] begin[{]
local_variable[type[String], msgTxt]
local_variable[type[NamingException], nex]
call[nex.initCause, parameter[membe... | Keyword[private] identifier[NamingException] identifier[newCannotInstantiateObjectException] operator[SEP] identifier[String] identifier[name] , identifier[Exception] identifier[cause] operator[SEP] {
identifier[String] identifier[msgTxt] operator[=] identifier[Tr] operator[SEP] identifier[formatMessage] operat... |
public ApiResponse<NotifMessagesResponse> getMessagesWithHttpInfo(String notifId, Integer offset, Integer count, String order) throws ApiException {
com.squareup.okhttp.Call call = getMessagesValidateBeforeCall(notifId, offset, count, order, null, null);
Type localVarReturnType = new TypeToken<NotifMess... | class class_name[name] begin[{]
method[getMessagesWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[notifId, offset, count, order]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[me... | Keyword[public] identifier[ApiResponse] operator[<] identifier[NotifMessagesResponse] operator[>] identifier[getMessagesWithHttpInfo] operator[SEP] identifier[String] identifier[notifId] , identifier[Integer] identifier[offset] , identifier[Integer] identifier[count] , identifier[String] identifier[order] operator[S... |
public void destroy() throws SIResourceException, SIException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"destroy");
// Drive destroy against the associated MQLink object
if(_mqLinkObject != null)
_mqLinkObject.destroy();
... | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal[... | Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] Keyword[throws] identifier[SIResourceException] , identifier[SIException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] ope... |
public SDVariable[] getInputVariablesForFunction(DifferentialFunction function) {
val inputs = getInputsForFunction(function);
if (inputs == null) {
throw new ND4JIllegalStateException("No inputs found for function " + function);
}
val vars = new SDVariable[inputs.length];
... | class class_name[name] begin[{]
method[getInputVariablesForFunction, return_type[type[SDVariable]], modifier[public], parameter[function]] begin[{]
local_variable[type[val], inputs]
if[binary_operation[member[.inputs], ==, literal[null]]] begin[{]
ThrowStatement(expression=C... | Keyword[public] identifier[SDVariable] operator[SEP] operator[SEP] identifier[getInputVariablesForFunction] operator[SEP] identifier[DifferentialFunction] identifier[function] operator[SEP] {
identifier[val] identifier[inputs] operator[=] identifier[getInputsForFunction] operator[SEP] identifier[function] operat... |
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Empty, OperationMetadata> deleteModelAsync(
DeleteModelRequest request) {
return deleteModelOperationCallable().futureCall(request);
} | class class_name[name] begin[{]
method[deleteModelAsync, return_type[type[OperationFuture]], modifier[final public], parameter[request]] begin[{]
return[call[.deleteModelOperationCallable, parameter[]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[OperationMetadata] operator[>] identifier[deleteModelAsync] operator[SEP] identifier[DeleteModelRequest] identifier[request] operator[SEP] ... |
private void failover(long globalModVersionOfFailover) {
if (!executionGraph.getRestartStrategy().canRestart()) {
executionGraph.failGlobal(new FlinkException("RestartStrategy validate fail"));
}
else {
JobStatus curStatus = this.state;
if (curStatus.equals(JobStatus.RUNNING)) {
cancel(globalModVersi... | class class_name[name] begin[{]
method[failover, return_type[void], modifier[private], parameter[globalModVersionOfFailover]] begin[{]
if[call[executionGraph.getRestartStrategy, parameter[]]] begin[{]
call[executionGraph.failGlobal, parameter[ClassCreator(arguments=[Lite... | Keyword[private] Keyword[void] identifier[failover] operator[SEP] Keyword[long] identifier[globalModVersionOfFailover] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[executionGraph] operator[SEP] identifier[getRestartStrategy] operator[SEP] operator[SEP] operator[SEP] identifier[canRestart] ope... |
public SIMPIterator getRemoteSubscriptionIterator()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getRemoteSubscriptionIterator");
DestinationTypeFilter filter = new DestinationTypeFilter();
filter.QUEUE = Boolean.FALSE;
Collection mpAIHCollecti... | class class_name[name] begin[{]
method[getRemoteSubscriptionIterator, return_type[type[SIMPIterator]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.en... | Keyword[public] identifier[SIMPIterator] identifier[getRemoteSubscriptionIterator] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] oper... |
@Override
public ActionCommand execute(ActionMapping mapping, FormBean formBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
List<TagBean> tagBeans = new ArrayList<>();
for (TagAO tag : getTagAPI().getTags()) {
TagBean tagBean = new TagBean();
tagBean.setName(tag.getName())... | class class_name[name] begin[{]
method[execute, return_type[type[ActionCommand]], modifier[public], parameter[mapping, formBean, request, response]] begin[{]
local_variable[type[List], tagBeans]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], de... | annotation[@] identifier[Override] Keyword[public] identifier[ActionCommand] identifier[execute] operator[SEP] identifier[ActionMapping] identifier[mapping] , identifier[FormBean] identifier[formBean] , identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator... |
@Override
public List<CommerceOrderItem> findByC_S(long commerceOrderId,
boolean subscription) {
return findByC_S(commerceOrderId, subscription, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null);
} | class class_name[name] begin[{]
method[findByC_S, return_type[type[List]], modifier[public], parameter[commerceOrderId, subscription]] begin[{]
return[call[.findByC_S, parameter[member[.commerceOrderId], member[.subscription], member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]]
e... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceOrderItem] operator[>] identifier[findByC_S] operator[SEP] Keyword[long] identifier[commerceOrderId] , Keyword[boolean] identifier[subscription] operator[SEP] {
Keyword[return] identifier[findByC_S] operator[SEP] ... |
public static void generate(Elements elementUtils, Filer filer, SQLiteDatabaseSchema schema) throws Exception {
BindDaoFactoryBuilder visitor = new BindDaoFactoryBuilder(elementUtils, filer, schema);
visitor.buildDaoFactoryInterface(elementUtils, filer, schema);
String daoFactoryName = BindDaoFactoryBuilder.gener... | class class_name[name] begin[{]
method[generate, return_type[void], modifier[public static], parameter[elementUtils, filer, schema]] begin[{]
local_variable[type[BindDaoFactoryBuilder], visitor]
call[visitor.buildDaoFactoryInterface, parameter[member[.elementUtils], member[.filer], memb... | Keyword[public] Keyword[static] Keyword[void] identifier[generate] operator[SEP] identifier[Elements] identifier[elementUtils] , identifier[Filer] identifier[filer] , identifier[SQLiteDatabaseSchema] identifier[schema] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[BindDaoFactoryBuilder] iden... |
public Button deserialize(JsonElement json, Type typeOfT,
JsonDeserializationContext context) throws JsonParseException {
String buttonTypeString = json.getAsJsonObject().get("type")
.getAsString();
ButtonType buttonType = ButtonType.valueOf(buttonTypeString
.toUpperCase());
Class<?> buttonClass = getB... | class class_name[name] begin[{]
method[deserialize, return_type[type[Button]], modifier[public], parameter[json, typeOfT, context]] begin[{]
local_variable[type[String], buttonTypeString]
local_variable[type[ButtonType], buttonType]
local_variable[type[Class], buttonClass]
retur... | Keyword[public] identifier[Button] identifier[deserialize] operator[SEP] identifier[JsonElement] identifier[json] , identifier[Type] identifier[typeOfT] , identifier[JsonDeserializationContext] identifier[context] operator[SEP] Keyword[throws] identifier[JsonParseException] {
identifier[String] identifier[butt... |
@Override
public void end() {
final EntityManager em = entityManager.get();
// Let's not penalize users for calling end() multiple times.
if (null == em) {
return;
}
final EntityTransaction tx = em.getTransaction();
if(tx.isActive()) {
LOG.war... | class class_name[name] begin[{]
method[end, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[EntityManager], em]
if[binary_operation[literal[null], ==, member[.em]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_v... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[end] operator[SEP] operator[SEP] {
Keyword[final] identifier[EntityManager] identifier[em] operator[=] identifier[entityManager] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null... |
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
xen_supplemental_pack_responses result = (xen_supplemental_pack_responses) service.get_payload_formatter().string_to_resource(xen_supplemental_pack_responses.class, response);
if(result.errorcode != 0)
... | class class_name[name] begin[{]
method[get_nitro_bulk_response, return_type[type[base_resource]], modifier[protected], parameter[service, response]] begin[{]
local_variable[type[xen_supplemental_pack_responses], result]
if[binary_operation[member[result.errorcode], !=, literal[0]]] begi... | Keyword[protected] identifier[base_resource] operator[SEP] operator[SEP] identifier[get_nitro_bulk_response] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[xen_supplemental_pack_responses] ide... |
public void setSnapshots(java.util.Collection<Snapshot> snapshots) {
if (snapshots == null) {
this.snapshots = null;
return;
}
this.snapshots = new com.amazonaws.internal.SdkInternalList<Snapshot>(snapshots);
} | class class_name[name] begin[{]
method[setSnapshots, return_type[void], modifier[public], parameter[snapshots]] begin[{]
if[binary_operation[member[.snapshots], ==, literal[null]]] begin[{]
assign[THIS[member[None.snapshots]], literal[null]]
return[None]
... | Keyword[public] Keyword[void] identifier[setSnapshots] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Snapshot] operator[>] identifier[snapshots] operator[SEP] {
Keyword[if] operator[SEP] identifier[snapshots] operator[==] Other[null] ope... |
public GetLogGroupFieldsResult withLogGroupFields(LogGroupField... logGroupFields) {
if (this.logGroupFields == null) {
setLogGroupFields(new com.amazonaws.internal.SdkInternalList<LogGroupField>(logGroupFields.length));
}
for (LogGroupField ele : logGroupFields) {
this.l... | class class_name[name] begin[{]
method[withLogGroupFields, return_type[type[GetLogGroupFieldsResult]], modifier[public], parameter[logGroupFields]] begin[{]
if[binary_operation[THIS[member[None.logGroupFields]], ==, literal[null]]] begin[{]
call[.setLogGroupFields, param... | Keyword[public] identifier[GetLogGroupFieldsResult] identifier[withLogGroupFields] operator[SEP] identifier[LogGroupField] operator[...] identifier[logGroupFields] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[logGroupFields] operator[==] Other[null] operator[SEP] {
... |
public List<IntVar> getOutgoing(Node n) {
List<IntVar> l = outgoings.get(n);
if (l == null) {
l = Collections.emptyList();
}
return l;
} | class class_name[name] begin[{]
method[getOutgoing, return_type[type[List]], modifier[public], parameter[n]] begin[{]
local_variable[type[List], l]
if[binary_operation[member[.l], ==, literal[null]]] begin[{]
assign[member[.l], call[Collections.emptyList, paramet... | Keyword[public] identifier[List] operator[<] identifier[IntVar] operator[>] identifier[getOutgoing] operator[SEP] identifier[Node] identifier[n] operator[SEP] {
identifier[List] operator[<] identifier[IntVar] operator[>] identifier[l] operator[=] identifier[outgoings] operator[SEP] identifier[get] operator[SEP] ... |
public void detect(T input, QueueCorner exclude ) {
initializeDerivatives(input);
if (detector.getRequiresGradient() || detector.getRequiresHessian())
gradient.process(input, derivX, derivY);
if (detector.getRequiresHessian())
hessian.process(derivX, derivY, derivXX, derivYY, derivXY);
detector.setExcl... | class class_name[name] begin[{]
method[detect, return_type[void], modifier[public], parameter[input, exclude]] begin[{]
call[.initializeDerivatives, parameter[member[.input]]]
if[binary_operation[call[detector.getRequiresGradient, parameter[]], ||, call[detector.getRequiresHessi... | Keyword[public] Keyword[void] identifier[detect] operator[SEP] identifier[T] identifier[input] , identifier[QueueCorner] identifier[exclude] operator[SEP] {
identifier[initializeDerivatives] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[detector] operator[SEP] ... |
@Override
@SuppressWarnings("unchecked")
public void visit(final Visitable visitable) {
if (visitable instanceof Identifiable) {
((Identifiable<T>) visitable).setId(getIdentifierSequence().nextId());
}
} | class class_name[name] begin[{]
method[visit, return_type[void], modifier[public], parameter[visitable]] begin[{]
if[binary_operation[member[.visitable], instanceof, type[Identifiable]]] begin[{]
Cast(expression=MemberReference(member=visitable, postfix_operators=[], pre... | annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Visitable] identifier[visitable] operator[SEP] {
Keyword[if] operator[SEP] identifier[visitable] Keywor... |
public static boolean hasDefaultConstructor(TypeDef item) {
if (item == null) {
return false;
} else if (item.getConstructors().isEmpty()) {
return true;
} else {
for (Method constructor : item.getConstructors()) {
if (constructor.getArguments(... | class class_name[name] begin[{]
method[hasDefaultConstructor, return_type[type[boolean]], modifier[public static], parameter[item]] begin[{]
if[binary_operation[member[.item], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
if[call[item.getConst... | Keyword[public] Keyword[static] Keyword[boolean] identifier[hasDefaultConstructor] operator[SEP] identifier[TypeDef] identifier[item] operator[SEP] {
Keyword[if] operator[SEP] identifier[item] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keywo... |
@RequestMapping(value = "/login", method = RequestMethod.POST)
public String login(HttpServletRequest request, HttpServletResponse response,
@ModelAttribute LoginForm loginForm, BindingResult result)
throws ServletException {
try {
request.login(loginForm.getUsername(), loginForm.getPassword());
}
catch... | class class_name[name] begin[{]
method[login, return_type[type[String]], modifier[public], parameter[request, response, loginForm, result]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUsername, postfix_operators=[], pr... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] identifier[String] identifier[login] operator[SEP] identifier[HttpServletRequest] identifier[reque... |
public Record parseRecord(DocumentBuilder stringdb, Element elParent, String strTagName, String strDatabase, BaseTable table, BaseTable tableMain, boolean bIsMainHasReferenceField)
{
Record record = null;
if (table != null)
record = table.getRecord();
if (record == null)
{
... | class class_name[name] begin[{]
method[parseRecord, return_type[type[Record]], modifier[public], parameter[stringdb, elParent, strTagName, strDatabase, table, tableMain, bIsMainHasReferenceField]] begin[{]
local_variable[type[Record], record]
if[binary_operation[member[.table], !=, lite... | Keyword[public] identifier[Record] identifier[parseRecord] operator[SEP] identifier[DocumentBuilder] identifier[stringdb] , identifier[Element] identifier[elParent] , identifier[String] identifier[strTagName] , identifier[String] identifier[strDatabase] , identifier[BaseTable] identifier[table] , identifier[BaseTa... |
private static String normalizePath(final String path, final String separator) {
final String p = path.replace(WINDOWS_SEPARATOR, separator).replace(UNIX_SEPARATOR, separator);
// remove "." from the directory.
final List<String> dirs = new LinkedList<>();
final StringTokenizer tokenizer... | class class_name[name] begin[{]
method[normalizePath, return_type[type[String]], modifier[private static], parameter[path, separator]] begin[{]
local_variable[type[String], p]
local_variable[type[List], dirs]
local_variable[type[StringTokenizer], tokenizer]
while[call[to... | Keyword[private] Keyword[static] identifier[String] identifier[normalizePath] operator[SEP] Keyword[final] identifier[String] identifier[path] , Keyword[final] identifier[String] identifier[separator] operator[SEP] {
Keyword[final] identifier[String] identifier[p] operator[=] identifier[path] operator[SEP] iden... |
public static GroupCommunicationMessage getGCM(final Message<GroupCommunicationMessage> msg) {
final Iterator<GroupCommunicationMessage> gcmIterator = msg.getData().iterator();
if (gcmIterator.hasNext()) {
final GroupCommunicationMessage gcm = gcmIterator.next();
if (gcmIterator.hasNext()) {
... | class class_name[name] begin[{]
method[getGCM, return_type[type[GroupCommunicationMessage]], modifier[public static], parameter[msg]] begin[{]
local_variable[type[Iterator], gcmIterator]
if[call[gcmIterator.hasNext, parameter[]]] begin[{]
local_variable[type[GroupCommunicati... | Keyword[public] Keyword[static] identifier[GroupCommunicationMessage] identifier[getGCM] operator[SEP] Keyword[final] identifier[Message] operator[<] identifier[GroupCommunicationMessage] operator[>] identifier[msg] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[GroupCommunicationMess... |
@Override
public synchronized void remove(Object handle) throws IOException {
Long id = handleToId(handle);
events.remove(id);
// Be lazy about removing handles from the collectionIds map - this can happen during the
// getHandles call.
} | class class_name[name] begin[{]
method[remove, return_type[void], modifier[synchronized public], parameter[handle]] begin[{]
local_variable[type[Long], id]
call[events.remove, parameter[member[.id]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[remove] operator[SEP] identifier[Object] identifier[handle] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[Long] identifier[id] operator[=] identifier[handleToId] operator[SEP] identifier[handle]... |
protected void work(final IResource resource, final List<WorkItem> resources, IProgressMonitor monitor) {
IPreferenceStore store = FindbugsPlugin.getPluginPreferences(getProject());
boolean runAsJob = store.getBoolean(FindBugsConstants.KEY_RUN_ANALYSIS_AS_EXTRA_JOB);
FindBugsJob fbJob = new Star... | class class_name[name] begin[{]
method[work, return_type[void], modifier[protected], parameter[resource, resources, monitor]] begin[{]
local_variable[type[IPreferenceStore], store]
local_variable[type[boolean], runAsJob]
local_variable[type[FindBugsJob], fbJob]
if[member... | Keyword[protected] Keyword[void] identifier[work] operator[SEP] Keyword[final] identifier[IResource] identifier[resource] , Keyword[final] identifier[List] operator[<] identifier[WorkItem] operator[>] identifier[resources] , identifier[IProgressMonitor] identifier[monitor] operator[SEP] {
identifier[IPreferenc... |
@Override
public void put(int partitionId, String HSIdStr) throws KeeperException, InterruptedException {
try {
m_zk.create(ZKUtil.joinZKPath(m_rootNode, Integer.toString(partitionId)),
HSIdStr.getBytes(Charsets.UTF_8),
Ids.OPEN_ACL_UNSAFE, CreateMode.PERS... | class class_name[name] begin[{]
method[put, return_type[void], modifier[public], parameter[partitionId, HSIdStr]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=m_rootNode, postfix_operators=[], prefix_operators... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] Keyword[int] identifier[partitionId] , identifier[String] identifier[HSIdStr] operator[SEP] Keyword[throws] identifier[KeeperException] , identifier[InterruptedException] {
Keyword[try] {
identifier[m_zk] ... |
public Observable<ExpressRouteCircuitsArpTableListResultInner> listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1<ServiceRespon... | class class_name[name] begin[{]
method[listArpTableAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, crossConnectionName, peeringName, devicePath]] begin[{]
return[call[.listArpTableWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.crossConnectio... | Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteCircuitsArpTableListResultInner] operator[>] identifier[listArpTableAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[crossConnectionName] , identifier[String] identifier[peeringName] , ident... |
public ProjectMetrics getProjectProfile(String projectPath) {
ProjectMetrics result = projects.get(projectPath);
if (result == null) {
result = new ProjectMetrics(projectPath);
projects.put(projectPath, result);
}
return result;
} | class class_name[name] begin[{]
method[getProjectProfile, return_type[type[ProjectMetrics]], modifier[public], parameter[projectPath]] begin[{]
local_variable[type[ProjectMetrics], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
assign[m... | Keyword[public] identifier[ProjectMetrics] identifier[getProjectProfile] operator[SEP] identifier[String] identifier[projectPath] operator[SEP] {
identifier[ProjectMetrics] identifier[result] operator[=] identifier[projects] operator[SEP] identifier[get] operator[SEP] identifier[projectPath] operator[SEP] operat... |
private HeaderWriterFilter createHeaderWriterFilter() {
List<HeaderWriter> writers = getHeaderWriters();
if (writers.isEmpty()) {
throw new IllegalStateException(
"Headers security is enabled, but no headers will be added. Either add headers or disable headers security");
}
HeaderWriterFilter headersFil... | class class_name[name] begin[{]
method[createHeaderWriterFilter, return_type[type[HeaderWriterFilter]], modifier[private], parameter[]] begin[{]
local_variable[type[List], writers]
if[call[writers.isEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(argumen... | Keyword[private] identifier[HeaderWriterFilter] identifier[createHeaderWriterFilter] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[HeaderWriter] operator[>] identifier[writers] operator[=] identifier[getHeaderWriters] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ide... |
protected <T extends TableEntity, R> Iterable<?> generateIteratorForQuery(final TableQuery<T> queryRef,
final EntityResolver<R> resolver, TableRequestOptions options, OperationContext opContext) {
if (opContext == null) {
opContext = new OperationContext();
}
opContext.... | class class_name[name] begin[{]
method[generateIteratorForQuery, return_type[type[Iterable]], modifier[protected], parameter[queryRef, resolver, options, opContext]] begin[{]
if[binary_operation[member[.opContext], ==, literal[null]]] begin[{]
assign[member[.opContext], ... | Keyword[protected] operator[<] identifier[T] Keyword[extends] identifier[TableEntity] , identifier[R] operator[>] identifier[Iterable] operator[<] operator[?] operator[>] identifier[generateIteratorForQuery] operator[SEP] Keyword[final] identifier[TableQuery] operator[<] identifier[T] operator[>] identifier[queryRef] ... |
public static boolean parseRanges(FileRequestContext context) {
if( !StringUtils.isBlank(context.range) ) {
Matcher rangeMatcher = rangePattern.matcher(context.range);
if(rangeMatcher.matches()) {
String ranges[] = rangeMatcher.group(1).split(",");
for(String range : ranges) {
... | class class_name[name] begin[{]
method[parseRanges, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{]
if[call[StringUtils.isBlank, parameter[member[context.range]]]] begin[{]
local_variable[type[Matcher], rangeMatcher]
if[call[... | Keyword[public] Keyword[static] Keyword[boolean] identifier[parseRanges] operator[SEP] identifier[FileRequestContext] identifier[context] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[context] operator[SEP] identifier[rang... |
public Class forceLoadSystemClass(String classname) throws ClassNotFoundException {
log("force system loading " + classname, Project.MSG_DEBUG);
Class theClass = findLoadedClass(classname);
if (theClass == null) {
theClass = findBaseClass(classname);
}
return theCla... | class class_name[name] begin[{]
method[forceLoadSystemClass, return_type[type[Class]], modifier[public], parameter[classname]] begin[{]
call[.log, parameter[binary_operation[literal["force system loading "], +, member[.classname]], member[Project.MSG_DEBUG]]]
local_variable[type[Class],... | Keyword[public] identifier[Class] identifier[forceLoadSystemClass] operator[SEP] identifier[String] identifier[classname] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
identifier[log] operator[SEP] literal[String] operator[+] identifier[classname] , identifier[Project] operator[SEP] identif... |
@SuppressWarnings("deprecation")
private void drawRoundedHole(Canvas canvas) {
paint.setStyle(Paint.Style.FILL);
paint.setColor(backColor);
// Punching hole in background color requires offscreen drawing
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
canvas... | class class_name[name] begin[{]
method[drawRoundedHole, return_type[void], modifier[private], parameter[canvas]] begin[{]
call[paint.setStyle, parameter[member[Paint.Style.FILL]]]
call[paint.setColor, parameter[member[.backColor]]]
if[binary_operation[member[Buil... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[drawRoundedHole] operator[SEP] identifier[Canvas] identifier[canvas] operator[SEP] {
identifier[paint] operator[SEP] identifier[setStyle] operator[SEP] identifier[Paint] operator[SEP] ... |
public void marshall(Message message, ProtocolMarshaller protocolMarshaller) {
if (message == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(message.getContentType(), CONTENTTYPE_BINDING);
... | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[message, protocolMarshaller]] begin[{]
if[binary_operation[member[.message], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], p... | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Message] identifier[message] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] i... |
public Nfs3SymlinkRequest makeSymlinkRequest(String symbolicLinkData, byte[] parentDirectoryFileHandle, String name,
NfsSetAttributes attributes) throws FileNotFoundException {
return new Nfs3SymlinkRequest(symbolicLinkData, parentDirectoryFileHandle, name, attributes, _credential);
} | class class_name[name] begin[{]
method[makeSymlinkRequest, return_type[type[Nfs3SymlinkRequest]], modifier[public], parameter[symbolicLinkData, parentDirectoryFileHandle, name, attributes]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=symbolicLinkData, postfix_operators=[], prefix_ope... | Keyword[public] identifier[Nfs3SymlinkRequest] identifier[makeSymlinkRequest] operator[SEP] identifier[String] identifier[symbolicLinkData] , Keyword[byte] operator[SEP] operator[SEP] identifier[parentDirectoryFileHandle] , identifier[String] identifier[name] , identifier[NfsSetAttributes] identifier[attributes] ope... |
public static Collection<AbstractAttribute> findAttributesByTagName(
final boolean parallel, final String tagName,
final AbstractHtml... fromTags) throws NullValueException {
if (tagName == null) {
throw new NullValueException("The tagName should not be null");
}
... | class class_name[name] begin[{]
method[findAttributesByTagName, return_type[type[Collection]], modifier[public static], parameter[parallel, tagName, fromTags]] begin[{]
if[binary_operation[member[.tagName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(argument... | Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[AbstractAttribute] operator[>] identifier[findAttributesByTagName] operator[SEP] Keyword[final] Keyword[boolean] identifier[parallel] , Keyword[final] identifier[String] identifier[tagName] , Keyword[final] identifier[AbstractHtml] operator... |
private static ResourceCache loadResourceCache() {
try {
ResourceCache cache = Bootstrap.getService(ResourceCache.class);
if (cache == null) {
cache = new DefaultResourceCache();
}
return cache;
} catch (Exception e) {
LOG.log(L... | class class_name[name] begin[{]
method[loadResourceCache, return_type[type[ResourceCache]], modifier[private static], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(... | Keyword[private] Keyword[static] identifier[ResourceCache] identifier[loadResourceCache] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[ResourceCache] identifier[cache] operator[=] identifier[Bootstrap] operator[SEP] identifier[getService] operator[SEP] identifier[ResourceCache] operator[SEP]... |
public Set<String> extractColumnsToInsertOrUpdate(final JQLContext jqlContext, String jqlValue, final Finder<SQLProperty> entity) {
final Set<String> result = new LinkedHashSet<String>();
final One<Boolean> selectionOn = new One<Boolean>(null);
final One<Boolean> insertOn = new One<Boolean>(null);
// Column_n... | class class_name[name] begin[{]
method[extractColumnsToInsertOrUpdate, return_type[type[Set]], modifier[public], parameter[jqlContext, jqlValue, entity]] begin[{]
local_variable[type[Set], result]
local_variable[type[One], selectionOn]
local_variable[type[One], insertOn]
... | Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[extractColumnsToInsertOrUpdate] operator[SEP] Keyword[final] identifier[JQLContext] identifier[jqlContext] , identifier[String] identifier[jqlValue] , Keyword[final] identifier[Finder] operator[<] identifier[SQLProperty] operator[>]... |
public final LogMetric createLogMetric(String parent, LogMetric metric) {
CreateLogMetricRequest request =
CreateLogMetricRequest.newBuilder().setParent(parent).setMetric(metric).build();
return createLogMetric(request);
} | class class_name[name] begin[{]
method[createLogMetric, return_type[type[LogMetric]], modifier[final public], parameter[parent, metric]] begin[{]
local_variable[type[CreateLogMetricRequest], request]
return[call[.createLogMetric, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[LogMetric] identifier[createLogMetric] operator[SEP] identifier[String] identifier[parent] , identifier[LogMetric] identifier[metric] operator[SEP] {
identifier[CreateLogMetricRequest] identifier[request] operator[=] identifier[CreateLogMetricRequest] operator[SEP] iden... |
@SuppressWarnings({"rawtypes", "unchecked"})
private static Object mergeList(Object... objs) {
List list = new ArrayList();
for (Object li : objs) {
List src = (List) li;
for (Object obj : src) {
if (!list.contains(obj)) {
list.add(obj);
... | class class_name[name] begin[{]
method[mergeList, return_type[type[Object]], modifier[private static], parameter[objs]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dim... | annotation[@] identifier[SuppressWarnings] operator[SEP] {
literal[String] , literal[String]
} operator[SEP] Keyword[private] Keyword[static] identifier[Object] identifier[mergeList] operator[SEP] identifier[Object] operator[...] identifier[objs] operator[SEP] {
identifier[List] identifier[list] opera... |
public static <T> T eq(T value) {
reportMatcher(new Equals(value));
if (value == null)
return null;
return (T) Primitives.defaultValue(value.getClass());
} | class class_name[name] begin[{]
method[eq, return_type[type[T]], modifier[public static], parameter[value]] begin[{]
call[.reportMatcher, parameter[ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[eq] operator[SEP] identifier[T] identifier[value] operator[SEP] {
identifier[reportMatcher] operator[SEP] Keyword[new] identifier[Equals] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keywor... |
public String convertIfcAnalysisTheoryTypeEnumToString(EDataType eDataType, Object instanceValue) {
return instanceValue == null ? null : instanceValue.toString();
} | class class_name[name] begin[{]
method[convertIfcAnalysisTheoryTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_oper... | Keyword[public] identifier[String] identifier[convertIfcAnalysisTheoryTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] {
Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] ... |
protected TypeValuePairType getTypeValuePair(String type, byte[] value) {
TypeValuePairType tvp = new TypeValuePairType();
tvp.setType(type);
//tvp.setValue(Base64.encodeBase64Chunked(value));
// the TVP itself base64 encodes now, no need for this
tvp.setValue(value);
ret... | class class_name[name] begin[{]
method[getTypeValuePair, return_type[type[TypeValuePairType]], modifier[protected], parameter[type, value]] begin[{]
local_variable[type[TypeValuePairType], tvp]
call[tvp.setType, parameter[member[.type]]]
call[tvp.setValue, parameter[memb... | Keyword[protected] identifier[TypeValuePairType] identifier[getTypeValuePair] operator[SEP] identifier[String] identifier[type] , Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] {
identifier[TypeValuePairType] identifier[tvp] operator[=] Keyword[new] identifier[TypeValuePairType] opera... |
boolean checkValidation() {
boolean result;
if (m_changedEntityIds.isEmpty()) {
result = true;
} else if (m_saveButton.isEnabled()) {
result = true;
} else {
result = false;
CmsNotification.get().send(Type.ERROR, m_saveButton.getD... | class class_name[name] begin[{]
method[checkValidation, return_type[type[boolean]], modifier[default], parameter[]] begin[{]
local_variable[type[boolean], result]
if[call[m_changedEntityIds.isEmpty, parameter[]]] begin[{]
assign[member[.result], literal[true]]
... | Keyword[boolean] identifier[checkValidation] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[m_changedEntityIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identifier[result] operator[=] literal[boo... |
public WordNumberCollectorBundle addData(String key, String data) {
if (JMString.isNumber(data))
addNumber(key, Double.valueOf(data));
else
addWord(key, data);
return this;
} | class class_name[name] begin[{]
method[addData, return_type[type[WordNumberCollectorBundle]], modifier[public], parameter[key, data]] begin[{]
if[call[JMString.isNumber, parameter[member[.data]]]] begin[{]
call[.addNumber, parameter[member[.key], call[Double.valueOf, parameter[membe... | Keyword[public] identifier[WordNumberCollectorBundle] identifier[addData] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[data] operator[SEP] {
Keyword[if] operator[SEP] identifier[JMString] operator[SEP] identifier[isNumber] operator[SEP] identifier[data] operator[SEP] operator... |
synchronized List<FutureReadResultEntry> seal() {
this.sealed = true;
List<FutureReadResultEntry> result = new ArrayList<>(this.reads);
this.reads.clear();
return result;
} | class class_name[name] begin[{]
method[seal, return_type[type[List]], modifier[synchronized], parameter[]] begin[{]
assign[THIS[member[None.sealed]], literal[true]]
local_variable[type[List], result]
THIS[member[None.reads]call[None.clear, parameter[]]]
return[me... | Keyword[synchronized] identifier[List] operator[<] identifier[FutureReadResultEntry] operator[>] identifier[seal] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[sealed] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[FutureReadResultEntry] operator[>] iden... |
private static synchronized LogRecordHandler getBinaryHandler() {
if (binaryHandler == null) {
binaryHandler = new LogRecordHandler(TRACE_THRESHOLD, LogRepositoryManagerImpl.KNOWN_FORMATTERS[0]);
}
return binaryHandler;
} | class class_name[name] begin[{]
method[getBinaryHandler, return_type[type[LogRecordHandler]], modifier[synchronized private static], parameter[]] begin[{]
if[binary_operation[member[.binaryHandler], ==, literal[null]]] begin[{]
assign[member[.binaryHandler], ClassCreator... | Keyword[private] Keyword[static] Keyword[synchronized] identifier[LogRecordHandler] identifier[getBinaryHandler] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[binaryHandler] operator[==] Other[null] operator[SEP] {
identifier[binaryHandler] operator[=] Keyword[new] identifier[LogR... |
static public Date getStandardDate(String text) {
double value;
String udunitString;
text = text.trim();
StringTokenizer stoker = new StringTokenizer(text);
String firstToke = stoker.nextToken();
try {
value = Double.parseDouble(firstToke);
udunitString = text.substring(fir... | class class_name[name] begin[{]
method[getStandardDate, return_type[type[Date]], modifier[public static], parameter[text]] begin[{]
local_variable[type[double], value]
local_variable[type[String], udunitString]
assign[member[.text], call[text.trim, parameter[]]]
local_va... | Keyword[static] Keyword[public] identifier[Date] identifier[getStandardDate] operator[SEP] identifier[String] identifier[text] operator[SEP] {
Keyword[double] identifier[value] operator[SEP] identifier[String] identifier[udunitString] operator[SEP] identifier[text] operator[=] identifier[text] operator[SEP] iden... |
private static String getRequiredSpaces(String reference, String message) {
StringBuilder res = new StringBuilder();
int requiredSpaces = reference.length() - message.length() - 4;
for (int i = 0; i < requiredSpaces; i++) {
res.append(" ");
}
return res.toString();
... | class class_name[name] begin[{]
method[getRequiredSpaces, return_type[type[String]], modifier[private static], parameter[reference, message]] begin[{]
local_variable[type[StringBuilder], res]
local_variable[type[int], requiredSpaces]
ForStatement(body=BlockStatement(label=None, statemen... | Keyword[private] Keyword[static] identifier[String] identifier[getRequiredSpaces] operator[SEP] identifier[String] identifier[reference] , identifier[String] identifier[message] operator[SEP] {
identifier[StringBuilder] identifier[res] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SE... |
protected static String convertRawUriToRegex(String rawUri) {
// convert capturing groups in route regex to non-capturing groups
// this is to avoid count mismatch of path params and groups in uri regex
Matcher groupMatcher = Pattern.compile("\\(([^?].*)\\)").matcher(rawUri);
String con... | class class_name[name] begin[{]
method[convertRawUriToRegex, return_type[type[String]], modifier[static protected], parameter[rawUri]] begin[{]
local_variable[type[Matcher], groupMatcher]
local_variable[type[String], converted]
local_variable[type[Matcher], matcher]
local_variab... | Keyword[protected] Keyword[static] identifier[String] identifier[convertRawUriToRegex] operator[SEP] identifier[String] identifier[rawUri] operator[SEP] {
identifier[Matcher] identifier[groupMatcher] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] ope... |
public void removeChannelFromCache(long channelId) {
channels.computeIfPresent(channelId, (key, channel) -> {
if (channel instanceof Cleanupable) {
((Cleanupable) channel).cleanup();
}
return null;
});
} | class class_name[name] begin[{]
method[removeChannelFromCache, return_type[void], modifier[public], parameter[channelId]] begin[{]
call[channels.computeIfPresent, parameter[member[.channelId], LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=channel, ... | Keyword[public] Keyword[void] identifier[removeChannelFromCache] operator[SEP] Keyword[long] identifier[channelId] operator[SEP] {
identifier[channels] operator[SEP] identifier[computeIfPresent] operator[SEP] identifier[channelId] , operator[SEP] identifier[key] , identifier[channel] operator[SEP] operator[->]... |
public void setThen(XExpression newThen)
{
if (newThen != then)
{
NotificationChain msgs = null;
if (then != null)
msgs = ((InternalEObject)then).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XIF_EXPRESSION__THEN, null, msgs);
if (newThen != null)
msgs = ((InternalEObject)newThen).eIn... | class class_name[name] begin[{]
method[setThen, return_type[void], modifier[public], parameter[newThen]] begin[{]
if[binary_operation[member[.newThen], !=, member[.then]]] begin[{]
local_variable[type[NotificationChain], msgs]
if[binary_operation[member[.then... | Keyword[public] Keyword[void] identifier[setThen] operator[SEP] identifier[XExpression] identifier[newThen] operator[SEP] {
Keyword[if] operator[SEP] identifier[newThen] operator[!=] identifier[then] operator[SEP] {
identifier[NotificationChain] identifier[msgs] operator[=] Other[null] operator[SEP] K... |
public static AppEventsLogger newLogger(Context context, String applicationId, Session session) {
return new AppEventsLogger(context, applicationId, session);
} | class class_name[name] begin[{]
method[newLogger, return_type[type[AppEventsLogger]], modifier[public static], parameter[context, applicationId, session]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Member... | Keyword[public] Keyword[static] identifier[AppEventsLogger] identifier[newLogger] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[applicationId] , identifier[Session] identifier[session] operator[SEP] {
Keyword[return] Keyword[new] identifier[AppEventsLogger] operator[SEP]... |
public void initializeStringTable() {
stringTable = new byte[4096][];
for (int i=0; i<256; i++) {
stringTable[i] = new byte[1];
stringTable[i][0] = (byte)i;
}
tableIndex = 258;
bitsToGet = 9;
} | class class_name[name] begin[{]
method[initializeStringTable, return_type[void], modifier[public], parameter[]] begin[{]
assign[member[.stringTable], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4096), None], initializer=None, p... | Keyword[public] Keyword[void] identifier[initializeStringTable] operator[SEP] operator[SEP] {
identifier[stringTable] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[4096] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0]... |
private static boolean compareArrays(Object array1, Object array2, Deque stack, Set visited)
{
// Same instance check already performed...
int len = Array.getLength(array1);
if (len != Array.getLength(array2))
{
return false;
}
for (int i = 0; i < len; i... | class class_name[name] begin[{]
method[compareArrays, return_type[type[boolean]], modifier[private static], parameter[array1, array2, stack, visited]] begin[{]
local_variable[type[int], len]
if[binary_operation[member[.len], !=, call[Array.getLength, parameter[member[.array2]]]]] begin[... | Keyword[private] Keyword[static] Keyword[boolean] identifier[compareArrays] operator[SEP] identifier[Object] identifier[array1] , identifier[Object] identifier[array2] , identifier[Deque] identifier[stack] , identifier[Set] identifier[visited] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifie... |
public void load(File sourceFile) throws CompilationFailedException {
reset();
try {
classLoader.parseClass(sourceFile);
} catch (IOException e) {
throw new AstInspectorException("cannot read source file", e);
} catch (AstSuccessfullyCaptured e) {
indexAstNodes();
return;
}
... | class class_name[name] begin[{]
method[load, return_type[void], modifier[public], parameter[sourceFile]] begin[{]
call[.reset, parameter[]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceFile, postfix_operators=[], prefix_oper... | Keyword[public] Keyword[void] identifier[load] operator[SEP] identifier[File] identifier[sourceFile] operator[SEP] Keyword[throws] identifier[CompilationFailedException] {
identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[classLoader] operator[SEP] identifier[parseC... |
private String getOldCodeId(FileStatus srcStat ) throws IOException {
if (codec.id.equals("xor") || codec.id.equals("rs")) {
return codec.id;
} else {
// Search for xor/rs parity files
if (ParityFilePair.getParityFile(
Codec.getCodec("xor"), srcStat, this.conf) != null)
return ... | class class_name[name] begin[{]
method[getOldCodeId, return_type[type[String]], modifier[private], parameter[srcStat]] begin[{]
if[binary_operation[call[codec.id.equals, parameter[literal["xor"]]], ||, call[codec.id.equals, parameter[literal["rs"]]]]] begin[{]
return[member[codec.id... | Keyword[private] identifier[String] identifier[getOldCodeId] operator[SEP] identifier[FileStatus] identifier[srcStat] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[codec] operator[SEP] identifier[id] operator[SEP] identifier[equals] operator[SEP] literal[String] ope... |
public static List<Episode> getAllEpisodes(String urlString, int season) throws TvDbException {
List<Episode> episodeList = new ArrayList<>();
Episode episode;
NodeList nlEpisode;
Node nEpisode;
Element eEpisode;
Document doc = DOMHelper.getEventDocFromUrl(urlString);
... | class class_name[name] begin[{]
method[getAllEpisodes, return_type[type[List]], modifier[public static], parameter[urlString, season]] begin[{]
local_variable[type[List], episodeList]
local_variable[type[Episode], episode]
local_variable[type[NodeList], nlEpisode]
local_variable... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Episode] operator[>] identifier[getAllEpisodes] operator[SEP] identifier[String] identifier[urlString] , Keyword[int] identifier[season] operator[SEP] Keyword[throws] identifier[TvDbException] {
identifier[List] operator[<] identifier[Episo... |
private Configuration makeEvaluatorConfiguration(final ResourceLaunchEvent resourceLaunchEvent)
throws IOException {
return Tang.Factory.getTang()
.newConfigurationBuilder(resourceLaunchEvent.getEvaluatorConf())
.build();
} | class class_name[name] begin[{]
method[makeEvaluatorConfiguration, return_type[type[Configuration]], modifier[private], parameter[resourceLaunchEvent]] begin[{]
return[call[Tang.Factory.getTang, parameter[]]]
end[}]
END[}] | Keyword[private] identifier[Configuration] identifier[makeEvaluatorConfiguration] operator[SEP] Keyword[final] identifier[ResourceLaunchEvent] identifier[resourceLaunchEvent] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] identifier[Tang] operator[SEP] identifier[Factory] operator[SEP] i... |
public void setMobileDeviceSubmodelSegment(com.google.api.ads.admanager.axis.v201811.MobileDeviceSubmodelTargeting mobileDeviceSubmodelSegment) {
this.mobileDeviceSubmodelSegment = mobileDeviceSubmodelSegment;
} | class class_name[name] begin[{]
method[setMobileDeviceSubmodelSegment, return_type[void], modifier[public], parameter[mobileDeviceSubmodelSegment]] begin[{]
assign[THIS[member[None.mobileDeviceSubmodelSegment]], member[.mobileDeviceSubmodelSegment]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setMobileDeviceSubmodelSegment] operator[SEP] 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[v201811] operator[SEP] identifie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.