id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
14,100 | kiegroup/drools | drools-core/src/main/java/org/drools/core/base/evaluators/Operator.java | Operator.addOperatorToRegistry | public static Operator addOperatorToRegistry(final String operatorId,
final boolean isNegated) {
Operator op = new Operator( operatorId,
isNegated );
CACHE.put( getKey( operatorId,
isNegated )... | java | public static Operator addOperatorToRegistry(final String operatorId,
final boolean isNegated) {
Operator op = new Operator( operatorId,
isNegated );
CACHE.put( getKey( operatorId,
isNegated )... | [
"public",
"static",
"Operator",
"addOperatorToRegistry",
"(",
"final",
"String",
"operatorId",
",",
"final",
"boolean",
"isNegated",
")",
"{",
"Operator",
"op",
"=",
"new",
"Operator",
"(",
"operatorId",
",",
"isNegated",
")",
";",
"CACHE",
".",
"put",
"(",
... | Creates a new Operator instance for the given parameters,
adds it to the registry and return it
@param operatorId the identification symbol of the operator
@param isNegated true if it is negated
@return the newly created operator | [
"Creates",
"a",
"new",
"Operator",
"instance",
"for",
"the",
"given",
"parameters",
"adds",
"it",
"to",
"the",
"registry",
"and",
"return",
"it"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/base/evaluators/Operator.java#L86-L94 |
14,101 | kiegroup/drools | drools-core/src/main/java/org/drools/core/base/evaluators/Operator.java | Operator.determineOperator | public static Operator determineOperator(final String operatorId,
final boolean isNegated) {
Operator op = CACHE.get( getKey( operatorId,
isNegated ) );
return op;
} | java | public static Operator determineOperator(final String operatorId,
final boolean isNegated) {
Operator op = CACHE.get( getKey( operatorId,
isNegated ) );
return op;
} | [
"public",
"static",
"Operator",
"determineOperator",
"(",
"final",
"String",
"operatorId",
",",
"final",
"boolean",
"isNegated",
")",
"{",
"Operator",
"op",
"=",
"CACHE",
".",
"get",
"(",
"getKey",
"(",
"operatorId",
",",
"isNegated",
")",
")",
";",
"return"... | Returns the operator instance for the given parameters
@param operatorId the identification symbol of the operator
@param isNegated true if it is negated
@return the operator in case it exists | [
"Returns",
"the",
"operator",
"instance",
"for",
"the",
"given",
"parameters"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/base/evaluators/Operator.java#L108-L113 |
14,102 | kiegroup/drools | drools-core/src/main/java/org/drools/core/audit/WorkingMemoryLogger.java | WorkingMemoryLogger.filterLogEvent | private void filterLogEvent(final LogEvent logEvent) {
for ( ILogEventFilter filter: this.filters) {
// do nothing if one of the filters doesn't accept the event
if ( !filter.acceptEvent( logEvent ) ) {
return;
}
}
// if all the filters accepte... | java | private void filterLogEvent(final LogEvent logEvent) {
for ( ILogEventFilter filter: this.filters) {
// do nothing if one of the filters doesn't accept the event
if ( !filter.acceptEvent( logEvent ) ) {
return;
}
}
// if all the filters accepte... | [
"private",
"void",
"filterLogEvent",
"(",
"final",
"LogEvent",
"logEvent",
")",
"{",
"for",
"(",
"ILogEventFilter",
"filter",
":",
"this",
".",
"filters",
")",
"{",
"// do nothing if one of the filters doesn't accept the event",
"if",
"(",
"!",
"filter",
".",
"accep... | This method is invoked every time a new log event is created.
It filters out unwanted events.
@param logEvent | [
"This",
"method",
"is",
"invoked",
"every",
"time",
"a",
"new",
"log",
"event",
"is",
"created",
".",
"It",
"filters",
"out",
"unwanted",
"events",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/audit/WorkingMemoryLogger.java#L196-L206 |
14,103 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/DefaultRuleSheetListener.java | DefaultRuleSheetListener.objectTypeRow | private void objectTypeRow(final int row,
final int column,
final String value,
final int mergedColStart) {
if ( value.contains( "$param" ) || value.contains( "$1" ) ) {
throw new DecisionTableParseException( "It looks like you have snippets in the row that is " +... | java | private void objectTypeRow(final int row,
final int column,
final String value,
final int mergedColStart) {
if ( value.contains( "$param" ) || value.contains( "$1" ) ) {
throw new DecisionTableParseException( "It looks like you have snippets in the row that is " +... | [
"private",
"void",
"objectTypeRow",
"(",
"final",
"int",
"row",
",",
"final",
"int",
"column",
",",
"final",
"String",
"value",
",",
"final",
"int",
"mergedColStart",
")",
"{",
"if",
"(",
"value",
".",
"contains",
"(",
"\"$param\"",
")",
"||",
"value",
"... | This is for handling a row where an object declaration may appear,
this is the row immediately above the snippets.
It may be blank, but there has to be a row here.
Merged cells have "special meaning" which is why this is so freaking hard.
A future refactor may be to move away from an "event" based listener. | [
"This",
"is",
"for",
"handling",
"a",
"row",
"where",
"an",
"object",
"declaration",
"may",
"appear",
"this",
"is",
"the",
"row",
"immediately",
"above",
"the",
"snippets",
".",
"It",
"may",
"be",
"blank",
"but",
"there",
"has",
"to",
"be",
"a",
"row",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/DefaultRuleSheetListener.java#L494-L529 |
14,104 | kiegroup/drools | drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserTokenManagerBase.java | GeneratedDrlConstraintParserTokenManagerBase.tokenRange | private static TokenRange tokenRange(Token token) {
JavaToken javaToken = token.javaToken;
return new TokenRange(javaToken, javaToken);
} | java | private static TokenRange tokenRange(Token token) {
JavaToken javaToken = token.javaToken;
return new TokenRange(javaToken, javaToken);
} | [
"private",
"static",
"TokenRange",
"tokenRange",
"(",
"Token",
"token",
")",
"{",
"JavaToken",
"javaToken",
"=",
"token",
".",
"javaToken",
";",
"return",
"new",
"TokenRange",
"(",
"javaToken",
",",
"javaToken",
")",
";",
"}"
] | Create a TokenRange that spans exactly one token | [
"Create",
"a",
"TokenRange",
"that",
"spans",
"exactly",
"one",
"token"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserTokenManagerBase.java#L49-L52 |
14,105 | kiegroup/drools | drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserTokenManagerBase.java | GeneratedDrlConstraintParserTokenManagerBase.createCommentFromToken | static Comment createCommentFromToken(Token token) {
String commentText = token.image;
if (token.kind == JAVADOC_COMMENT) {
return new JavadocComment(tokenRange(token), commentText.substring(3, commentText.length() - 2));
} else if (token.kind == MULTI_LINE_COMMENT) {
ret... | java | static Comment createCommentFromToken(Token token) {
String commentText = token.image;
if (token.kind == JAVADOC_COMMENT) {
return new JavadocComment(tokenRange(token), commentText.substring(3, commentText.length() - 2));
} else if (token.kind == MULTI_LINE_COMMENT) {
ret... | [
"static",
"Comment",
"createCommentFromToken",
"(",
"Token",
"token",
")",
"{",
"String",
"commentText",
"=",
"token",
".",
"image",
";",
"if",
"(",
"token",
".",
"kind",
"==",
"JAVADOC_COMMENT",
")",
"{",
"return",
"new",
"JavadocComment",
"(",
"tokenRange",
... | Since comments are completely captured in a single token, including their delimiters, deconstruct them here so we
can turn them into nodes later on. | [
"Since",
"comments",
"are",
"completely",
"captured",
"in",
"a",
"single",
"token",
"including",
"their",
"delimiters",
"deconstruct",
"them",
"here",
"so",
"we",
"can",
"turn",
"them",
"into",
"nodes",
"later",
"on",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserTokenManagerBase.java#L58-L76 |
14,106 | kiegroup/drools | drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java | AbstractEventSupport.removeEventListener | public final synchronized void removeEventListener(final Class cls) {
for (int listenerIndex = 0; listenerIndex < this.listeners.size();) {
E listener = this.listeners.get(listenerIndex);
if (cls.isAssignableFrom(listener.getClass())) {
this.listeners.remove(... | java | public final synchronized void removeEventListener(final Class cls) {
for (int listenerIndex = 0; listenerIndex < this.listeners.size();) {
E listener = this.listeners.get(listenerIndex);
if (cls.isAssignableFrom(listener.getClass())) {
this.listeners.remove(... | [
"public",
"final",
"synchronized",
"void",
"removeEventListener",
"(",
"final",
"Class",
"cls",
")",
"{",
"for",
"(",
"int",
"listenerIndex",
"=",
"0",
";",
"listenerIndex",
"<",
"this",
".",
"listeners",
".",
"size",
"(",
")",
";",
")",
"{",
"E",
"liste... | Removes all event listeners of the specified class. Note that this method needs to be
synchonized because it performs two independent operations on the underlying list
@param cls class of listener to remove | [
"Removes",
"all",
"event",
"listeners",
"of",
"the",
"specified",
"class",
".",
"Note",
"that",
"this",
"method",
"needs",
"to",
"be",
"synchonized",
"because",
"it",
"performs",
"two",
"independent",
"operations",
"on",
"the",
"underlying",
"list"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/event/AbstractEventSupport.java#L85-L95 |
14,107 | kiegroup/drools | drools-examples/src/main/java/org/drools/examples/sudoku/Cell.java | Cell.makeReferences | public void makeReferences(CellRow row, CellCol col, CellSqr sqr) {
this.cellRow = row;
this.cellCol = col;
this.cellSqr = sqr;
this.exCells = new HashSet<Cell>();
this.exCells.addAll(this.cellRow.getCells());
this.exCells.addAll(this.cellCol.getCells());
this.exC... | java | public void makeReferences(CellRow row, CellCol col, CellSqr sqr) {
this.cellRow = row;
this.cellCol = col;
this.cellSqr = sqr;
this.exCells = new HashSet<Cell>();
this.exCells.addAll(this.cellRow.getCells());
this.exCells.addAll(this.cellCol.getCells());
this.exC... | [
"public",
"void",
"makeReferences",
"(",
"CellRow",
"row",
",",
"CellCol",
"col",
",",
"CellSqr",
"sqr",
")",
"{",
"this",
".",
"cellRow",
"=",
"row",
";",
"this",
".",
"cellCol",
"=",
"col",
";",
"this",
".",
"cellSqr",
"=",
"sqr",
";",
"this",
".",... | Set references to all cell groups containing this cell.
@param row the cell group for the row
@param col the cell group for the column
@param sqr the cell group for the square 3x3 area | [
"Set",
"references",
"to",
"all",
"cell",
"groups",
"containing",
"this",
"cell",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-examples/src/main/java/org/drools/examples/sudoku/Cell.java#L46-L55 |
14,108 | kiegroup/drools | drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/report/html/UrlFactory.java | UrlFactory.getUrl | public static String getUrl(Object o) {
if ( o instanceof VerifierRule ) {
VerifierRule rule = (VerifierRule) o;
return getRuleUrl( UrlFactory.RULE_FOLDER,
rule.getPath(),
rule.getName() );
}
return o.toString... | java | public static String getUrl(Object o) {
if ( o instanceof VerifierRule ) {
VerifierRule rule = (VerifierRule) o;
return getRuleUrl( UrlFactory.RULE_FOLDER,
rule.getPath(),
rule.getName() );
}
return o.toString... | [
"public",
"static",
"String",
"getUrl",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"o",
"instanceof",
"VerifierRule",
")",
"{",
"VerifierRule",
"rule",
"=",
"(",
"VerifierRule",
")",
"o",
";",
"return",
"getRuleUrl",
"(",
"UrlFactory",
".",
"RULE_FOLDER",
",... | Finds a link to object if one exists.
@param o
Object that might have a page that can be linked.
@return Link to objects page or the toString() text if no link could not
be created. | [
"Finds",
"a",
"link",
"to",
"object",
"if",
"one",
"exists",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/report/html/UrlFactory.java#L49-L58 |
14,109 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ClassUtils.java | ClassUtils.loadClass | public static Class<?> loadClass(String className,
ClassLoader classLoader) {
Class cls = (Class) classes.get( className );
if ( cls == null ) {
try {
cls = Class.forName( className );
} catch ( Exception e ) {
... | java | public static Class<?> loadClass(String className,
ClassLoader classLoader) {
Class cls = (Class) classes.get( className );
if ( cls == null ) {
try {
cls = Class.forName( className );
} catch ( Exception e ) {
... | [
"public",
"static",
"Class",
"<",
"?",
">",
"loadClass",
"(",
"String",
"className",
",",
"ClassLoader",
"classLoader",
")",
"{",
"Class",
"cls",
"=",
"(",
"Class",
")",
"classes",
".",
"get",
"(",
"className",
")",
";",
"if",
"(",
"cls",
"==",
"null",... | This method will attempt to load the specified Class. It uses
a syncrhonized HashMap to cache the reflection Class lookup. | [
"This",
"method",
"will",
"attempt",
"to",
"load",
"the",
"specified",
"Class",
".",
"It",
"uses",
"a",
"syncrhonized",
"HashMap",
"to",
"cache",
"the",
"reflection",
"Class",
"lookup",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ClassUtils.java#L196-L246 |
14,110 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ClassUtils.java | ClassUtils.instantiateObject | public static Object instantiateObject(String className,
ClassLoader classLoader) {
Object object;
try {
object = loadClass(className, classLoader).newInstance();
} catch ( Throwable e ) {
throw new RuntimeException( "Unable to i... | java | public static Object instantiateObject(String className,
ClassLoader classLoader) {
Object object;
try {
object = loadClass(className, classLoader).newInstance();
} catch ( Throwable e ) {
throw new RuntimeException( "Unable to i... | [
"public",
"static",
"Object",
"instantiateObject",
"(",
"String",
"className",
",",
"ClassLoader",
"classLoader",
")",
"{",
"Object",
"object",
";",
"try",
"{",
"object",
"=",
"loadClass",
"(",
"className",
",",
"classLoader",
")",
".",
"newInstance",
"(",
")"... | This method will attempt to create an instance of the specified Class. It uses
a syncrhonized HashMap to cache the reflection Class lookup. | [
"This",
"method",
"will",
"attempt",
"to",
"create",
"an",
"instance",
"of",
"the",
"specified",
"Class",
".",
"It",
"uses",
"a",
"syncrhonized",
"HashMap",
"to",
"cache",
"the",
"reflection",
"Class",
"lookup",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ClassUtils.java#L257-L267 |
14,111 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ClassUtils.java | ClassUtils.addImportStylePatterns | public static void addImportStylePatterns(Map<String, Object> patterns,
String str) {
if ( str == null || "".equals( str.trim() ) ) {
return;
}
String[] items = str.split( " " );
for (String item : items) {
String qua... | java | public static void addImportStylePatterns(Map<String, Object> patterns,
String str) {
if ( str == null || "".equals( str.trim() ) ) {
return;
}
String[] items = str.split( " " );
for (String item : items) {
String qua... | [
"public",
"static",
"void",
"addImportStylePatterns",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"patterns",
",",
"String",
"str",
")",
"{",
"if",
"(",
"str",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"str",
".",
"trim",
"(",
")",
")",
")",... | Populates the import style pattern map from give comma delimited string | [
"Populates",
"the",
"import",
"style",
"pattern",
"map",
"from",
"give",
"comma",
"delimited",
"string"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ClassUtils.java#L308-L341 |
14,112 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ClassUtils.java | ClassUtils.isMatched | public static boolean isMatched(Map<String, Object> patterns,
String className) {
// Array [] object class names are "[x", where x is the first letter of the array type
// -> NO '.' in class name, thus!
// see http://download.oracle.com/javase/6/docs/api/java/... | java | public static boolean isMatched(Map<String, Object> patterns,
String className) {
// Array [] object class names are "[x", where x is the first letter of the array type
// -> NO '.' in class name, thus!
// see http://download.oracle.com/javase/6/docs/api/java/... | [
"public",
"static",
"boolean",
"isMatched",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"patterns",
",",
"String",
"className",
")",
"{",
"// Array [] object class names are \"[x\", where x is the first letter of the array type",
"// -> NO '.' in class name, thus!",
"// see ... | Determines if a given full qualified class name matches any import style patterns. | [
"Determines",
"if",
"a",
"given",
"full",
"qualified",
"class",
"name",
"matches",
"any",
"import",
"style",
"patterns",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ClassUtils.java#L346-L372 |
14,113 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ClassUtils.java | ClassUtils.getPackage | public static String getPackage(Class<?> cls) {
// cls.getPackage() sometimes returns null, in which case fall back to string massaging.
java.lang.Package pkg = cls.isArray() ? cls.getComponentType().getPackage() : cls.getPackage();
if ( pkg == null ) {
int dotPos;
int do... | java | public static String getPackage(Class<?> cls) {
// cls.getPackage() sometimes returns null, in which case fall back to string massaging.
java.lang.Package pkg = cls.isArray() ? cls.getComponentType().getPackage() : cls.getPackage();
if ( pkg == null ) {
int dotPos;
int do... | [
"public",
"static",
"String",
"getPackage",
"(",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"// cls.getPackage() sometimes returns null, in which case fall back to string massaging.",
"java",
".",
"lang",
".",
"Package",
"pkg",
"=",
"cls",
".",
"isArray",
"(",
")",
"?... | Extracts the package name from the given class object | [
"Extracts",
"the",
"package",
"name",
"from",
"the",
"given",
"class",
"object"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ClassUtils.java#L377-L400 |
14,114 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/auditlog/AuditLog.java | AuditLog.add | public boolean add( AuditLogEntry e ) {
if ( filter == null ) {
throw new IllegalStateException( "AuditLogFilter has not been set. Please set before inserting entries." );
}
if ( filter.accept( e ) ) {
entries.addFirst( e );
return true;
}
retu... | java | public boolean add( AuditLogEntry e ) {
if ( filter == null ) {
throw new IllegalStateException( "AuditLogFilter has not been set. Please set before inserting entries." );
}
if ( filter.accept( e ) ) {
entries.addFirst( e );
return true;
}
retu... | [
"public",
"boolean",
"add",
"(",
"AuditLogEntry",
"e",
")",
"{",
"if",
"(",
"filter",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"AuditLogFilter has not been set. Please set before inserting entries.\"",
")",
";",
"}",
"if",
"(",
"filter... | Add a new AuditLogEntry at the beginning of the list. This is different
behaviour to a regular List but it prevents the need to sort entries in
descending order. | [
"Add",
"a",
"new",
"AuditLogEntry",
"at",
"the",
"beginning",
"of",
"the",
"list",
".",
"This",
"is",
"different",
"behaviour",
"to",
"a",
"regular",
"List",
"but",
"it",
"prevents",
"the",
"need",
"to",
"sort",
"entries",
"in",
"descending",
"order",
"."
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/auditlog/AuditLog.java#L80-L89 |
14,115 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/ParseException.java | ParseException.getMessage | public String getMessage() {
if ( this.cause == null ) {
return super.getMessage() + " Line number: " + this.lineNumber;
} else {
return super.getMessage() + " Line number: " + this.lineNumber + ". Caused by: " + this.cause.getMessage();
}
} | java | public String getMessage() {
if ( this.cause == null ) {
return super.getMessage() + " Line number: " + this.lineNumber;
} else {
return super.getMessage() + " Line number: " + this.lineNumber + ". Caused by: " + this.cause.getMessage();
}
} | [
"public",
"String",
"getMessage",
"(",
")",
"{",
"if",
"(",
"this",
".",
"cause",
"==",
"null",
")",
"{",
"return",
"super",
".",
"getMessage",
"(",
")",
"+",
"\" Line number: \"",
"+",
"this",
".",
"lineNumber",
";",
"}",
"else",
"{",
"return",
"super... | This will print out a summary, including the line number.
It will also print out the cause message if applicable. | [
"This",
"will",
"print",
"out",
"a",
"summary",
"including",
"the",
"line",
"number",
".",
"It",
"will",
"also",
"print",
"out",
"the",
"cause",
"message",
"if",
"applicable",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/ParseException.java#L60-L66 |
14,116 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ConfFileUtils.java | ConfFileUtils.getURL | public static URL getURL(String confName, ClassLoader classLoader, Class cls) {
URL url = null;
// User home
String userHome = System.getProperty( "user.home" );
if ( userHome.endsWith( "\\" ) || userHome.endsWith( "/" ) ) {
url = getURLForFile( userHome + confName ... | java | public static URL getURL(String confName, ClassLoader classLoader, Class cls) {
URL url = null;
// User home
String userHome = System.getProperty( "user.home" );
if ( userHome.endsWith( "\\" ) || userHome.endsWith( "/" ) ) {
url = getURLForFile( userHome + confName ... | [
"public",
"static",
"URL",
"getURL",
"(",
"String",
"confName",
",",
"ClassLoader",
"classLoader",
",",
"Class",
"cls",
")",
"{",
"URL",
"url",
"=",
"null",
";",
"// User home ",
"String",
"userHome",
"=",
"System",
".",
"getProperty",
"(",
"\"user.home\"",
... | Return the URL for a given conf file
@param confName
@param classLoader
@return | [
"Return",
"the",
"URL",
"for",
"a",
"given",
"conf",
"file"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ConfFileUtils.java#L35-L96 |
14,117 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/ConfFileUtils.java | ConfFileUtils.getURLForFile | public static URL getURLForFile(String fileName) {
URL url = null;
if ( fileName != null ) {
File file = new File( fileName );
if ( file != null && file.exists() ) {
try {
url = file.toURL();
} catch ( MalformedURLException e ) ... | java | public static URL getURLForFile(String fileName) {
URL url = null;
if ( fileName != null ) {
File file = new File( fileName );
if ( file != null && file.exists() ) {
try {
url = file.toURL();
} catch ( MalformedURLException e ) ... | [
"public",
"static",
"URL",
"getURLForFile",
"(",
"String",
"fileName",
")",
"{",
"URL",
"url",
"=",
"null",
";",
"if",
"(",
"fileName",
"!=",
"null",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"fileName",
")",
";",
"if",
"(",
"file",
"!=",
... | Return URL for given filename
@param fileName
@return
URL | [
"Return",
"URL",
"for",
"given",
"filename"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/ConfFileUtils.java#L105-L118 |
14,118 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/descr/AnnotatedBaseDescr.java | AnnotatedBaseDescr.addAnnotation | public AnnotationDescr addAnnotation( String name,
String value ) {
if ( this.annotations == null ) {
this.annotations = new HashMap<String, AnnotationDescr>();
} else {
AnnotationDescr existingAnnotation = annotations.get( name );
... | java | public AnnotationDescr addAnnotation( String name,
String value ) {
if ( this.annotations == null ) {
this.annotations = new HashMap<String, AnnotationDescr>();
} else {
AnnotationDescr existingAnnotation = annotations.get( name );
... | [
"public",
"AnnotationDescr",
"addAnnotation",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"if",
"(",
"this",
".",
"annotations",
"==",
"null",
")",
"{",
"this",
".",
"annotations",
"=",
"new",
"HashMap",
"<",
"String",
",",
"AnnotationDescr",
... | Assigns a new annotation to this type with the respective name and value
@param name
@param value
@return returns the previous value of this annotation | [
"Assigns",
"a",
"new",
"annotation",
"to",
"this",
"type",
"with",
"the",
"respective",
"name",
"and",
"value"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/descr/AnnotatedBaseDescr.java#L92-L108 |
14,119 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/descr/AnnotatedBaseDescr.java | AnnotatedBaseDescr.getAnnotation | public AnnotationDescr getAnnotation( String name ) {
return annotations == null ? null : annotations.get( name );
} | java | public AnnotationDescr getAnnotation( String name ) {
return annotations == null ? null : annotations.get( name );
} | [
"public",
"AnnotationDescr",
"getAnnotation",
"(",
"String",
"name",
")",
"{",
"return",
"annotations",
"==",
"null",
"?",
"null",
":",
"annotations",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Returns the annotation with the given name
@param name | [
"Returns",
"the",
"annotation",
"with",
"the",
"given",
"name"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/descr/AnnotatedBaseDescr.java#L114-L116 |
14,120 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java | LogicTransformer.initialize | private void initialize() {
// these pairs will be transformed
addTransformationPair( GroupElement.NOT,
new NotOrTransformation() );
addTransformationPair( GroupElement.EXISTS,
new ExistOrTransformation() );
addTransformationP... | java | private void initialize() {
// these pairs will be transformed
addTransformationPair( GroupElement.NOT,
new NotOrTransformation() );
addTransformationPair( GroupElement.EXISTS,
new ExistOrTransformation() );
addTransformationP... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"// these pairs will be transformed",
"addTransformationPair",
"(",
"GroupElement",
".",
"NOT",
",",
"new",
"NotOrTransformation",
"(",
")",
")",
";",
"addTransformationPair",
"(",
"GroupElement",
".",
"EXISTS",
",",
"... | sets up the parent->child transformations map | [
"sets",
"up",
"the",
"parent",
"-",
">",
"child",
"transformations",
"map"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java#L56-L64 |
14,121 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java | LogicTransformer.fixClonedDeclarations | protected void fixClonedDeclarations( GroupElement and, Map<String, Class<?>> globals ) {
Stack<RuleConditionElement> contextStack = new Stack<RuleConditionElement>();
DeclarationScopeResolver resolver = new DeclarationScopeResolver( globals,
... | java | protected void fixClonedDeclarations( GroupElement and, Map<String, Class<?>> globals ) {
Stack<RuleConditionElement> contextStack = new Stack<RuleConditionElement>();
DeclarationScopeResolver resolver = new DeclarationScopeResolver( globals,
... | [
"protected",
"void",
"fixClonedDeclarations",
"(",
"GroupElement",
"and",
",",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"globals",
")",
"{",
"Stack",
"<",
"RuleConditionElement",
">",
"contextStack",
"=",
"new",
"Stack",
"<",
"RuleConditionEleme... | During the logic transformation, we eventually clone CEs,
specially patterns and corresponding declarations. So now
we need to fix any references to cloned declarations. | [
"During",
"the",
"logic",
"transformation",
"we",
"eventually",
"clone",
"CEs",
"specially",
"patterns",
"and",
"corresponding",
"declarations",
".",
"So",
"now",
"we",
"need",
"to",
"fix",
"any",
"references",
"to",
"cloned",
"declarations",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java#L147-L157 |
14,122 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java | LogicTransformer.processTree | private void processTree(final GroupElement ce, boolean[] result) throws InvalidPatternException {
boolean hasChildOr = false;
// first we elimininate any redundancy
ce.pack();
for (Object child : ce.getChildren().toArray()) {
if (child instanceof GroupElement) {
... | java | private void processTree(final GroupElement ce, boolean[] result) throws InvalidPatternException {
boolean hasChildOr = false;
// first we elimininate any redundancy
ce.pack();
for (Object child : ce.getChildren().toArray()) {
if (child instanceof GroupElement) {
... | [
"private",
"void",
"processTree",
"(",
"final",
"GroupElement",
"ce",
",",
"boolean",
"[",
"]",
"result",
")",
"throws",
"InvalidPatternException",
"{",
"boolean",
"hasChildOr",
"=",
"false",
";",
"// first we elimininate any redundancy",
"ce",
".",
"pack",
"(",
"... | Traverses a Tree, during the process it transforms Or nodes moving the
upwards and it removes duplicate logic statement, this does not include
Not nodes.
Traversal involves three levels the graph for each iteration. The first
level is the current node, this node will not be transformed, instead
what we are interested ... | [
"Traverses",
"a",
"Tree",
"during",
"the",
"process",
"it",
"transforms",
"Or",
"nodes",
"moving",
"the",
"upwards",
"and",
"it",
"removes",
"duplicate",
"logic",
"statement",
"this",
"does",
"not",
"include",
"Not",
"nodes",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java#L360-L386 |
14,123 | kiegroup/drools | drools-verifier/drools-verifier-core/src/main/java/org/drools/verifier/core/checks/base/CheckRunManager.java | CheckRunManager.run | public void run(final StatusUpdate onStatus,
final Command onCompletion) {
//Ensure active analysis is cancelled
cancelExistingAnalysis();
//If there are no checks to run simply return
if (rechecks.isEmpty()) {
if (onCompletion != null) {
... | java | public void run(final StatusUpdate onStatus,
final Command onCompletion) {
//Ensure active analysis is cancelled
cancelExistingAnalysis();
//If there are no checks to run simply return
if (rechecks.isEmpty()) {
if (onCompletion != null) {
... | [
"public",
"void",
"run",
"(",
"final",
"StatusUpdate",
"onStatus",
",",
"final",
"Command",
"onCompletion",
")",
"{",
"//Ensure active analysis is cancelled",
"cancelExistingAnalysis",
"(",
")",
";",
"//If there are no checks to run simply return",
"if",
"(",
"rechecks",
... | Run analysis with feedback
@param onStatus Command executed repeatedly receiving status update
@param onCompletion Command executed on completion | [
"Run",
"analysis",
"with",
"feedback"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-verifier/drools-verifier-core/src/main/java/org/drools/verifier/core/checks/base/CheckRunManager.java#L41-L58 |
14,124 | kiegroup/drools | drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactory.java | KnowledgeBaseFactory.newKnowledgeBase | public static InternalKnowledgeBase newKnowledgeBase(KieBaseConfiguration conf) {
return newKnowledgeBase( UUID.randomUUID().toString(), (RuleBaseConfiguration) conf );
} | java | public static InternalKnowledgeBase newKnowledgeBase(KieBaseConfiguration conf) {
return newKnowledgeBase( UUID.randomUUID().toString(), (RuleBaseConfiguration) conf );
} | [
"public",
"static",
"InternalKnowledgeBase",
"newKnowledgeBase",
"(",
"KieBaseConfiguration",
"conf",
")",
"{",
"return",
"newKnowledgeBase",
"(",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
",",
"(",
"RuleBaseConfiguration",
")",
"conf",
")",
... | Create a new KnowledgeBase using the given KnowledgeBaseConfiguration
@return
The KnowledgeBase | [
"Create",
"a",
"new",
"KnowledgeBase",
"using",
"the",
"given",
"KnowledgeBaseConfiguration"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactory.java#L88-L90 |
14,125 | kiegroup/drools | drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactory.java | KnowledgeBaseFactory.newKnowledgeBase | public static InternalKnowledgeBase newKnowledgeBase(String kbaseId,
KieBaseConfiguration conf) {
return new KnowledgeBaseImpl( kbaseId, (RuleBaseConfiguration) conf);
} | java | public static InternalKnowledgeBase newKnowledgeBase(String kbaseId,
KieBaseConfiguration conf) {
return new KnowledgeBaseImpl( kbaseId, (RuleBaseConfiguration) conf);
} | [
"public",
"static",
"InternalKnowledgeBase",
"newKnowledgeBase",
"(",
"String",
"kbaseId",
",",
"KieBaseConfiguration",
"conf",
")",
"{",
"return",
"new",
"KnowledgeBaseImpl",
"(",
"kbaseId",
",",
"(",
"RuleBaseConfiguration",
")",
"conf",
")",
";",
"}"
] | Create a new KnowledgeBase using the given KnowledgeBaseConfiguration and
the given KnowledgeBase ID.
@param kbaseId
A string Identifier for the knowledge base. Specially useful when enabling
JMX monitoring and management, as that ID will be used to compose the
JMX ObjectName for all related MBeans. The application mu... | [
"Create",
"a",
"new",
"KnowledgeBase",
"using",
"the",
"given",
"KnowledgeBaseConfiguration",
"and",
"the",
"given",
"KnowledgeBase",
"ID",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseFactory.java#L104-L107 |
14,126 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java | TruthMaintenanceSystem.readLogicalDependency | public void readLogicalDependency(final InternalFactHandle handle,
final Object object,
final Object value,
final Activation activation,
final PropagationContext contex... | java | public void readLogicalDependency(final InternalFactHandle handle,
final Object object,
final Object value,
final Activation activation,
final PropagationContext contex... | [
"public",
"void",
"readLogicalDependency",
"(",
"final",
"InternalFactHandle",
"handle",
",",
"final",
"Object",
"object",
",",
"final",
"Object",
"value",
",",
"final",
"Activation",
"activation",
",",
"final",
"PropagationContext",
"context",
",",
"final",
"RuleIm... | Adds a justification for the FactHandle to the justifiedMap.
@param handle
@param activation
@param context
@param rule
@param typeConf | [
"Adds",
"a",
"justification",
"for",
"the",
"FactHandle",
"to",
"the",
"justifiedMap",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java#L187-L195 |
14,127 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java | TruthMaintenanceSystem.enableTMS | private void enableTMS(Object object, ObjectTypeConf conf) {
Iterator<InternalFactHandle> it = ((ClassAwareObjectStore) ep.getObjectStore()).iterateFactHandles(getActualClass(object));
while (it.hasNext()) {
InternalFactHandle handle = it.next();
if (handle != null && handle.get... | java | private void enableTMS(Object object, ObjectTypeConf conf) {
Iterator<InternalFactHandle> it = ((ClassAwareObjectStore) ep.getObjectStore()).iterateFactHandles(getActualClass(object));
while (it.hasNext()) {
InternalFactHandle handle = it.next();
if (handle != null && handle.get... | [
"private",
"void",
"enableTMS",
"(",
"Object",
"object",
",",
"ObjectTypeConf",
"conf",
")",
"{",
"Iterator",
"<",
"InternalFactHandle",
">",
"it",
"=",
"(",
"(",
"ClassAwareObjectStore",
")",
"ep",
".",
"getObjectStore",
"(",
")",
")",
".",
"iterateFactHandle... | TMS will be automatically enabled when the first logical insert happens.
We will take all the already asserted objects of the same type and initialize
the equality map.
@param object the logically inserted object.
@param conf the type's configuration. | [
"TMS",
"will",
"be",
"automatically",
"enabled",
"when",
"the",
"first",
"logical",
"insert",
"happens",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java#L262-L277 |
14,128 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java | JavaDialectConfiguration.setJavaLanguageLevel | public void setJavaLanguageLevel(final String languageLevel) {
if ( Arrays.binarySearch( LANGUAGE_LEVELS,
languageLevel ) < 0 ) {
throw new RuntimeException( "value '" + languageLevel + "' is not a valid language level" );
}
this.languageLevel = lang... | java | public void setJavaLanguageLevel(final String languageLevel) {
if ( Arrays.binarySearch( LANGUAGE_LEVELS,
languageLevel ) < 0 ) {
throw new RuntimeException( "value '" + languageLevel + "' is not a valid language level" );
}
this.languageLevel = lang... | [
"public",
"void",
"setJavaLanguageLevel",
"(",
"final",
"String",
"languageLevel",
")",
"{",
"if",
"(",
"Arrays",
".",
"binarySearch",
"(",
"LANGUAGE_LEVELS",
",",
"languageLevel",
")",
"<",
"0",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"value '\"",
... | You cannot set language level below 1.5, as we need static imports, 1.5 is now the default.
@param languageLevel | [
"You",
"cannot",
"set",
"language",
"level",
"below",
"1",
".",
"5",
"as",
"we",
"need",
"static",
"imports",
"1",
".",
"5",
"is",
"now",
"the",
"default",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java#L99-L105 |
14,129 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java | JavaDialectConfiguration.setCompiler | public void setCompiler(final CompilerType compiler) {
// check that the jar for the specified compiler are present
if ( compiler == CompilerType.ECLIPSE ) {
try {
Class.forName( "org.eclipse.jdt.internal.compiler.Compiler", true, this.conf.getClassLoader() );
} c... | java | public void setCompiler(final CompilerType compiler) {
// check that the jar for the specified compiler are present
if ( compiler == CompilerType.ECLIPSE ) {
try {
Class.forName( "org.eclipse.jdt.internal.compiler.Compiler", true, this.conf.getClassLoader() );
} c... | [
"public",
"void",
"setCompiler",
"(",
"final",
"CompilerType",
"compiler",
")",
"{",
"// check that the jar for the specified compiler are present",
"if",
"(",
"compiler",
"==",
"CompilerType",
".",
"ECLIPSE",
")",
"{",
"try",
"{",
"Class",
".",
"forName",
"(",
"\"o... | Set the compiler to be used when building the rules semantic code blocks.
This overrides the default, and even what was set as a system property. | [
"Set",
"the",
"compiler",
"to",
"be",
"used",
"when",
"building",
"the",
"rules",
"semantic",
"code",
"blocks",
".",
"This",
"overrides",
"the",
"default",
"and",
"even",
"what",
"was",
"set",
"as",
"a",
"system",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java#L111-L140 |
14,130 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java | JavaDialectConfiguration.getDefaultCompiler | private CompilerType getDefaultCompiler() {
try {
final String prop = this.conf.getChainedProperties().getProperty( JAVA_COMPILER_PROPERTY,
"ECLIPSE" );
if ( prop.equals( "NATIVE" ) ) {
return C... | java | private CompilerType getDefaultCompiler() {
try {
final String prop = this.conf.getChainedProperties().getProperty( JAVA_COMPILER_PROPERTY,
"ECLIPSE" );
if ( prop.equals( "NATIVE" ) ) {
return C... | [
"private",
"CompilerType",
"getDefaultCompiler",
"(",
")",
"{",
"try",
"{",
"final",
"String",
"prop",
"=",
"this",
".",
"conf",
".",
"getChainedProperties",
"(",
")",
".",
"getProperty",
"(",
"JAVA_COMPILER_PROPERTY",
",",
"\"ECLIPSE\"",
")",
";",
"if",
"(",
... | This will attempt to read the System property to work out what default to set.
This should only be done once when the class is loaded. After that point, you will have
to programmatically override it. | [
"This",
"will",
"attempt",
"to",
"read",
"the",
"System",
"property",
"to",
"work",
"out",
"what",
"default",
"to",
"set",
".",
"This",
"should",
"only",
"be",
"done",
"once",
"when",
"the",
"class",
"is",
"loaded",
".",
"After",
"that",
"point",
"you",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaDialectConfiguration.java#L151-L169 |
14,131 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java | CompositeObjectSinkAdapter.registerFieldIndex | private FieldIndex registerFieldIndex(final int index,
final InternalReadAccessor fieldExtractor) {
FieldIndex fieldIndex = null;
// is linkedlist null, if so create and add
if ( this.hashedFieldIndexes == null ) {
this.hashedFieldIndexes = ... | java | private FieldIndex registerFieldIndex(final int index,
final InternalReadAccessor fieldExtractor) {
FieldIndex fieldIndex = null;
// is linkedlist null, if so create and add
if ( this.hashedFieldIndexes == null ) {
this.hashedFieldIndexes = ... | [
"private",
"FieldIndex",
"registerFieldIndex",
"(",
"final",
"int",
"index",
",",
"final",
"InternalReadAccessor",
"fieldExtractor",
")",
"{",
"FieldIndex",
"fieldIndex",
"=",
"null",
";",
"// is linkedlist null, if so create and add",
"if",
"(",
"this",
".",
"hashedFie... | Returns a FieldIndex which Keeps a count on how many times a particular field is used with an equality check
in the sinks. | [
"Returns",
"a",
"FieldIndex",
"which",
"Keeps",
"a",
"count",
"on",
"how",
"many",
"times",
"a",
"particular",
"field",
"is",
"used",
"with",
"an",
"equality",
"check",
"in",
"the",
"sinks",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java#L304-L331 |
14,132 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java | CompositeObjectSinkAdapter.doPropagateAssertObject | protected void doPropagateAssertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory,
ObjectSink sink) {
sink.assertObject( factHandle... | java | protected void doPropagateAssertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory,
ObjectSink sink) {
sink.assertObject( factHandle... | [
"protected",
"void",
"doPropagateAssertObject",
"(",
"InternalFactHandle",
"factHandle",
",",
"PropagationContext",
"context",
",",
"InternalWorkingMemory",
"workingMemory",
",",
"ObjectSink",
"sink",
")",
"{",
"sink",
".",
"assertObject",
"(",
"factHandle",
",",
"conte... | This is a Hook method for subclasses to override. Please keep it protected unless you know
what you are doing. | [
"This",
"is",
"a",
"Hook",
"method",
"for",
"subclasses",
"to",
"override",
".",
"Please",
"keep",
"it",
"protected",
"unless",
"you",
"know",
"what",
"you",
"are",
"doing",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/CompositeObjectSinkAdapter.java#L494-L501 |
14,133 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.evaluate | public FEELFnResult<Object> evaluate(EvaluationContext ctx, Object[] params) {
if ( decisionRules.isEmpty() ) {
return FEELFnResult.ofError(new FEELEventBase(Severity.WARN, "Decision table is empty", null));
}
Object[] actualInputs = resolveActualInputs( ctx, feel );
... | java | public FEELFnResult<Object> evaluate(EvaluationContext ctx, Object[] params) {
if ( decisionRules.isEmpty() ) {
return FEELFnResult.ofError(new FEELEventBase(Severity.WARN, "Decision table is empty", null));
}
Object[] actualInputs = resolveActualInputs( ctx, feel );
... | [
"public",
"FEELFnResult",
"<",
"Object",
">",
"evaluate",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"[",
"]",
"params",
")",
"{",
"if",
"(",
"decisionRules",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"FEELFnResult",
".",
"ofError",
"(",
"new",
... | Evaluates this decision table returning the result
@param ctx
@param params these are the required information items, not to confuse with the columns of the
decision table that are expressions derived from these parameters
@return | [
"Evaluates",
"this",
"decision",
"table",
"returning",
"the",
"result"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L86-L129 |
14,134 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.actualInputsMatchInputValues | private Either<FEELEvent, Object> actualInputsMatchInputValues(EvaluationContext ctx, Object[] params) {
// check that all the parameters match the input list values if they are defined
for( int i = 0; i < params.length; i++ ) {
final DTInputClause input = inputs.get( i );
// if ... | java | private Either<FEELEvent, Object> actualInputsMatchInputValues(EvaluationContext ctx, Object[] params) {
// check that all the parameters match the input list values if they are defined
for( int i = 0; i < params.length; i++ ) {
final DTInputClause input = inputs.get( i );
// if ... | [
"private",
"Either",
"<",
"FEELEvent",
",",
"Object",
">",
"actualInputsMatchInputValues",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"[",
"]",
"params",
")",
"{",
"// check that all the parameters match the input list values if they are defined",
"for",
"(",
"int",
... | If valid input values are defined, check that all parameters match the respective valid inputs
@param ctx
@param params
@return | [
"If",
"valid",
"input",
"values",
"are",
"defined",
"check",
"that",
"all",
"parameters",
"match",
"the",
"respective",
"valid",
"inputs"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L213-L234 |
14,135 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.findMatches | private List<DTDecisionRule> findMatches(EvaluationContext ctx, Object[] params) {
List<DTDecisionRule> matchingDecisionRules = new ArrayList<>();
for ( DTDecisionRule decisionRule : decisionRules ) {
if ( matches( ctx, params, decisionRule ) ) {
matchingDecisionRules.add( de... | java | private List<DTDecisionRule> findMatches(EvaluationContext ctx, Object[] params) {
List<DTDecisionRule> matchingDecisionRules = new ArrayList<>();
for ( DTDecisionRule decisionRule : decisionRules ) {
if ( matches( ctx, params, decisionRule ) ) {
matchingDecisionRules.add( de... | [
"private",
"List",
"<",
"DTDecisionRule",
">",
"findMatches",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"[",
"]",
"params",
")",
"{",
"List",
"<",
"DTDecisionRule",
">",
"matchingDecisionRules",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",... | Finds all rules that match a given set of parameters
@param ctx
@param params
@return | [
"Finds",
"all",
"rules",
"that",
"match",
"a",
"given",
"set",
"of",
"parameters"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L243-L260 |
14,136 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.matches | private boolean matches(EvaluationContext ctx, Object[] params, DTDecisionRule rule) {
for( int i = 0; i < params.length; i++ ) {
CompiledExpression compiledInput = inputs.get(i).getCompiledInput();
if ( compiledInput instanceof CompiledFEELExpression) {
ctx.setValue("?",... | java | private boolean matches(EvaluationContext ctx, Object[] params, DTDecisionRule rule) {
for( int i = 0; i < params.length; i++ ) {
CompiledExpression compiledInput = inputs.get(i).getCompiledInput();
if ( compiledInput instanceof CompiledFEELExpression) {
ctx.setValue("?",... | [
"private",
"boolean",
"matches",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"[",
"]",
"params",
",",
"DTDecisionRule",
"rule",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"params",
".",
"length",
";",
"i",
"++",
")",
"{",
"Compile... | Checks if the parameters match a single rule
@param ctx
@param params
@param rule
@return | [
"Checks",
"if",
"the",
"parameters",
"match",
"a",
"single",
"rule"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L269-L280 |
14,137 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.satisfies | private boolean satisfies(EvaluationContext ctx, Object param, UnaryTest test ) {
return test.apply( ctx, param );
} | java | private boolean satisfies(EvaluationContext ctx, Object param, UnaryTest test ) {
return test.apply( ctx, param );
} | [
"private",
"boolean",
"satisfies",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"param",
",",
"UnaryTest",
"test",
")",
"{",
"return",
"test",
".",
"apply",
"(",
"ctx",
",",
"param",
")",
";",
"}"
] | Checks that a given parameter matches a single cell test
@param ctx
@param param
@param test
@return | [
"Checks",
"that",
"a",
"given",
"parameter",
"matches",
"a",
"single",
"cell",
"test"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L289-L291 |
14,138 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java | DecisionTableImpl.defaultToOutput | private Object defaultToOutput(EvaluationContext ctx, FEEL feel) {
Map<String, Object> values = ctx.getAllValues();
if ( outputs.size() == 1 ) {
Object value = feel.evaluate( outputs.get( 0 ).getDefaultValue(), values );
return value;
} else {
// zip outputEnt... | java | private Object defaultToOutput(EvaluationContext ctx, FEEL feel) {
Map<String, Object> values = ctx.getAllValues();
if ( outputs.size() == 1 ) {
Object value = feel.evaluate( outputs.get( 0 ).getDefaultValue(), values );
return value;
} else {
// zip outputEnt... | [
"private",
"Object",
"defaultToOutput",
"(",
"EvaluationContext",
"ctx",
",",
"FEEL",
"feel",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"values",
"=",
"ctx",
".",
"getAllValues",
"(",
")",
";",
"if",
"(",
"outputs",
".",
"size",
"(",
")",
"==... | No hits matched for the DT, so calculate result based on default outputs | [
"No",
"hits",
"matched",
"for",
"the",
"DT",
"so",
"calculate",
"result",
"based",
"on",
"default",
"outputs"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java#L319-L329 |
14,139 | kiegroup/drools | kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_1/xstream/XStreamMarshaller.java | XStreamMarshaller.marshalMarshall | @Deprecated
public void marshalMarshall(Object o, OutputStream out) {
try {
XStream xStream = newXStream();
out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".getBytes());
OutputStreamWriter ows = new OutputStreamWriter(out, "UTF-8");
xStream.toXML(o, ow... | java | @Deprecated
public void marshalMarshall(Object o, OutputStream out) {
try {
XStream xStream = newXStream();
out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".getBytes());
OutputStreamWriter ows = new OutputStreamWriter(out, "UTF-8");
xStream.toXML(o, ow... | [
"@",
"Deprecated",
"public",
"void",
"marshalMarshall",
"(",
"Object",
"o",
",",
"OutputStream",
"out",
")",
"{",
"try",
"{",
"XStream",
"xStream",
"=",
"newXStream",
"(",
")",
";",
"out",
".",
"write",
"(",
"\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n... | Unnecessary as was a tentative UTF-8 preamble output but still not working. | [
"Unnecessary",
"as",
"was",
"a",
"tentative",
"UTF",
"-",
"8",
"preamble",
"output",
"but",
"still",
"not",
"working",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_1/xstream/XStreamMarshaller.java#L197-L207 |
14,140 | kiegroup/drools | kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_1/xstream/XStreamMarshaller.java | XStreamMarshaller.formatXml | @Deprecated
public static String formatXml(String xml){
try{
Transformer serializer= SAXTransformerFactory.newInstance().newTransformer();
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount... | java | @Deprecated
public static String formatXml(String xml){
try{
Transformer serializer= SAXTransformerFactory.newInstance().newTransformer();
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount... | [
"@",
"Deprecated",
"public",
"static",
"String",
"formatXml",
"(",
"String",
"xml",
")",
"{",
"try",
"{",
"Transformer",
"serializer",
"=",
"SAXTransformerFactory",
".",
"newInstance",
"(",
")",
".",
"newTransformer",
"(",
")",
";",
"serializer",
".",
"setOutp... | Unnecessary as the stax driver custom anon as static definition is embedding the indentation. | [
"Unnecessary",
"as",
"the",
"stax",
"driver",
"custom",
"anon",
"as",
"static",
"definition",
"is",
"embedding",
"the",
"indentation",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_1/xstream/XStreamMarshaller.java#L212-L225 |
14,141 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNEdge.java | DMNEdge.setDMNLabel | public void setDMNLabel(org.kie.dmn.model.api.dmndi.DMNLabel value) {
this.dmnLabel = value;
} | java | public void setDMNLabel(org.kie.dmn.model.api.dmndi.DMNLabel value) {
this.dmnLabel = value;
} | [
"public",
"void",
"setDMNLabel",
"(",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"DMNLabel",
"value",
")",
"{",
"this",
".",
"dmnLabel",
"=",
"value",
";",
"}"
] | Sets the value of the dmnLabel property.
@param value
allowed object is
{@link DMNLabel } | [
"Sets",
"the",
"value",
"of",
"the",
"dmnLabel",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNEdge.java#L46-L48 |
14,142 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java | ClassDefinitionFactory.generateDeclaredBean | public ClassDefinition generateDeclaredBean(AbstractClassTypeDeclarationDescr typeDescr,
TypeDeclaration type,
PackageRegistry pkgRegistry,
List<TypeDefinition> unresolvedTypeD... | java | public ClassDefinition generateDeclaredBean(AbstractClassTypeDeclarationDescr typeDescr,
TypeDeclaration type,
PackageRegistry pkgRegistry,
List<TypeDefinition> unresolvedTypeD... | [
"public",
"ClassDefinition",
"generateDeclaredBean",
"(",
"AbstractClassTypeDeclarationDescr",
"typeDescr",
",",
"TypeDeclaration",
"type",
",",
"PackageRegistry",
"pkgRegistry",
",",
"List",
"<",
"TypeDefinition",
">",
"unresolvedTypeDefinitions",
",",
"Map",
"<",
"String"... | Generates a bean, and adds it to the composite class loader that
everything is using. | [
"Generates",
"a",
"bean",
"and",
"adds",
"it",
"to",
"the",
"composite",
"class",
"loader",
"that",
"everything",
"is",
"using",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/builder/impl/ClassDefinitionFactory.java#L72-L92 |
14,143 | kiegroup/drools | drools-core/src/main/java/org/drools/core/audit/WorkingMemoryFileLogger.java | WorkingMemoryFileLogger.writeToDisk | public void writeToDisk() {
if ( !initialized ) {
initializeLog();
}
Writer writer = null;
try {
FileOutputStream fileOut = new FileOutputStream( this.fileName + (this.nbOfFile == 0 ? ".log" : this.nbOfFile + ".log" ),
... | java | public void writeToDisk() {
if ( !initialized ) {
initializeLog();
}
Writer writer = null;
try {
FileOutputStream fileOut = new FileOutputStream( this.fileName + (this.nbOfFile == 0 ? ".log" : this.nbOfFile + ".log" ),
... | [
"public",
"void",
"writeToDisk",
"(",
")",
"{",
"if",
"(",
"!",
"initialized",
")",
"{",
"initializeLog",
"(",
")",
";",
"}",
"Writer",
"writer",
"=",
"null",
";",
"try",
"{",
"FileOutputStream",
"fileOut",
"=",
"new",
"FileOutputStream",
"(",
"this",
".... | All events in the log are written to file. The log is automatically
cleared afterwards. | [
"All",
"events",
"in",
"the",
"log",
"are",
"written",
"to",
"file",
".",
"The",
"log",
"is",
"automatically",
"cleared",
"afterwards",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/audit/WorkingMemoryFileLogger.java#L121-L159 |
14,144 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/ast/InfixOpNode.java | InfixOpNode.and | public static Object and(Object left, Object right, EvaluationContext ctx) {
Boolean l = EvalHelper.getBooleanOrNull( left );
Boolean r = EvalHelper.getBooleanOrNull( right );
// have to check for all nulls first to avoid NPE
if ( (l == null && r == null) || (l == null && r == true) || (... | java | public static Object and(Object left, Object right, EvaluationContext ctx) {
Boolean l = EvalHelper.getBooleanOrNull( left );
Boolean r = EvalHelper.getBooleanOrNull( right );
// have to check for all nulls first to avoid NPE
if ( (l == null && r == null) || (l == null && r == true) || (... | [
"public",
"static",
"Object",
"and",
"(",
"Object",
"left",
",",
"Object",
"right",
",",
"EvaluationContext",
"ctx",
")",
"{",
"Boolean",
"l",
"=",
"EvalHelper",
".",
"getBooleanOrNull",
"(",
"left",
")",
";",
"Boolean",
"r",
"=",
"EvalHelper",
".",
"getBo... | Implements the ternary logic AND operation | [
"Implements",
"the",
"ternary",
"logic",
"AND",
"operation"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/ast/InfixOpNode.java#L362-L372 |
14,145 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java | DialectCompiletimeRegistry.addResults | public List<KnowledgeBuilderResult> addResults(List<KnowledgeBuilderResult> list) {
if ( list == null ) {
list = new ArrayList<KnowledgeBuilderResult>();
}
for (Dialect dialect : map.values()) {
List<KnowledgeBuilderResult> results = dialect.getResults();
if (... | java | public List<KnowledgeBuilderResult> addResults(List<KnowledgeBuilderResult> list) {
if ( list == null ) {
list = new ArrayList<KnowledgeBuilderResult>();
}
for (Dialect dialect : map.values()) {
List<KnowledgeBuilderResult> results = dialect.getResults();
if (... | [
"public",
"List",
"<",
"KnowledgeBuilderResult",
">",
"addResults",
"(",
"List",
"<",
"KnowledgeBuilderResult",
">",
"list",
")",
"{",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"new",
"ArrayList",
"<",
"KnowledgeBuilderResult",
">",
"(",
")",
... | Add all registered Dialect results to the provided List.
@param list
@return | [
"Add",
"all",
"registered",
"Dialect",
"results",
"to",
"the",
"provided",
"List",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java#L78-L94 |
14,146 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java | DialectCompiletimeRegistry.addImport | public void addImport(ImportDescr importDescr) {
for (Dialect dialect : this.map.values()) {
dialect.addImport(importDescr);
}
} | java | public void addImport(ImportDescr importDescr) {
for (Dialect dialect : this.map.values()) {
dialect.addImport(importDescr);
}
} | [
"public",
"void",
"addImport",
"(",
"ImportDescr",
"importDescr",
")",
"{",
"for",
"(",
"Dialect",
"dialect",
":",
"this",
".",
"map",
".",
"values",
"(",
")",
")",
"{",
"dialect",
".",
"addImport",
"(",
"importDescr",
")",
";",
"}",
"}"
] | Iterates all registered dialects, informing them of an import added to the PackageBuilder
@param importEntry | [
"Iterates",
"all",
"registered",
"dialects",
"informing",
"them",
"of",
"an",
"import",
"added",
"to",
"the",
"PackageBuilder"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java#L100-L104 |
14,147 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java | DialectCompiletimeRegistry.addStaticImport | public void addStaticImport(ImportDescr importDescr) {
for (Dialect dialect : this.map.values()) {
dialect.addStaticImport(importDescr);
}
} | java | public void addStaticImport(ImportDescr importDescr) {
for (Dialect dialect : this.map.values()) {
dialect.addStaticImport(importDescr);
}
} | [
"public",
"void",
"addStaticImport",
"(",
"ImportDescr",
"importDescr",
")",
"{",
"for",
"(",
"Dialect",
"dialect",
":",
"this",
".",
"map",
".",
"values",
"(",
")",
")",
"{",
"dialect",
".",
"addStaticImport",
"(",
"importDescr",
")",
";",
"}",
"}"
] | Iterates all registered dialects, informing them of a static imports added to the PackageBuilder
@param staticImportEntry | [
"Iterates",
"all",
"registered",
"dialects",
"informing",
"them",
"of",
"a",
"static",
"imports",
"added",
"to",
"the",
"PackageBuilder"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DialectCompiletimeRegistry.java#L110-L114 |
14,148 | kiegroup/drools | kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java | KieMavenRepository.deployArtifact | public void deployArtifact( AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
RemoteRepository repository = getRemoteRepositoryFromDistributionManagement( pomfile );
if (repository == null) {
log.warn( "No Dis... | java | public void deployArtifact( AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
RemoteRepository repository = getRemoteRepositoryFromDistributionManagement( pomfile );
if (repository == null) {
log.warn( "No Dis... | [
"public",
"void",
"deployArtifact",
"(",
"AFReleaseId",
"releaseId",
",",
"InternalKieModule",
"kieModule",
",",
"File",
"pomfile",
")",
"{",
"RemoteRepository",
"repository",
"=",
"getRemoteRepositoryFromDistributionManagement",
"(",
"pomfile",
")",
";",
"if",
"(",
"... | Deploys the kjar in the given kieModule on the remote repository defined in the
distributionManagement tag of the provided pom file. If the pom file doesn't define
a distributionManagement no deployment will be performed and a warning message will be logged.
@param releaseId The releaseId with which the deployment wil... | [
"Deploys",
"the",
"kjar",
"in",
"the",
"given",
"kieModule",
"on",
"the",
"remote",
"repository",
"defined",
"in",
"the",
"distributionManagement",
"tag",
"of",
"the",
"provided",
"pom",
"file",
".",
"If",
"the",
"pom",
"file",
"doesn",
"t",
"define",
"a",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java#L61-L70 |
14,149 | kiegroup/drools | kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java | KieMavenRepository.deployArtifact | public void deployArtifact( RemoteRepository repository,
AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
File jarFile = bytesToFile( releaseId, kieModule.getBytes(), ".jar" );
deployArtif... | java | public void deployArtifact( RemoteRepository repository,
AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
File jarFile = bytesToFile( releaseId, kieModule.getBytes(), ".jar" );
deployArtif... | [
"public",
"void",
"deployArtifact",
"(",
"RemoteRepository",
"repository",
",",
"AFReleaseId",
"releaseId",
",",
"InternalKieModule",
"kieModule",
",",
"File",
"pomfile",
")",
"{",
"File",
"jarFile",
"=",
"bytesToFile",
"(",
"releaseId",
",",
"kieModule",
".",
"ge... | Deploys the kjar in the given kieModule on a remote repository.
@param repository The remote repository where the kjar will be deployed
@param releaseId The releaseId with which the deployment will be made
@param kieModule The kieModule containing the kjar to be deployed
@param pomfile The pom file to be deployed toge... | [
"Deploys",
"the",
"kjar",
"in",
"the",
"given",
"kieModule",
"on",
"a",
"remote",
"repository",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java#L80-L86 |
14,150 | kiegroup/drools | kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java | KieMavenRepository.installArtifact | public void installArtifact( AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
File jarFile = bytesToFile( releaseId, kieModule.getBytes(), ".jar" );
installArtifact( releaseId, jarFile, pomfile );
} | java | public void installArtifact( AFReleaseId releaseId,
InternalKieModule kieModule,
File pomfile ) {
File jarFile = bytesToFile( releaseId, kieModule.getBytes(), ".jar" );
installArtifact( releaseId, jarFile, pomfile );
} | [
"public",
"void",
"installArtifact",
"(",
"AFReleaseId",
"releaseId",
",",
"InternalKieModule",
"kieModule",
",",
"File",
"pomfile",
")",
"{",
"File",
"jarFile",
"=",
"bytesToFile",
"(",
"releaseId",
",",
"kieModule",
".",
"getBytes",
"(",
")",
",",
"\".jar\"",
... | Installs the kjar in the given kieModule into the local repository.
@param releaseId The releaseId with which the kjar will be installed
@param kieModule The kieModule containing the kjar to be installed
@param pomfile The pom file to be installed together with the kjar | [
"Installs",
"the",
"kjar",
"in",
"the",
"given",
"kieModule",
"into",
"the",
"local",
"repository",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-ci/src/main/java/org/kie/scanner/KieMavenRepository.java#L96-L101 |
14,151 | kiegroup/drools | drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/ast/expr/NullSafeFieldAccessExpr.java | NullSafeFieldAccessExpr.setScope | @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
public NullSafeFieldAccessExpr setScope(final Expression scope) {
assertNotNull(scope);
if (scope == this.scope) {
return (NullSafeFieldAccessExpr) this;
}
notifyPropertyChange(ObservableProperty.SC... | java | @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
public NullSafeFieldAccessExpr setScope(final Expression scope) {
assertNotNull(scope);
if (scope == this.scope) {
return (NullSafeFieldAccessExpr) this;
}
notifyPropertyChange(ObservableProperty.SC... | [
"@",
"Generated",
"(",
"\"com.github.javaparser.generator.core.node.PropertyGenerator\"",
")",
"public",
"NullSafeFieldAccessExpr",
"setScope",
"(",
"final",
"Expression",
"scope",
")",
"{",
"assertNotNull",
"(",
"scope",
")",
";",
"if",
"(",
"scope",
"==",
"this",
".... | Sets the scope
@param scope the scope, can not be null
@return this, the NullSafeFieldAccessExpr | [
"Sets",
"the",
"scope"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/ast/expr/NullSafeFieldAccessExpr.java#L159-L172 |
14,152 | kiegroup/drools | drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/ast/expr/NullSafeFieldAccessExpr.java | NullSafeFieldAccessExpr.setTypeArguments | @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
public NullSafeFieldAccessExpr setTypeArguments(final NodeList<Type> typeArguments) {
if (typeArguments == this.typeArguments) {
return (NullSafeFieldAccessExpr) this;
}
notifyPropertyChange(ObservablePrope... | java | @Generated("com.github.javaparser.generator.core.node.PropertyGenerator")
public NullSafeFieldAccessExpr setTypeArguments(final NodeList<Type> typeArguments) {
if (typeArguments == this.typeArguments) {
return (NullSafeFieldAccessExpr) this;
}
notifyPropertyChange(ObservablePrope... | [
"@",
"Generated",
"(",
"\"com.github.javaparser.generator.core.node.PropertyGenerator\"",
")",
"public",
"NullSafeFieldAccessExpr",
"setTypeArguments",
"(",
"final",
"NodeList",
"<",
"Type",
">",
"typeArguments",
")",
"{",
"if",
"(",
"typeArguments",
"==",
"this",
".",
... | Sets the type arguments
@param typeArguments the type arguments, can be null
@return this, the NullSafeFieldAccessExpr | [
"Sets",
"the",
"type",
"arguments"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/ast/expr/NullSafeFieldAccessExpr.java#L185-L197 |
14,153 | kiegroup/drools | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java | DecisionServiceCompiler.compileNode | public void compileNode(DecisionService ds, DMNCompilerImpl compiler, DMNModelImpl model) {
DMNType type = null;
if (ds.getVariable() == null) { // even for the v1.1 backport, variable creation is taken care in DMNCompiler.
DMNCompilerHelper.reportMissingVariable(model, ds, ds, Msg.MISSING_V... | java | public void compileNode(DecisionService ds, DMNCompilerImpl compiler, DMNModelImpl model) {
DMNType type = null;
if (ds.getVariable() == null) { // even for the v1.1 backport, variable creation is taken care in DMNCompiler.
DMNCompilerHelper.reportMissingVariable(model, ds, ds, Msg.MISSING_V... | [
"public",
"void",
"compileNode",
"(",
"DecisionService",
"ds",
",",
"DMNCompilerImpl",
"compiler",
",",
"DMNModelImpl",
"model",
")",
"{",
"DMNType",
"type",
"=",
"null",
";",
"if",
"(",
"ds",
".",
"getVariable",
"(",
")",
"==",
"null",
")",
"{",
"// even ... | backport of DMN v1.1 | [
"backport",
"of",
"DMN",
"v1",
".",
"1"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java#L55-L70 |
14,154 | kiegroup/drools | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java | DecisionServiceCompiler.inputQualifiedNamePrefix | private static String inputQualifiedNamePrefix(DMNNode input, DMNModelImpl model) {
if (input.getModelNamespace().equals(model.getNamespace())) {
return null;
} else {
Optional<String> importAlias = model.getImportAliasFor(input.getModelNamespace(), input.getModelName());
... | java | private static String inputQualifiedNamePrefix(DMNNode input, DMNModelImpl model) {
if (input.getModelNamespace().equals(model.getNamespace())) {
return null;
} else {
Optional<String> importAlias = model.getImportAliasFor(input.getModelNamespace(), input.getModelName());
... | [
"private",
"static",
"String",
"inputQualifiedNamePrefix",
"(",
"DMNNode",
"input",
",",
"DMNModelImpl",
"model",
")",
"{",
"if",
"(",
"input",
".",
"getModelNamespace",
"(",
")",
".",
"equals",
"(",
"model",
".",
"getNamespace",
"(",
")",
")",
")",
"{",
"... | DMN v1.2 specification, chapter "10.4 Execution Semantics of Decision Services"
The qualified name of an element named E that is defined in the same decision model as S is simply E.
Otherwise, the qualified name is I.E, where I is the name of the import element that refers to the model where E is defined. | [
"DMN",
"v1",
".",
"2",
"specification",
"chapter",
"10",
".",
"4",
"Execution",
"Semantics",
"of",
"Decision",
"Services",
"The",
"qualified",
"name",
"of",
"an",
"element",
"named",
"E",
"that",
"is",
"defined",
"in",
"the",
"same",
"decision",
"model",
"... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java#L88-L107 |
14,155 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDecisionTableUpgradeHelper2.java | GuidedDecisionTableUpgradeHelper2.upgrade | public GuidedDecisionTable52 upgrade(GuidedDecisionTable52 source) {
final GuidedDecisionTable52 destination = source;
//These are the columns we want to update
final int iRowNumberColumnIndex = 0;
Integer iSalienceColumnIndex = null;
Integer iDurationColumnIndex = null;
... | java | public GuidedDecisionTable52 upgrade(GuidedDecisionTable52 source) {
final GuidedDecisionTable52 destination = source;
//These are the columns we want to update
final int iRowNumberColumnIndex = 0;
Integer iSalienceColumnIndex = null;
Integer iDurationColumnIndex = null;
... | [
"public",
"GuidedDecisionTable52",
"upgrade",
"(",
"GuidedDecisionTable52",
"source",
")",
"{",
"final",
"GuidedDecisionTable52",
"destination",
"=",
"source",
";",
"//These are the columns we want to update",
"final",
"int",
"iRowNumberColumnIndex",
"=",
"0",
";",
"Integer... | Convert the data-types in the Decision Table model
@param source
@return The new DTModel | [
"Convert",
"the",
"data",
"-",
"types",
"in",
"the",
"Decision",
"Table",
"model"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDecisionTableUpgradeHelper2.java#L41-L94 |
14,156 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java | AddRemoveRule.addRule | public static void addRule(TerminalNode tn, Collection<InternalWorkingMemory> wms, InternalKnowledgeBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Adding Rule {}", tn.getRule().getName());
}
boolean hasProtos = kBase.hasSegmentPrototypes();
boolean hasWms = !wms.isEmpt... | java | public static void addRule(TerminalNode tn, Collection<InternalWorkingMemory> wms, InternalKnowledgeBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Adding Rule {}", tn.getRule().getName());
}
boolean hasProtos = kBase.hasSegmentPrototypes();
boolean hasWms = !wms.isEmpt... | [
"public",
"static",
"void",
"addRule",
"(",
"TerminalNode",
"tn",
",",
"Collection",
"<",
"InternalWorkingMemory",
">",
"wms",
",",
"InternalKnowledgeBase",
"kBase",
")",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
".",
"trace",
... | This method is called after the rule nodes have been added to the network
For add tuples are processed after the segments and pmems have been adjusted | [
"This",
"method",
"is",
"called",
"after",
"the",
"rule",
"nodes",
"have",
"been",
"added",
"to",
"the",
"network",
"For",
"add",
"tuples",
"are",
"processed",
"after",
"the",
"segments",
"and",
"pmems",
"have",
"been",
"adjusted"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java#L86-L139 |
14,157 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java | AddRemoveRule.removeRule | public static void removeRule( TerminalNode tn, Collection<InternalWorkingMemory> wms, InternalKnowledgeBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Removing Rule {}", tn.getRule().getName());
}
boolean hasProtos = kBase.hasSegmentPrototypes();
boolean hasWms = !wms.... | java | public static void removeRule( TerminalNode tn, Collection<InternalWorkingMemory> wms, InternalKnowledgeBase kBase) {
if (log.isTraceEnabled()) {
log.trace("Removing Rule {}", tn.getRule().getName());
}
boolean hasProtos = kBase.hasSegmentPrototypes();
boolean hasWms = !wms.... | [
"public",
"static",
"void",
"removeRule",
"(",
"TerminalNode",
"tn",
",",
"Collection",
"<",
"InternalWorkingMemory",
">",
"wms",
",",
"InternalKnowledgeBase",
"kBase",
")",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
".",
"trace... | This method is called before the rule nodes are removed from the network.
For remove tuples are processed before the segments and pmems have been adjusted | [
"This",
"method",
"is",
"called",
"before",
"the",
"rule",
"nodes",
"are",
"removed",
"from",
"the",
"network",
".",
"For",
"remove",
"tuples",
"are",
"processed",
"before",
"the",
"segments",
"and",
"pmems",
"have",
"been",
"adjusted"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java#L145-L196 |
14,158 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java | AddRemoveRule.insertPeerLeftTuple | private static LeftTuple insertPeerLeftTuple(LeftTuple lt, LeftTupleSinkNode node, InternalWorkingMemory wm) {
LeftInputAdapterNode.LiaNodeMemory liaMem = null;
if ( node.getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
liaMem = wm.getNodeMemory(((LeftInputAdapterNode... | java | private static LeftTuple insertPeerLeftTuple(LeftTuple lt, LeftTupleSinkNode node, InternalWorkingMemory wm) {
LeftInputAdapterNode.LiaNodeMemory liaMem = null;
if ( node.getLeftTupleSource().getType() == NodeTypeEnums.LeftInputAdapterNode ) {
liaMem = wm.getNodeMemory(((LeftInputAdapterNode... | [
"private",
"static",
"LeftTuple",
"insertPeerLeftTuple",
"(",
"LeftTuple",
"lt",
",",
"LeftTupleSinkNode",
"node",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"LeftInputAdapterNode",
".",
"LiaNodeMemory",
"liaMem",
"=",
"null",
";",
"if",
"(",
"node",
".",
"getL... | Create all missing peers | [
"Create",
"all",
"missing",
"peers"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/AddRemoveRule.java#L1011-L1031 |
14,159 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java | AbstractCompositeConstraint.addAlphaConstraint | public void addAlphaConstraint(AlphaNodeFieldConstraint constraint) {
if ( constraint != null ) {
AlphaNodeFieldConstraint[] tmp = this.alphaConstraints;
this.alphaConstraints = new AlphaNodeFieldConstraint[tmp.length + 1];
System.arraycopy( tmp,
... | java | public void addAlphaConstraint(AlphaNodeFieldConstraint constraint) {
if ( constraint != null ) {
AlphaNodeFieldConstraint[] tmp = this.alphaConstraints;
this.alphaConstraints = new AlphaNodeFieldConstraint[tmp.length + 1];
System.arraycopy( tmp,
... | [
"public",
"void",
"addAlphaConstraint",
"(",
"AlphaNodeFieldConstraint",
"constraint",
")",
"{",
"if",
"(",
"constraint",
"!=",
"null",
")",
"{",
"AlphaNodeFieldConstraint",
"[",
"]",
"tmp",
"=",
"this",
".",
"alphaConstraints",
";",
"this",
".",
"alphaConstraints... | Adds an alpha constraint to the multi field OR constraint
@param constraint | [
"Adds",
"an",
"alpha",
"constraint",
"to",
"the",
"multi",
"field",
"OR",
"constraint"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java#L86-L98 |
14,160 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java | AbstractCompositeConstraint.addBetaConstraint | public void addBetaConstraint(BetaNodeFieldConstraint constraint) {
if ( constraint != null ) {
BetaNodeFieldConstraint[] tmp = this.betaConstraints;
this.betaConstraints = new BetaNodeFieldConstraint[tmp.length + 1];
System.arraycopy( tmp,
0,
... | java | public void addBetaConstraint(BetaNodeFieldConstraint constraint) {
if ( constraint != null ) {
BetaNodeFieldConstraint[] tmp = this.betaConstraints;
this.betaConstraints = new BetaNodeFieldConstraint[tmp.length + 1];
System.arraycopy( tmp,
0,
... | [
"public",
"void",
"addBetaConstraint",
"(",
"BetaNodeFieldConstraint",
"constraint",
")",
"{",
"if",
"(",
"constraint",
"!=",
"null",
")",
"{",
"BetaNodeFieldConstraint",
"[",
"]",
"tmp",
"=",
"this",
".",
"betaConstraints",
";",
"this",
".",
"betaConstraints",
... | Adds a beta constraint to this multi field OR constraint
@param constraint | [
"Adds",
"a",
"beta",
"constraint",
"to",
"this",
"multi",
"field",
"OR",
"constraint"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java#L104-L117 |
14,161 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java | AbstractCompositeConstraint.addConstraint | public void addConstraint(Constraint constraint) {
if ( ConstraintType.ALPHA.equals(constraint.getType())) {
this.addAlphaConstraint( (AlphaNodeFieldConstraint) constraint );
} else if ( ConstraintType.BETA.equals(constraint.getType())) {
this.addBetaConstraint( (BetaNodeFieldCon... | java | public void addConstraint(Constraint constraint) {
if ( ConstraintType.ALPHA.equals(constraint.getType())) {
this.addAlphaConstraint( (AlphaNodeFieldConstraint) constraint );
} else if ( ConstraintType.BETA.equals(constraint.getType())) {
this.addBetaConstraint( (BetaNodeFieldCon... | [
"public",
"void",
"addConstraint",
"(",
"Constraint",
"constraint",
")",
"{",
"if",
"(",
"ConstraintType",
".",
"ALPHA",
".",
"equals",
"(",
"constraint",
".",
"getType",
"(",
")",
")",
")",
"{",
"this",
".",
"addAlphaConstraint",
"(",
"(",
"AlphaNodeFieldCo... | Adds a constraint too all lists it belongs to by checking for its type
@param constraint | [
"Adds",
"a",
"constraint",
"too",
"all",
"lists",
"it",
"belongs",
"to",
"by",
"checking",
"for",
"its",
"type"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java#L123-L131 |
14,162 | kiegroup/drools | drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java | AbstractCompositeConstraint.updateRequiredDeclarations | protected void updateRequiredDeclarations(Constraint constraint) {
Declaration[] decs = constraint.getRequiredDeclarations();
if ( decs != null && decs.length > 0 ) {
for (Declaration dec1 : decs) {
Declaration dec = dec1;
// check for duplications
... | java | protected void updateRequiredDeclarations(Constraint constraint) {
Declaration[] decs = constraint.getRequiredDeclarations();
if ( decs != null && decs.length > 0 ) {
for (Declaration dec1 : decs) {
Declaration dec = dec1;
// check for duplications
... | [
"protected",
"void",
"updateRequiredDeclarations",
"(",
"Constraint",
"constraint",
")",
"{",
"Declaration",
"[",
"]",
"decs",
"=",
"constraint",
".",
"getRequiredDeclarations",
"(",
")",
";",
"if",
"(",
"decs",
"!=",
"null",
"&&",
"decs",
".",
"length",
">",
... | Updades the cached required declaration array
@param constraint | [
"Updades",
"the",
"cached",
"required",
"declaration",
"array"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java#L138-L162 |
14,163 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_1/TFunctionDefinition.java | TFunctionDefinition.getKind | @Override
public FunctionKind getKind() {
String kindValueOnV11 = this.getAdditionalAttributes().get(KIND_QNAME);
if (kindValueOnV11 == null || kindValueOnV11.isEmpty()) {
return FunctionKind.FEEL;
} else {
switch (kindValueOnV11) {
case "F":
... | java | @Override
public FunctionKind getKind() {
String kindValueOnV11 = this.getAdditionalAttributes().get(KIND_QNAME);
if (kindValueOnV11 == null || kindValueOnV11.isEmpty()) {
return FunctionKind.FEEL;
} else {
switch (kindValueOnV11) {
case "F":
... | [
"@",
"Override",
"public",
"FunctionKind",
"getKind",
"(",
")",
"{",
"String",
"kindValueOnV11",
"=",
"this",
".",
"getAdditionalAttributes",
"(",
")",
".",
"get",
"(",
"KIND_QNAME",
")",
";",
"if",
"(",
"kindValueOnV11",
"==",
"null",
"||",
"kindValueOnV11",
... | Align to DMN v1.2 | [
"Align",
"to",
"DMN",
"v1",
".",
"2"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_1/TFunctionDefinition.java#L80-L97 |
14,164 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/RightInputAdapterNode.java | RightInputAdapterNode.createMemory | public RiaNodeMemory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
RiaNodeMemory rianMem = new RiaNodeMemory();
RiaPathMemory pmem = new RiaPathMemory(this, wm);
PathMemSpec pathMemSpec = getPathMemSpec();
pmem.setAllLinkedMaskTest( pathMemSpec.allLinkedTe... | java | public RiaNodeMemory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
RiaNodeMemory rianMem = new RiaNodeMemory();
RiaPathMemory pmem = new RiaPathMemory(this, wm);
PathMemSpec pathMemSpec = getPathMemSpec();
pmem.setAllLinkedMaskTest( pathMemSpec.allLinkedTe... | [
"public",
"RiaNodeMemory",
"createMemory",
"(",
"final",
"RuleBaseConfiguration",
"config",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"RiaNodeMemory",
"rianMem",
"=",
"new",
"RiaNodeMemory",
"(",
")",
";",
"RiaPathMemory",
"pmem",
"=",
"new",
"RiaPathMemory",
"(... | Creates and return the node memory | [
"Creates",
"and",
"return",
"the",
"node",
"memory"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/RightInputAdapterNode.java#L146-L156 |
14,165 | kiegroup/drools | drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java | QueryResultsRowImpl.get | public Object get(final Declaration declaration) {
return declaration.getValue( (InternalWorkingMemory) workingMemory, getObject( getFactHandle( declaration ) ) );
} | java | public Object get(final Declaration declaration) {
return declaration.getValue( (InternalWorkingMemory) workingMemory, getObject( getFactHandle( declaration ) ) );
} | [
"public",
"Object",
"get",
"(",
"final",
"Declaration",
"declaration",
")",
"{",
"return",
"declaration",
".",
"getValue",
"(",
"(",
"InternalWorkingMemory",
")",
"workingMemory",
",",
"getObject",
"(",
"getFactHandle",
"(",
"declaration",
")",
")",
")",
";",
... | Return the Object for the given Declaration. | [
"Return",
"the",
"Object",
"for",
"the",
"given",
"Declaration",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java#L85-L87 |
14,166 | kiegroup/drools | drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java | QueryResultsRowImpl.getFactHandles | public FactHandle[] getFactHandles() {
int size = size();
FactHandle[] subArray = new FactHandle[ size];
System.arraycopy( this.row.getHandles(), 1, subArray, 0, size );
return subArray;
} | java | public FactHandle[] getFactHandles() {
int size = size();
FactHandle[] subArray = new FactHandle[ size];
System.arraycopy( this.row.getHandles(), 1, subArray, 0, size );
return subArray;
} | [
"public",
"FactHandle",
"[",
"]",
"getFactHandles",
"(",
")",
"{",
"int",
"size",
"=",
"size",
"(",
")",
";",
"FactHandle",
"[",
"]",
"subArray",
"=",
"new",
"FactHandle",
"[",
"size",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"row",
".... | Return the FactHandles for the Tuple.
@return | [
"Return",
"the",
"FactHandles",
"for",
"the",
"Tuple",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/QueryResultsRowImpl.java#L111-L117 |
14,167 | kiegroup/drools | drools-core/src/main/java/org/drools/core/base/evaluators/EvaluatorRegistry.java | EvaluatorRegistry.addEvaluatorDefinition | @SuppressWarnings("unchecked")
public void addEvaluatorDefinition( String className ) {
try {
Class<EvaluatorDefinition> defClass = (Class<EvaluatorDefinition>) this.classloader.loadClass( className );
EvaluatorDefinition def = defClass.newInstance();
addEvaluatorDefiniti... | java | @SuppressWarnings("unchecked")
public void addEvaluatorDefinition( String className ) {
try {
Class<EvaluatorDefinition> defClass = (Class<EvaluatorDefinition>) this.classloader.loadClass( className );
EvaluatorDefinition def = defClass.newInstance();
addEvaluatorDefiniti... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"addEvaluatorDefinition",
"(",
"String",
"className",
")",
"{",
"try",
"{",
"Class",
"<",
"EvaluatorDefinition",
">",
"defClass",
"=",
"(",
"Class",
"<",
"EvaluatorDefinition",
">",
")",
"this... | Adds an evaluator definition class to the registry using the
evaluator class name. The class will be loaded and the corresponting
evaluator ID will be added to the registry. In case there exists
an implementation for that ID already, the new implementation will
replace the previous one.
@param className the name of th... | [
"Adds",
"an",
"evaluator",
"definition",
"class",
"to",
"the",
"registry",
"using",
"the",
"evaluator",
"class",
"name",
".",
"The",
"class",
"will",
"be",
"loaded",
"and",
"the",
"corresponting",
"evaluator",
"ID",
"will",
"be",
"added",
"to",
"the",
"regis... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/base/evaluators/EvaluatorRegistry.java#L116-L132 |
14,168 | kiegroup/drools | drools-core/src/main/java/org/drools/core/base/evaluators/EvaluatorRegistry.java | EvaluatorRegistry.addEvaluatorDefinition | public void addEvaluatorDefinition( EvaluatorDefinition def ) {
for ( String id : def.getEvaluatorIds() ) {
this.evaluators.put( id,
def );
}
} | java | public void addEvaluatorDefinition( EvaluatorDefinition def ) {
for ( String id : def.getEvaluatorIds() ) {
this.evaluators.put( id,
def );
}
} | [
"public",
"void",
"addEvaluatorDefinition",
"(",
"EvaluatorDefinition",
"def",
")",
"{",
"for",
"(",
"String",
"id",
":",
"def",
".",
"getEvaluatorIds",
"(",
")",
")",
"{",
"this",
".",
"evaluators",
".",
"put",
"(",
"id",
",",
"def",
")",
";",
"}",
"}... | Adds an evaluator definition class to the registry. In case there exists
an implementation for that evaluator ID already, the new implementation will
replace the previous one.
@param def the evaluator definition to be added. | [
"Adds",
"an",
"evaluator",
"definition",
"class",
"to",
"the",
"registry",
".",
"In",
"case",
"there",
"exists",
"an",
"implementation",
"for",
"that",
"evaluator",
"ID",
"already",
"the",
"new",
"implementation",
"will",
"replace",
"the",
"previous",
"one",
"... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/base/evaluators/EvaluatorRegistry.java#L141-L146 |
14,169 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDecisionTableUpgradeHelper3.java | GuidedDecisionTableUpgradeHelper3.upgrade | public GuidedDecisionTable52 upgrade(GuidedDecisionTable52 source) {
final GuidedDecisionTable52 destination = source;
for (BaseColumn column : source.getExpandedColumns()) {
DTColumnConfig52 dtColumn = null;
if (column instanceof MetadataCol52) {
dtColumn = (DT... | java | public GuidedDecisionTable52 upgrade(GuidedDecisionTable52 source) {
final GuidedDecisionTable52 destination = source;
for (BaseColumn column : source.getExpandedColumns()) {
DTColumnConfig52 dtColumn = null;
if (column instanceof MetadataCol52) {
dtColumn = (DT... | [
"public",
"GuidedDecisionTable52",
"upgrade",
"(",
"GuidedDecisionTable52",
"source",
")",
"{",
"final",
"GuidedDecisionTable52",
"destination",
"=",
"source",
";",
"for",
"(",
"BaseColumn",
"column",
":",
"source",
".",
"getExpandedColumns",
"(",
")",
")",
"{",
"... | Convert the Default Values in the Decision Table model
@param source
@return The new DTModel | [
"Convert",
"the",
"Default",
"Values",
"in",
"the",
"Decision",
"Table",
"model"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDecisionTableUpgradeHelper3.java#L44-L75 |
14,170 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDI.java | DMNDI.getDMNDiagram | @Override
public List<DMNDiagram> getDMNDiagram() {
if (dmnDiagram == null) {
dmnDiagram = new ArrayList<DMNDiagram>();
}
return this.dmnDiagram;
} | java | @Override
public List<DMNDiagram> getDMNDiagram() {
if (dmnDiagram == null) {
dmnDiagram = new ArrayList<DMNDiagram>();
}
return this.dmnDiagram;
} | [
"@",
"Override",
"public",
"List",
"<",
"DMNDiagram",
">",
"getDMNDiagram",
"(",
")",
"{",
"if",
"(",
"dmnDiagram",
"==",
"null",
")",
"{",
"dmnDiagram",
"=",
"new",
"ArrayList",
"<",
"DMNDiagram",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"dmnDi... | Gets the value of the dmnDiagram property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the dmnDiagram property.
<p>
For example, to... | [
"Gets",
"the",
"value",
"of",
"the",
"dmnDiagram",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDI.java#L59-L65 |
14,171 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDI.java | DMNDI.getDMNStyle | @Override
public List<DMNStyle> getDMNStyle() {
if (dmnStyle == null) {
dmnStyle = new ArrayList<DMNStyle>();
}
return this.dmnStyle;
} | java | @Override
public List<DMNStyle> getDMNStyle() {
if (dmnStyle == null) {
dmnStyle = new ArrayList<DMNStyle>();
}
return this.dmnStyle;
} | [
"@",
"Override",
"public",
"List",
"<",
"DMNStyle",
">",
"getDMNStyle",
"(",
")",
"{",
"if",
"(",
"dmnStyle",
"==",
"null",
")",
"{",
"dmnStyle",
"=",
"new",
"ArrayList",
"<",
"DMNStyle",
">",
"(",
")",
";",
"}",
"return",
"this",
".",
"dmnStyle",
";... | Gets the value of the dmnStyle property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the dmnStyle property.
<p>
For example, to add... | [
"Gets",
"the",
"value",
"of",
"the",
"dmnStyle",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDI.java#L89-L95 |
14,172 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java | DialectUtil.getUniqueLegalName | public static String getUniqueLegalName(final String packageName,
final String name,
final int seed,
final String ext,
final String prefix,
... | java | public static String getUniqueLegalName(final String packageName,
final String name,
final int seed,
final String ext,
final String prefix,
... | [
"public",
"static",
"String",
"getUniqueLegalName",
"(",
"final",
"String",
"packageName",
",",
"final",
"String",
"name",
",",
"final",
"int",
"seed",
",",
"final",
"String",
"ext",
",",
"final",
"String",
"prefix",
",",
"final",
"ResourceReader",
"src",
")",... | Takes a given name and makes sure that its legal and doesn't already exist. If the file exists it increases counter appender untill it is unique. | [
"Takes",
"a",
"given",
"name",
"and",
"makes",
"sure",
"that",
"its",
"legal",
"and",
"doesn",
"t",
"already",
"exist",
".",
"If",
"the",
"file",
"exists",
"it",
"increases",
"counter",
"appender",
"untill",
"it",
"is",
"unique",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/DialectUtil.java#L83-L111 |
14,173 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java | FEELImpl.newEvaluationContext | public EvaluationContextImpl newEvaluationContext(Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) {
return newEvaluationContext(this.classLoader, listeners, inputVariables);
} | java | public EvaluationContextImpl newEvaluationContext(Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) {
return newEvaluationContext(this.classLoader, listeners, inputVariables);
} | [
"public",
"EvaluationContextImpl",
"newEvaluationContext",
"(",
"Collection",
"<",
"FEELEventListener",
">",
"listeners",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"inputVariables",
")",
"{",
"return",
"newEvaluationContext",
"(",
"this",
".",
"classLoader",
",... | Creates a new EvaluationContext using this FEEL instance classloader, and the supplied parameters listeners and inputVariables | [
"Creates",
"a",
"new",
"EvaluationContext",
"using",
"this",
"FEEL",
"instance",
"classloader",
"and",
"the",
"supplied",
"parameters",
"listeners",
"and",
"inputVariables"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java#L170-L172 |
14,174 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java | FEELImpl.newEvaluationContext | public EvaluationContextImpl newEvaluationContext(ClassLoader cl, Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) {
FEELEventListenersManager eventsManager = getEventsManager(listeners);
EvaluationContextImpl ctx = new EvaluationContextImpl(cl, eventsManager, inputVariables.... | java | public EvaluationContextImpl newEvaluationContext(ClassLoader cl, Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) {
FEELEventListenersManager eventsManager = getEventsManager(listeners);
EvaluationContextImpl ctx = new EvaluationContextImpl(cl, eventsManager, inputVariables.... | [
"public",
"EvaluationContextImpl",
"newEvaluationContext",
"(",
"ClassLoader",
"cl",
",",
"Collection",
"<",
"FEELEventListener",
">",
"listeners",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"inputVariables",
")",
"{",
"FEELEventListenersManager",
"eventsManager",
... | Creates a new EvaluationContext with the supplied classloader, and the supplied parameters listeners and inputVariables | [
"Creates",
"a",
"new",
"EvaluationContext",
"with",
"the",
"supplied",
"classloader",
"and",
"the",
"supplied",
"parameters",
"listeners",
"and",
"inputVariables"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java#L177-L190 |
14,175 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java | ConcurrentNodeMemories.getNodeMemory | public Memory getNodeMemory(MemoryFactory node, InternalWorkingMemory wm) {
if( node.getMemoryId() >= this.memories.length() ) {
resize( node );
}
Memory memory = this.memories.get( node.getMemoryId() );
if( memory == null ) {
memory = createNodeMemory( node, wm ... | java | public Memory getNodeMemory(MemoryFactory node, InternalWorkingMemory wm) {
if( node.getMemoryId() >= this.memories.length() ) {
resize( node );
}
Memory memory = this.memories.get( node.getMemoryId() );
if( memory == null ) {
memory = createNodeMemory( node, wm ... | [
"public",
"Memory",
"getNodeMemory",
"(",
"MemoryFactory",
"node",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"if",
"(",
"node",
".",
"getMemoryId",
"(",
")",
">=",
"this",
".",
"memories",
".",
"length",
"(",
")",
")",
"{",
"resize",
"(",
"node",
")"... | The implementation tries to delay locking as much as possible, by running
some potentially unsafe operations out of the critical session. In case it
fails the checks, it will move into the critical sessions and re-check everything
before effectively doing any change on data structures. | [
"The",
"implementation",
"tries",
"to",
"delay",
"locking",
"as",
"much",
"as",
"possible",
"by",
"running",
"some",
"potentially",
"unsafe",
"operations",
"out",
"of",
"the",
"critical",
"session",
".",
"In",
"case",
"it",
"fails",
"the",
"checks",
"it",
"w... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java#L79-L90 |
14,176 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java | ConcurrentNodeMemories.createNodeMemory | private Memory createNodeMemory( MemoryFactory node,
InternalWorkingMemory wm ) {
try {
this.lock.lock();
// need to try again in a synchronized code block to make sure
// it was not created yet
Memory memory = this.memories.ge... | java | private Memory createNodeMemory( MemoryFactory node,
InternalWorkingMemory wm ) {
try {
this.lock.lock();
// need to try again in a synchronized code block to make sure
// it was not created yet
Memory memory = this.memories.ge... | [
"private",
"Memory",
"createNodeMemory",
"(",
"MemoryFactory",
"node",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"try",
"{",
"this",
".",
"lock",
".",
"lock",
"(",
")",
";",
"// need to try again in a synchronized code block to make sure",
"// it was not created yet",... | Checks if a memory does not exists for the given node and
creates it. | [
"Checks",
"if",
"a",
"memory",
"does",
"not",
"exists",
"for",
"the",
"given",
"node",
"and",
"creates",
"it",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/ConcurrentNodeMemories.java#L97-L117 |
14,177 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNShape.java | DMNShape.setDMNDecisionServiceDividerLine | public void setDMNDecisionServiceDividerLine(org.kie.dmn.model.api.dmndi.DMNDecisionServiceDividerLine value) {
this.dmnDecisionServiceDividerLine = value;
} | java | public void setDMNDecisionServiceDividerLine(org.kie.dmn.model.api.dmndi.DMNDecisionServiceDividerLine value) {
this.dmnDecisionServiceDividerLine = value;
} | [
"public",
"void",
"setDMNDecisionServiceDividerLine",
"(",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"DMNDecisionServiceDividerLine",
"value",
")",
"{",
"this",
".",
"dmnDecisionServiceDividerLine",
"=",
"value",
";",
"}"
] | Sets the value of the dmnDecisionServiceDividerLine property.
@param value
allowed object is
{@link DMNDecisionServiceDividerLine } | [
"Sets",
"the",
"value",
"of",
"the",
"dmnDecisionServiceDividerLine",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNShape.java#L73-L75 |
14,178 | kiegroup/drools | drools-core/src/main/java/org/drools/core/base/EvaluatorWrapper.java | EvaluatorWrapper.evaluate | public boolean evaluate(InternalWorkingMemory workingMemory, Object left, Object right) {
Object leftValue = leftTimestamp != null ? leftTimestamp : left;
Object rightValue = rightTimestamp != null ? rightTimestamp : right;
return rightLiteral ?
evaluator.evaluate( workingMemory... | java | public boolean evaluate(InternalWorkingMemory workingMemory, Object left, Object right) {
Object leftValue = leftTimestamp != null ? leftTimestamp : left;
Object rightValue = rightTimestamp != null ? rightTimestamp : right;
return rightLiteral ?
evaluator.evaluate( workingMemory... | [
"public",
"boolean",
"evaluate",
"(",
"InternalWorkingMemory",
"workingMemory",
",",
"Object",
"left",
",",
"Object",
"right",
")",
"{",
"Object",
"leftValue",
"=",
"leftTimestamp",
"!=",
"null",
"?",
"leftTimestamp",
":",
"left",
";",
"Object",
"rightValue",
"=... | This method is called when operators are rewritten as function calls. For instance,
x after y
Is rewritten as
after.evaluate( _workingMemory_, x, y )
@return | [
"This",
"method",
"is",
"called",
"when",
"operators",
"are",
"rewritten",
"as",
"function",
"calls",
".",
"For",
"instance"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/base/EvaluatorWrapper.java#L90-L104 |
14,179 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getLHSBoundFact | public FactPattern getLHSBoundFact(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
if (pat instanceof FromCompositeFactPattern) {
pat = ((FromCompositeFactPatter... | java | public FactPattern getLHSBoundFact(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
if (pat instanceof FromCompositeFactPattern) {
pat = ((FromCompositeFactPatter... | [
"public",
"FactPattern",
"getLHSBoundFact",
"(",
"final",
"String",
"var",
")",
"{",
"if",
"(",
"this",
".",
"lhs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"lhs",
".",
"len... | This will return the FactPattern that a variable is bound Eto.
@param var The bound fact variable (NOT bound field).
@return null or the FactPattern found. | [
"This",
"will",
"return",
"the",
"FactPattern",
"that",
"a",
"variable",
"is",
"bound",
"Eto",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L85-L102 |
14,180 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getLHSBoundField | public SingleFieldConstraint getLHSBoundField(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
SingleFieldConstraint fieldConstraint = getLHSBoundField(pat,
... | java | public SingleFieldConstraint getLHSBoundField(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
SingleFieldConstraint fieldConstraint = getLHSBoundField(pat,
... | [
"public",
"SingleFieldConstraint",
"getLHSBoundField",
"(",
"final",
"String",
"var",
")",
"{",
"if",
"(",
"this",
".",
"lhs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"lhs",
... | This will return the FieldConstraint that a variable is bound to.
@param var The bound field variable (NOT bound fact).
@return null or the FieldConstraint found. | [
"This",
"will",
"return",
"the",
"FieldConstraint",
"that",
"a",
"variable",
"is",
"bound",
"to",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L110-L125 |
14,181 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getLHSBindingType | public String getLHSBindingType(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
String type = getLHSBindingType(this.lhs[i],
var);
if (type != null) {
... | java | public String getLHSBindingType(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
String type = getLHSBindingType(this.lhs[i],
var);
if (type != null) {
... | [
"public",
"String",
"getLHSBindingType",
"(",
"final",
"String",
"var",
")",
"{",
"if",
"(",
"this",
".",
"lhs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"lhs",
".",
"length... | Get the data-type associated with the binding
@param var
@return The data-type, or null if the binding could not be found | [
"Get",
"the",
"data",
"-",
"type",
"associated",
"with",
"the",
"binding"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L166-L178 |
14,182 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getRHSBoundFact | public ActionInsertFact getRHSBoundFact(final String var) {
if (this.rhs == null) {
return null;
}
for (int i = 0; i < this.rhs.length; i++) {
if (this.rhs[i] instanceof ActionInsertFact) {
final ActionInsertFact p = (ActionInsertFact) this.rhs[i];
... | java | public ActionInsertFact getRHSBoundFact(final String var) {
if (this.rhs == null) {
return null;
}
for (int i = 0; i < this.rhs.length; i++) {
if (this.rhs[i] instanceof ActionInsertFact) {
final ActionInsertFact p = (ActionInsertFact) this.rhs[i];
... | [
"public",
"ActionInsertFact",
"getRHSBoundFact",
"(",
"final",
"String",
"var",
")",
"{",
"if",
"(",
"this",
".",
"rhs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"rhs",
".",
... | This will return the ActionInsertFact that a variable is bound to.
@param var The bound fact variable (NOT bound field).
@return null or the ActionInsertFact found. | [
"This",
"will",
"return",
"the",
"ActionInsertFact",
"that",
"a",
"variable",
"is",
"bound",
"to",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L265-L278 |
14,183 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getLHSParentFactPatternForBinding | public FactPattern getLHSParentFactPatternForBinding(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
if (pat instanceof FromCompositeFactPattern) {
pat = ((FromC... | java | public FactPattern getLHSParentFactPatternForBinding(final String var) {
if (this.lhs == null) {
return null;
}
for (int i = 0; i < this.lhs.length; i++) {
IPattern pat = this.lhs[i];
if (pat instanceof FromCompositeFactPattern) {
pat = ((FromC... | [
"public",
"FactPattern",
"getLHSParentFactPatternForBinding",
"(",
"final",
"String",
"var",
")",
"{",
"if",
"(",
"this",
".",
"lhs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"l... | This will return the FactPattern that a variable is bound to. If the
variable is bound to a FieldConstraint the parent FactPattern will be
returned.
@param var The variable binding
@return null or the FactPattern found. | [
"This",
"will",
"return",
"the",
"FactPattern",
"that",
"a",
"variable",
"is",
"bound",
"to",
".",
"If",
"the",
"variable",
"is",
"bound",
"to",
"a",
"FieldConstraint",
"the",
"parent",
"FactPattern",
"will",
"be",
"returned",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L288-L312 |
14,184 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getAllRHSVariables | public List<String> getAllRHSVariables() {
List<String> result = new ArrayList<String>();
for (int i = 0; i < this.rhs.length; i++) {
IAction pat = this.rhs[i];
if (pat instanceof ActionInsertFact) {
ActionInsertFact fact = (ActionInsertFact) pat;
... | java | public List<String> getAllRHSVariables() {
List<String> result = new ArrayList<String>();
for (int i = 0; i < this.rhs.length; i++) {
IAction pat = this.rhs[i];
if (pat instanceof ActionInsertFact) {
ActionInsertFact fact = (ActionInsertFact) pat;
... | [
"public",
"List",
"<",
"String",
">",
"getAllRHSVariables",
"(",
")",
"{",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"rhs",
".",... | This will get a list of all RHS bound variables. | [
"This",
"will",
"get",
"a",
"list",
"of",
"all",
"RHS",
"bound",
"variables",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L375-L389 |
14,185 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.getMetaData | public RuleMetadata getMetaData(String attributeName) {
if (metadataList != null && attributeName != null) {
for (int i = 0; i < metadataList.length; i++) {
if (attributeName.equals(metadataList[i].getAttributeName())) {
return metadataList[i];
}
... | java | public RuleMetadata getMetaData(String attributeName) {
if (metadataList != null && attributeName != null) {
for (int i = 0; i < metadataList.length; i++) {
if (attributeName.equals(metadataList[i].getAttributeName())) {
return metadataList[i];
}
... | [
"public",
"RuleMetadata",
"getMetaData",
"(",
"String",
"attributeName",
")",
"{",
"if",
"(",
"metadataList",
"!=",
"null",
"&&",
"attributeName",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"metadataList",
".",
"length",
";"... | Locate metadata element
@param attributeName - value to look for
@return null if not found | [
"Locate",
"metadata",
"element"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L700-L710 |
14,186 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.updateMetadata | public boolean updateMetadata(final RuleMetadata target) {
RuleMetadata metaData = getMetaData(target.getAttributeName());
if (metaData != null) {
metaData.setValue(target.getValue());
return true;
}
addMetadata(target);
return false;
} | java | public boolean updateMetadata(final RuleMetadata target) {
RuleMetadata metaData = getMetaData(target.getAttributeName());
if (metaData != null) {
metaData.setValue(target.getValue());
return true;
}
addMetadata(target);
return false;
} | [
"public",
"boolean",
"updateMetadata",
"(",
"final",
"RuleMetadata",
"target",
")",
"{",
"RuleMetadata",
"metaData",
"=",
"getMetaData",
"(",
"target",
".",
"getAttributeName",
"(",
")",
")",
";",
"if",
"(",
"metaData",
"!=",
"null",
")",
"{",
"metaData",
".... | Update metaData element if it exists or add it otherwise
@param target
@return true on update of existing element false on added of element | [
"Update",
"metaData",
"element",
"if",
"it",
"exists",
"or",
"add",
"it",
"otherwise"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L718-L728 |
14,187 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java | RuleModel.hasDSLSentences | public boolean hasDSLSentences() {
if (this.lhs != null) {
for (IPattern pattern : this.lhs) {
if (pattern instanceof DSLSentence) {
return true;
}
}
}
if (this.rhs != null) {
for (IAction action : this.rhs... | java | public boolean hasDSLSentences() {
if (this.lhs != null) {
for (IPattern pattern : this.lhs) {
if (pattern instanceof DSLSentence) {
return true;
}
}
}
if (this.rhs != null) {
for (IAction action : this.rhs... | [
"public",
"boolean",
"hasDSLSentences",
"(",
")",
"{",
"if",
"(",
"this",
".",
"lhs",
"!=",
"null",
")",
"{",
"for",
"(",
"IPattern",
"pattern",
":",
"this",
".",
"lhs",
")",
"{",
"if",
"(",
"pattern",
"instanceof",
"DSLSentence",
")",
"{",
"return",
... | Returns true if any DSLSentences are used. | [
"Returns",
"true",
"if",
"any",
"DSLSentences",
"are",
"used",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/RuleModel.java#L823-L842 |
14,188 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/model/DTCellValue52.java | DTCellValue52.cloneDefaultValueCell | public DTCellValue52 cloneDefaultValueCell() {
DTCellValue52 cloned = new DTCellValue52();
cloned.valueBoolean = valueBoolean;
cloned.valueDate = valueDate;
cloned.valueNumeric = valueNumeric;
cloned.valueString = valueString;
cloned.dataType = dataType;
return cl... | java | public DTCellValue52 cloneDefaultValueCell() {
DTCellValue52 cloned = new DTCellValue52();
cloned.valueBoolean = valueBoolean;
cloned.valueDate = valueDate;
cloned.valueNumeric = valueNumeric;
cloned.valueString = valueString;
cloned.dataType = dataType;
return cl... | [
"public",
"DTCellValue52",
"cloneDefaultValueCell",
"(",
")",
"{",
"DTCellValue52",
"cloned",
"=",
"new",
"DTCellValue52",
"(",
")",
";",
"cloned",
".",
"valueBoolean",
"=",
"valueBoolean",
";",
"cloned",
".",
"valueDate",
"=",
"valueDate",
";",
"cloned",
".",
... | Clones this default value instance.
@return The cloned instance. | [
"Clones",
"this",
"default",
"value",
"instance",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/model/DTCellValue52.java#L492-L500 |
14,189 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/WindowNode.java | WindowNode.createMemory | public WindowMemory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
WindowMemory memory = new WindowMemory();
memory.behaviorContext = this.behavior.createBehaviorContext();
return memory;
} | java | public WindowMemory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
WindowMemory memory = new WindowMemory();
memory.behaviorContext = this.behavior.createBehaviorContext();
return memory;
} | [
"public",
"WindowMemory",
"createMemory",
"(",
"final",
"RuleBaseConfiguration",
"config",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"WindowMemory",
"memory",
"=",
"new",
"WindowMemory",
"(",
")",
";",
"memory",
".",
"behaviorContext",
"=",
"this",
".",
"behav... | Creates the WindowNode's memory. | [
"Creates",
"the",
"WindowNode",
"s",
"memory",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/WindowNode.java#L256-L260 |
14,190 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/hitpolicy/RowPriorityResolver.java | RowPriorityResolver.moveRowsBasedOnPriority | private void moveRowsBasedOnPriority() {
for (RowNumber myNumber : overs.keySet()) {
Over over = overs.get(myNumber);
int newIndex = rowOrder.indexOf(new RowNumber(over.getOver()));
rowOrder.remove(myNumber);
rowOrder.add(newIndex,
myNum... | java | private void moveRowsBasedOnPriority() {
for (RowNumber myNumber : overs.keySet()) {
Over over = overs.get(myNumber);
int newIndex = rowOrder.indexOf(new RowNumber(over.getOver()));
rowOrder.remove(myNumber);
rowOrder.add(newIndex,
myNum... | [
"private",
"void",
"moveRowsBasedOnPriority",
"(",
")",
"{",
"for",
"(",
"RowNumber",
"myNumber",
":",
"overs",
".",
"keySet",
"(",
")",
")",
"{",
"Over",
"over",
"=",
"overs",
".",
"get",
"(",
"myNumber",
")",
";",
"int",
"newIndex",
"=",
"rowOrder",
... | Move rows on top of the row it has priority over. | [
"Move",
"rows",
"on",
"top",
"of",
"the",
"row",
"it",
"has",
"priority",
"over",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/hitpolicy/RowPriorityResolver.java#L75-L85 |
14,191 | kiegroup/drools | drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java | KnowledgeBaseMonitoring.initOpenMBeanInfo | private void initOpenMBeanInfo() {
OpenMBeanAttributeInfoSupport[] attributes = new OpenMBeanAttributeInfoSupport[4];
OpenMBeanConstructorInfoSupport[] constructors = new OpenMBeanConstructorInfoSupport[1];
OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[2];
... | java | private void initOpenMBeanInfo() {
OpenMBeanAttributeInfoSupport[] attributes = new OpenMBeanAttributeInfoSupport[4];
OpenMBeanConstructorInfoSupport[] constructors = new OpenMBeanConstructorInfoSupport[1];
OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[2];
... | [
"private",
"void",
"initOpenMBeanInfo",
"(",
")",
"{",
"OpenMBeanAttributeInfoSupport",
"[",
"]",
"attributes",
"=",
"new",
"OpenMBeanAttributeInfoSupport",
"[",
"4",
"]",
";",
"OpenMBeanConstructorInfoSupport",
"[",
"]",
"constructors",
"=",
"new",
"OpenMBeanConstructo... | Initialize the open mbean metadata | [
"Initialize",
"the",
"open",
"mbean",
"metadata"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/management/KnowledgeBaseMonitoring.java#L126-L186 |
14,192 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java | DSLSentence.interpolate | public String interpolate() {
getValues();
if (definition == null) {
return "";
}
int variableStart = definition.indexOf("{");
if (variableStart < 0) {
return definition;
}
int index = 0;
int variableEnd = 0;
StringBuilder... | java | public String interpolate() {
getValues();
if (definition == null) {
return "";
}
int variableStart = definition.indexOf("{");
if (variableStart < 0) {
return definition;
}
int index = 0;
int variableEnd = 0;
StringBuilder... | [
"public",
"String",
"interpolate",
"(",
")",
"{",
"getValues",
"(",
")",
";",
"if",
"(",
"definition",
"==",
"null",
")",
"{",
"return",
"\"\"",
";",
"}",
"int",
"variableStart",
"=",
"definition",
".",
"indexOf",
"(",
"\"{\"",
")",
";",
"if",
"(",
"... | This will strip off any "{" stuff, substituting values accordingly | [
"This",
"will",
"strip",
"off",
"any",
"{",
"stuff",
"substituting",
"values",
"accordingly"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java#L75-L102 |
14,193 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java | DSLSentence.copy | public DSLSentence copy() {
final DSLSentence copy = new DSLSentence();
copy.drl = getDrl();
copy.definition = getDefinition();
copy.values = mapCopy(getValues());
return copy;
} | java | public DSLSentence copy() {
final DSLSentence copy = new DSLSentence();
copy.drl = getDrl();
copy.definition = getDefinition();
copy.values = mapCopy(getValues());
return copy;
} | [
"public",
"DSLSentence",
"copy",
"(",
")",
"{",
"final",
"DSLSentence",
"copy",
"=",
"new",
"DSLSentence",
"(",
")",
";",
"copy",
".",
"drl",
"=",
"getDrl",
"(",
")",
";",
"copy",
".",
"definition",
"=",
"getDefinition",
"(",
")",
";",
"copy",
".",
"... | This is used by the GUI when adding a sentence to LHS or RHS.
@return | [
"This",
"is",
"used",
"by",
"the",
"GUI",
"when",
"adding",
"a",
"sentence",
"to",
"LHS",
"or",
"RHS",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java#L108-L116 |
14,194 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java | DSLSentence.parseSentence | private void parseSentence() {
if (sentence == null) {
return;
}
definition = sentence;
values = new ArrayList<DSLVariableValue>();
sentence = null;
int variableStart = definition.indexOf("{");
while (variableStart >= 0) {
int variableEnd ... | java | private void parseSentence() {
if (sentence == null) {
return;
}
definition = sentence;
values = new ArrayList<DSLVariableValue>();
sentence = null;
int variableStart = definition.indexOf("{");
while (variableStart >= 0) {
int variableEnd ... | [
"private",
"void",
"parseSentence",
"(",
")",
"{",
"if",
"(",
"sentence",
"==",
"null",
")",
"{",
"return",
";",
"}",
"definition",
"=",
"sentence",
";",
"values",
"=",
"new",
"ArrayList",
"<",
"DSLVariableValue",
">",
"(",
")",
";",
"sentence",
"=",
"... | to differentiate value, from data-type, from restriction | [
"to",
"differentiate",
"value",
"from",
"data",
"-",
"type",
"from",
"restriction"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java#L191-L209 |
14,195 | kiegroup/drools | drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java | DSLSentence.parseDefinition | private void parseDefinition() {
values = new ArrayList<DSLVariableValue>();
if (getDefinition() == null) {
return;
}
int variableStart = definition.indexOf("{");
while (variableStart >= 0) {
int variableEnd = getIndexForEndOfVariable(definition,
... | java | private void parseDefinition() {
values = new ArrayList<DSLVariableValue>();
if (getDefinition() == null) {
return;
}
int variableStart = definition.indexOf("{");
while (variableStart >= 0) {
int variableEnd = getIndexForEndOfVariable(definition,
... | [
"private",
"void",
"parseDefinition",
"(",
")",
"{",
"values",
"=",
"new",
"ArrayList",
"<",
"DSLVariableValue",
">",
"(",
")",
";",
"if",
"(",
"getDefinition",
"(",
")",
"==",
"null",
")",
"{",
"return",
";",
"}",
"int",
"variableStart",
"=",
"definitio... | Build the Values from the Definition. | [
"Build",
"the",
"Values",
"from",
"the",
"Definition",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-datamodel-api/src/main/java/org/drools/workbench/models/datamodel/rule/DSLSentence.java#L212-L228 |
14,196 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/assembler/PMMLAssemblerService.java | PMMLAssemblerService.addPackage | private void addPackage(Resource resource) throws DroolsParserException, IOException {
if (pmmlCompiler != null) {
if (pmmlCompiler.getResults().isEmpty()) {
addPMMLPojos(pmmlCompiler, resource);
if (pmmlCompiler.getResults().isEmpty()) {
List<Pack... | java | private void addPackage(Resource resource) throws DroolsParserException, IOException {
if (pmmlCompiler != null) {
if (pmmlCompiler.getResults().isEmpty()) {
addPMMLPojos(pmmlCompiler, resource);
if (pmmlCompiler.getResults().isEmpty()) {
List<Pack... | [
"private",
"void",
"addPackage",
"(",
"Resource",
"resource",
")",
"throws",
"DroolsParserException",
",",
"IOException",
"{",
"if",
"(",
"pmmlCompiler",
"!=",
"null",
")",
"{",
"if",
"(",
"pmmlCompiler",
".",
"getResults",
"(",
")",
".",
"isEmpty",
"(",
")"... | This method does the work of calling the PMML compiler and then assembling the results
into packages that are added to the KnowledgeBuilder
@param resource
@throws DroolsParserException
@throws IOException | [
"This",
"method",
"does",
"the",
"work",
"of",
"calling",
"the",
"PMML",
"compiler",
"and",
"then",
"assembling",
"the",
"results",
"into",
"packages",
"that",
"are",
"added",
"to",
"the",
"KnowledgeBuilder"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/assembler/PMMLAssemblerService.java#L100-L114 |
14,197 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/assembler/PMMLAssemblerService.java | PMMLAssemblerService.getPackageDescrs | private List<PackageDescr> getPackageDescrs(Resource resource) throws DroolsParserException, IOException {
List<PMMLResource> resources = pmmlCompiler.precompile(resource.getInputStream(), null, null);
if (resources != null && !resources.isEmpty()) {
return generatedResourcesToPackageDescr(r... | java | private List<PackageDescr> getPackageDescrs(Resource resource) throws DroolsParserException, IOException {
List<PMMLResource> resources = pmmlCompiler.precompile(resource.getInputStream(), null, null);
if (resources != null && !resources.isEmpty()) {
return generatedResourcesToPackageDescr(r... | [
"private",
"List",
"<",
"PackageDescr",
">",
"getPackageDescrs",
"(",
"Resource",
"resource",
")",
"throws",
"DroolsParserException",
",",
"IOException",
"{",
"List",
"<",
"PMMLResource",
">",
"resources",
"=",
"pmmlCompiler",
".",
"precompile",
"(",
"resource",
"... | This method calls the PMML compiler to get PMMLResource objects which are used to
create one or more PackageDescr objects
@param resource
@return
@throws DroolsParserException
@throws IOException | [
"This",
"method",
"calls",
"the",
"PMML",
"compiler",
"to",
"get",
"PMMLResource",
"objects",
"which",
"are",
"used",
"to",
"create",
"one",
"or",
"more",
"PackageDescr",
"objects"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/assembler/PMMLAssemblerService.java#L124-L130 |
14,198 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-template/src/main/java/org/drools/workbench/models/guided/template/backend/upgrade/RuleModelUpgradeHelper1.java | RuleModelUpgradeHelper1.updateMethodCall | private RuleModel updateMethodCall(RuleModel model) {
for (int i = 0; i < model.rhs.length; i++) {
if (model.rhs[i] instanceof ActionCallMethod) {
ActionCallMethod action = (ActionCallMethod) model.rhs[i];
// Check if method name is filled, if not this was made with ... | java | private RuleModel updateMethodCall(RuleModel model) {
for (int i = 0; i < model.rhs.length; i++) {
if (model.rhs[i] instanceof ActionCallMethod) {
ActionCallMethod action = (ActionCallMethod) model.rhs[i];
// Check if method name is filled, if not this was made with ... | [
"private",
"RuleModel",
"updateMethodCall",
"(",
"RuleModel",
"model",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"model",
".",
"rhs",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"model",
".",
"rhs",
"[",
"i",
"]",
"instan... | before that needs to be updated. | [
"before",
"that",
"needs",
"to",
"be",
"updated",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-template/src/main/java/org/drools/workbench/models/guided/template/backend/upgrade/RuleModelUpgradeHelper1.java#L46-L64 |
14,199 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java | EvalHelper.isValidChar | private static boolean isValidChar(char c) {
if ( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' ) {
return true;
}
return c != ' ' && c != '\u00A0' && !Character.isWhitespace(c) && !Character.isWhitespace(c);
} | java | private static boolean isValidChar(char c) {
if ( c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' ) {
return true;
}
return c != ' ' && c != '\u00A0' && !Character.isWhitespace(c) && !Character.isWhitespace(c);
} | [
"private",
"static",
"boolean",
"isValidChar",
"(",
"char",
"c",
")",
"{",
"if",
"(",
"c",
">=",
"'",
"'",
"&&",
"c",
"<=",
"'",
"'",
"||",
"c",
">=",
"'",
"'",
"&&",
"c",
"<=",
"'",
"'",
"||",
"c",
">=",
"'",
"'",
"&&",
"c",
"<=",
"'",
"... | This method defines what characters are valid for the output of normalizeVariableName. Spaces and control characters are invalid.
There is a fast-path for well known characters | [
"This",
"method",
"defines",
"what",
"characters",
"are",
"valid",
"for",
"the",
"output",
"of",
"normalizeVariableName",
".",
"Spaces",
"and",
"control",
"characters",
"are",
"invalid",
".",
"There",
"is",
"a",
"fast",
"-",
"path",
"for",
"well",
"known",
"... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java#L140-L145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.