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,200 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java | EvalHelper.getGenericAccessor | public static Method getGenericAccessor(Class<?> clazz, String field) {
LOG.trace( "getGenericAccessor({}, {})", clazz, field );
String accessorQualifiedName = new StringBuilder(clazz.getCanonicalName())
.append(".").append(field).toString();
return accessorCache.computeIfAbsent(accessorQua... | java | public static Method getGenericAccessor(Class<?> clazz, String field) {
LOG.trace( "getGenericAccessor({}, {})", clazz, field );
String accessorQualifiedName = new StringBuilder(clazz.getCanonicalName())
.append(".").append(field).toString();
return accessorCache.computeIfAbsent(accessorQua... | [
"public",
"static",
"Method",
"getGenericAccessor",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"field",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"getGenericAccessor({}, {})\"",
",",
"clazz",
",",
"field",
")",
";",
"String",
"accessorQualifiedName",
"="... | FEEL annotated or else Java accessor.
@param clazz
@param field
@return | [
"FEEL",
"annotated",
"or",
"else",
"Java",
"accessor",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java#L408-L422 |
14,201 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java | EvalHelper.getAccessor | public static Method getAccessor(Class<?> clazz, String field) {
LOG.trace( "getAccessor({}, {})", clazz, field );
try {
return clazz.getMethod( "get" + ucFirst( field ) );
} catch ( NoSuchMethodException e ) {
try {
return clazz.getMethod( field );
... | java | public static Method getAccessor(Class<?> clazz, String field) {
LOG.trace( "getAccessor({}, {})", clazz, field );
try {
return clazz.getMethod( "get" + ucFirst( field ) );
} catch ( NoSuchMethodException e ) {
try {
return clazz.getMethod( field );
... | [
"public",
"static",
"Method",
"getAccessor",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"field",
")",
"{",
"LOG",
".",
"trace",
"(",
"\"getAccessor({}, {})\"",
",",
"clazz",
",",
"field",
")",
";",
"try",
"{",
"return",
"clazz",
".",
"getMethod... | JavaBean -spec compliant accessor.
@param clazz
@param field
@return | [
"JavaBean",
"-",
"spec",
"compliant",
"accessor",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java#L434-L449 |
14,202 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java | EvalHelper.isEqual | public static Boolean isEqual(Object left, Object right, EvaluationContext ctx ) {
if ( left == null || right == null ) {
return left == right;
}
// spec defines that "a=[a]", i.e., singleton collections should be treated as the single element
// and vice-versa
if( l... | java | public static Boolean isEqual(Object left, Object right, EvaluationContext ctx ) {
if ( left == null || right == null ) {
return left == right;
}
// spec defines that "a=[a]", i.e., singleton collections should be treated as the single element
// and vice-versa
if( l... | [
"public",
"static",
"Boolean",
"isEqual",
"(",
"Object",
"left",
",",
"Object",
"right",
",",
"EvaluationContext",
"ctx",
")",
"{",
"if",
"(",
"left",
"==",
"null",
"||",
"right",
"==",
"null",
")",
"{",
"return",
"left",
"==",
"right",
";",
"}",
"// s... | Compares left and right for equality applying FEEL semantics to specific data types
@param left
@param right
@param ctx
@return | [
"Compares",
"left",
"and",
"right",
"for",
"equality",
"applying",
"FEEL",
"semantics",
"to",
"specific",
"data",
"types"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/util/EvalHelper.java#L523-L551 |
14,203 | kiegroup/drools | drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java | FactTemplateImpl.getFieldTemplate | public FieldTemplate getFieldTemplate(final String name) {
for ( int idx = 0; idx < this.fields.length; idx++ ) {
if ( this.fields[idx].getName().equals( name ) ) {
return this.fields[idx];
}
}
return null;
} | java | public FieldTemplate getFieldTemplate(final String name) {
for ( int idx = 0; idx < this.fields.length; idx++ ) {
if ( this.fields[idx].getName().equals( name ) ) {
return this.fields[idx];
}
}
return null;
} | [
"public",
"FieldTemplate",
"getFieldTemplate",
"(",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"idx",
"=",
"0",
";",
"idx",
"<",
"this",
".",
"fields",
".",
"length",
";",
"idx",
"++",
")",
"{",
"if",
"(",
"this",
".",
"fields",
"[",
"... | A convienance method for finding the slot matching
the String name.
@param name
@return | [
"A",
"convienance",
"method",
"for",
"finding",
"the",
"slot",
"matching",
"the",
"String",
"name",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java#L104-L111 |
14,204 | kiegroup/drools | drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java | FactTemplateImpl.getFieldTemplateIndex | public int getFieldTemplateIndex(final String name) {
for ( int index = 0; index < this.fields.length; index++ ) {
if ( this.fields[index].getName().equals( name ) ) {
return index;
}
}
return -1;
} | java | public int getFieldTemplateIndex(final String name) {
for ( int index = 0; index < this.fields.length; index++ ) {
if ( this.fields[index].getName().equals( name ) ) {
return index;
}
}
return -1;
} | [
"public",
"int",
"getFieldTemplateIndex",
"(",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"this",
".",
"fields",
".",
"length",
";",
"index",
"++",
")",
"{",
"if",
"(",
"this",
".",
"fields",
"[",
... | Look up the pattern index of the slot | [
"Look",
"up",
"the",
"pattern",
"index",
"of",
"the",
"slot"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/facttemplates/FactTemplateImpl.java#L123-L130 |
14,205 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.get | public boolean get(int index) {
int i = index >> 6; // div 64
// signed shift will keep a negative index and force an
// array-index-out-of-bounds-exception, removing the need for an explicit check.
if (i>=bits.length) return false;
int bit = index & 0x3f; ... | java | public boolean get(int index) {
int i = index >> 6; // div 64
// signed shift will keep a negative index and force an
// array-index-out-of-bounds-exception, removing the need for an explicit check.
if (i>=bits.length) return false;
int bit = index & 0x3f; ... | [
"public",
"boolean",
"get",
"(",
"int",
"index",
")",
"{",
"int",
"i",
"=",
"index",
">>",
"6",
";",
"// div 64",
"// signed shift will keep a negative index and force an",
"// array-index-out-of-bounds-exception, removing the need for an explicit check.",
"if",
"(",
"i",
"... | Returns true or false for the specified bit index. | [
"Returns",
"true",
"or",
"false",
"for",
"the",
"specified",
"bit",
"index",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L153-L162 |
14,206 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.fastGet | public boolean fastGet(int index) {
assert index >= 0 && index < numBits;
int i = index >> 6; // div 64
// signed shift will keep a negative index and force an
// array-index-out-of-bounds-exception, removing the need for an explicit check.
int bit = index & 0x3f; ... | java | public boolean fastGet(int index) {
assert index >= 0 && index < numBits;
int i = index >> 6; // div 64
// signed shift will keep a negative index and force an
// array-index-out-of-bounds-exception, removing the need for an explicit check.
int bit = index & 0x3f; ... | [
"public",
"boolean",
"fastGet",
"(",
"int",
"index",
")",
"{",
"assert",
"index",
">=",
"0",
"&&",
"index",
"<",
"numBits",
";",
"int",
"i",
"=",
"index",
">>",
"6",
";",
"// div 64",
"// signed shift will keep a negative index and force an",
"// array-index-out-o... | Returns true or false for the specified bit index.
The index should be less than the OpenBitSet size | [
"Returns",
"true",
"or",
"false",
"for",
"the",
"specified",
"bit",
"index",
".",
"The",
"index",
"should",
"be",
"less",
"than",
"the",
"OpenBitSet",
"size"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L168-L176 |
14,207 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.getBit | public int getBit(int index) {
assert index >= 0 && index < numBits;
int i = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
return ((int)(bits[i]>>>bit)) & 0x01;
} | java | public int getBit(int index) {
assert index >= 0 && index < numBits;
int i = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
return ((int)(bits[i]>>>bit)) & 0x01;
} | [
"public",
"int",
"getBit",
"(",
"int",
"index",
")",
"{",
"assert",
"index",
">=",
"0",
"&&",
"index",
"<",
"numBits",
";",
"int",
"i",
"=",
"index",
">>",
"6",
";",
"// div 64",
"int",
"bit",
"=",
"index",
"&",
"0x3f",
";",
"// mod 64",
"return",
... | returns 1 if the bit is set, 0 if not.
The index should be less than the OpenBitSet size | [
"returns",
"1",
"if",
"the",
"bit",
"is",
"set",
"0",
"if",
"not",
".",
"The",
"index",
"should",
"be",
"less",
"than",
"the",
"OpenBitSet",
"size"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L217-L222 |
14,208 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.set | public void set(long index) {
int wordNum = expandingWordNum(index);
int bit = (int)index & 0x3f;
long bitmask = 1L << bit;
bits[wordNum] |= bitmask;
} | java | public void set(long index) {
int wordNum = expandingWordNum(index);
int bit = (int)index & 0x3f;
long bitmask = 1L << bit;
bits[wordNum] |= bitmask;
} | [
"public",
"void",
"set",
"(",
"long",
"index",
")",
"{",
"int",
"wordNum",
"=",
"expandingWordNum",
"(",
"index",
")",
";",
"int",
"bit",
"=",
"(",
"int",
")",
"index",
"&",
"0x3f",
";",
"long",
"bitmask",
"=",
"1L",
"<<",
"bit",
";",
"bits",
"[",
... | sets a bit, expanding the set size if necessary | [
"sets",
"a",
"bit",
"expanding",
"the",
"set",
"size",
"if",
"necessary"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L235-L240 |
14,209 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.fastSet | public void fastSet(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] |= bitmask;
} | java | public void fastSet(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] |= bitmask;
} | [
"public",
"void",
"fastSet",
"(",
"int",
"index",
")",
"{",
"assert",
"index",
">=",
"0",
"&&",
"index",
"<",
"numBits",
";",
"int",
"wordNum",
"=",
"index",
">>",
"6",
";",
"// div 64",
"int",
"bit",
"=",
"index",
"&",
"0x3f",
";",
"// mod 64",
"lon... | Sets the bit at the specified index.
The index should be less than the OpenBitSet size. | [
"Sets",
"the",
"bit",
"at",
"the",
"specified",
"index",
".",
"The",
"index",
"should",
"be",
"less",
"than",
"the",
"OpenBitSet",
"size",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L246-L252 |
14,210 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.fastClear | public void fastClear(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6;
int bit = index & 0x03f;
long bitmask = 1L << bit;
bits[wordNum] &= ~bitmask;
// hmmm, it takes one more instruction to clear than it does to set... any
// way to wo... | java | public void fastClear(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6;
int bit = index & 0x03f;
long bitmask = 1L << bit;
bits[wordNum] &= ~bitmask;
// hmmm, it takes one more instruction to clear than it does to set... any
// way to wo... | [
"public",
"void",
"fastClear",
"(",
"int",
"index",
")",
"{",
"assert",
"index",
">=",
"0",
"&&",
"index",
"<",
"numBits",
";",
"int",
"wordNum",
"=",
"index",
">>",
"6",
";",
"int",
"bit",
"=",
"index",
"&",
"0x03f",
";",
"long",
"bitmask",
"=",
"... | clears a bit.
The index should be less than the OpenBitSet size. | [
"clears",
"a",
"bit",
".",
"The",
"index",
"should",
"be",
"less",
"than",
"the",
"OpenBitSet",
"size",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L308-L321 |
14,211 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.clear | public void clear(long index) {
int wordNum = (int)(index >> 6); // div 64
if (wordNum>=wlen) return;
int bit = (int)index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] &= ~bitmask;
} | java | public void clear(long index) {
int wordNum = (int)(index >> 6); // div 64
if (wordNum>=wlen) return;
int bit = (int)index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] &= ~bitmask;
} | [
"public",
"void",
"clear",
"(",
"long",
"index",
")",
"{",
"int",
"wordNum",
"=",
"(",
"int",
")",
"(",
"index",
">>",
"6",
")",
";",
"// div 64",
"if",
"(",
"wordNum",
">=",
"wlen",
")",
"return",
";",
"int",
"bit",
"=",
"(",
"int",
")",
"index"... | clears a bit, allowing access beyond the current set size without changing the size. | [
"clears",
"a",
"bit",
"allowing",
"access",
"beyond",
"the",
"current",
"set",
"size",
"without",
"changing",
"the",
"size",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L335-L341 |
14,212 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.fastFlip | public void fastFlip(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] ^= bitmask;
} | java | public void fastFlip(int index) {
assert index >= 0 && index < numBits;
int wordNum = index >> 6; // div 64
int bit = index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] ^= bitmask;
} | [
"public",
"void",
"fastFlip",
"(",
"int",
"index",
")",
"{",
"assert",
"index",
">=",
"0",
"&&",
"index",
"<",
"numBits",
";",
"int",
"wordNum",
"=",
"index",
">>",
"6",
";",
"// div 64",
"int",
"bit",
"=",
"index",
"&",
"0x3f",
";",
"// mod 64",
"lo... | flips a bit.
The index should be less than the OpenBitSet size. | [
"flips",
"a",
"bit",
".",
"The",
"index",
"should",
"be",
"less",
"than",
"the",
"OpenBitSet",
"size",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L447-L453 |
14,213 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.flip | public void flip(long index) {
int wordNum = expandingWordNum(index);
int bit = (int)index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] ^= bitmask;
} | java | public void flip(long index) {
int wordNum = expandingWordNum(index);
int bit = (int)index & 0x3f; // mod 64
long bitmask = 1L << bit;
bits[wordNum] ^= bitmask;
} | [
"public",
"void",
"flip",
"(",
"long",
"index",
")",
"{",
"int",
"wordNum",
"=",
"expandingWordNum",
"(",
"index",
")",
";",
"int",
"bit",
"=",
"(",
"int",
")",
"index",
"&",
"0x3f",
";",
"// mod 64",
"long",
"bitmask",
"=",
"1L",
"<<",
"bit",
";",
... | flips a bit, expanding the set size if necessary | [
"flips",
"a",
"bit",
"expanding",
"the",
"set",
"size",
"if",
"necessary"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L467-L472 |
14,214 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.intersectionCount | public static long intersectionCount(OpenBitSet a, OpenBitSet b) {
return BitUtil.pop_intersect( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
} | java | public static long intersectionCount(OpenBitSet a, OpenBitSet b) {
return BitUtil.pop_intersect( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
} | [
"public",
"static",
"long",
"intersectionCount",
"(",
"OpenBitSet",
"a",
",",
"OpenBitSet",
"b",
")",
"{",
"return",
"BitUtil",
".",
"pop_intersect",
"(",
"a",
".",
"bits",
",",
"b",
".",
"bits",
",",
"0",
",",
"Math",
".",
"min",
"(",
"a",
".",
"wle... | Returns the popcount or cardinality of the intersection of the two sets.
Neither set is modified. | [
"Returns",
"the",
"popcount",
"or",
"cardinality",
"of",
"the",
"intersection",
"of",
"the",
"two",
"sets",
".",
"Neither",
"set",
"is",
"modified",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L567-L569 |
14,215 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.unionCount | public static long unionCount(OpenBitSet a, OpenBitSet b) {
long tot = BitUtil.pop_union( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
if (a.wlen < b.wlen) {
tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
} else if (a.wlen > b.wlen) {
tot += BitUtil.pop_... | java | public static long unionCount(OpenBitSet a, OpenBitSet b) {
long tot = BitUtil.pop_union( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
if (a.wlen < b.wlen) {
tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
} else if (a.wlen > b.wlen) {
tot += BitUtil.pop_... | [
"public",
"static",
"long",
"unionCount",
"(",
"OpenBitSet",
"a",
",",
"OpenBitSet",
"b",
")",
"{",
"long",
"tot",
"=",
"BitUtil",
".",
"pop_union",
"(",
"a",
".",
"bits",
",",
"b",
".",
"bits",
",",
"0",
",",
"Math",
".",
"min",
"(",
"a",
".",
"... | Returns the popcount or cardinality of the union of the two sets.
Neither set is modified. | [
"Returns",
"the",
"popcount",
"or",
"cardinality",
"of",
"the",
"union",
"of",
"the",
"two",
"sets",
".",
"Neither",
"set",
"is",
"modified",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L574-L582 |
14,216 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.xorCount | public static long xorCount(OpenBitSet a, OpenBitSet b) {
long tot = BitUtil.pop_xor( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
if (a.wlen < b.wlen) {
tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
} else if (a.wlen > b.wlen) {
tot += BitUtil.pop_arra... | java | public static long xorCount(OpenBitSet a, OpenBitSet b) {
long tot = BitUtil.pop_xor( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
if (a.wlen < b.wlen) {
tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
} else if (a.wlen > b.wlen) {
tot += BitUtil.pop_arra... | [
"public",
"static",
"long",
"xorCount",
"(",
"OpenBitSet",
"a",
",",
"OpenBitSet",
"b",
")",
"{",
"long",
"tot",
"=",
"BitUtil",
".",
"pop_xor",
"(",
"a",
".",
"bits",
",",
"b",
".",
"bits",
",",
"0",
",",
"Math",
".",
"min",
"(",
"a",
".",
"wlen... | Returns the popcount or cardinality of the exclusive-or of the two sets.
Neither set is modified. | [
"Returns",
"the",
"popcount",
"or",
"cardinality",
"of",
"the",
"exclusive",
"-",
"or",
"of",
"the",
"two",
"sets",
".",
"Neither",
"set",
"is",
"modified",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L599-L607 |
14,217 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.prevSetBit | public int prevSetBit(int index) {
int i = index >> 6;
final int subIndex;
long word;
if (i >= wlen) {
i = wlen - 1;
if (i < 0) return -1;
subIndex = 63; // last possible bit
word = bits[i];
} else {
if (i < 0) return -... | java | public int prevSetBit(int index) {
int i = index >> 6;
final int subIndex;
long word;
if (i >= wlen) {
i = wlen - 1;
if (i < 0) return -1;
subIndex = 63; // last possible bit
word = bits[i];
} else {
if (i < 0) return -... | [
"public",
"int",
"prevSetBit",
"(",
"int",
"index",
")",
"{",
"int",
"i",
"=",
"index",
">>",
"6",
";",
"final",
"int",
"subIndex",
";",
"long",
"word",
";",
"if",
"(",
"i",
">=",
"wlen",
")",
"{",
"i",
"=",
"wlen",
"-",
"1",
";",
"if",
"(",
... | Returns the index of the first set bit starting downwards at
the index specified.
-1 is returned if there are no more set bits. | [
"Returns",
"the",
"index",
"of",
"the",
"first",
"set",
"bit",
"starting",
"downwards",
"at",
"the",
"index",
"specified",
".",
"-",
"1",
"is",
"returned",
"if",
"there",
"are",
"no",
"more",
"set",
"bits",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L657-L684 |
14,218 | kiegroup/drools | drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java | OpenBitSet.oversize | public static int oversize(int minTargetSize, int bytesPerElement) {
if (minTargetSize < 0) {
// catch usage that accidentally overflows int
throw new IllegalArgumentException("invalid array size " + minTargetSize);
}
if (minTargetSize == 0) {
// wait until ... | java | public static int oversize(int minTargetSize, int bytesPerElement) {
if (minTargetSize < 0) {
// catch usage that accidentally overflows int
throw new IllegalArgumentException("invalid array size " + minTargetSize);
}
if (minTargetSize == 0) {
// wait until ... | [
"public",
"static",
"int",
"oversize",
"(",
"int",
"minTargetSize",
",",
"int",
"bytesPerElement",
")",
"{",
"if",
"(",
"minTargetSize",
"<",
"0",
")",
"{",
"// catch usage that accidentally overflows int",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"invalid a... | Returns an array size >= minTargetSize, generally
over-allocating exponentially to achieve amortized
linear-time cost as the array grows.
NOTE: this was originally borrowed from Python 2.4.2
listobject.c sources (attribution in LICENSE.txt), but
has now been substantially changed based on
discussions from java-dev thr... | [
"Returns",
"an",
"array",
"size",
">",
"=",
"minTargetSize",
"generally",
"over",
"-",
"allocating",
"exponentially",
"to",
"achieve",
"amortized",
"linear",
"-",
"time",
"cost",
"as",
"the",
"array",
"grows",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-canonical-model/src/main/java/org/drools/model/bitmask/OpenBitSet.java#L919-L986 |
14,219 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/model/AttributeCol52.java | AttributeCol52.cloneColumn | public AttributeCol52 cloneColumn() {
AttributeCol52 cloned = new AttributeCol52();
cloned.setAttribute( getAttribute() );
cloned.setReverseOrder( isReverseOrder() );
cloned.setUseRowNumber( isUseRowNumber() );
cloned.cloneCommonColumnConfigFrom( this );
return cloned;
... | java | public AttributeCol52 cloneColumn() {
AttributeCol52 cloned = new AttributeCol52();
cloned.setAttribute( getAttribute() );
cloned.setReverseOrder( isReverseOrder() );
cloned.setUseRowNumber( isUseRowNumber() );
cloned.cloneCommonColumnConfigFrom( this );
return cloned;
... | [
"public",
"AttributeCol52",
"cloneColumn",
"(",
")",
"{",
"AttributeCol52",
"cloned",
"=",
"new",
"AttributeCol52",
"(",
")",
";",
"cloned",
".",
"setAttribute",
"(",
"getAttribute",
"(",
")",
")",
";",
"cloned",
".",
"setReverseOrder",
"(",
"isReverseOrder",
... | Clones this attribute column instance.
@return The cloned instance. | [
"Clones",
"this",
"attribute",
"column",
"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/AttributeCol52.java#L81-L88 |
14,220 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/EqualityAssertMapComparator.java | EqualityAssertMapComparator.equal | public boolean equal(final Object o1,
Object o2) {
if ( o1 == o2 ) {
return true;
}
// o1 is a FactHandle, so just check their id's are the same
if ( o1 instanceof FactHandle ) {
return ((InternalFactHandle)o1).getId() == ((In... | java | public boolean equal(final Object o1,
Object o2) {
if ( o1 == o2 ) {
return true;
}
// o1 is a FactHandle, so just check their id's are the same
if ( o1 instanceof FactHandle ) {
return ((InternalFactHandle)o1).getId() == ((In... | [
"public",
"boolean",
"equal",
"(",
"final",
"Object",
"o1",
",",
"Object",
"o2",
")",
"{",
"if",
"(",
"o1",
"==",
"o2",
")",
"{",
"return",
"true",
";",
"}",
"// o1 is a FactHandle, so just check their id's are the same",
"if",
"(",
"o1",
"instanceof",
"FactHa... | Special comparator that allows FactHandles to be keys, but always checks
equals with the identity of the objects involved | [
"Special",
"comparator",
"that",
"allows",
"FactHandles",
"to",
"be",
"keys",
"but",
"always",
"checks",
"equals",
"with",
"the",
"identity",
"of",
"the",
"objects",
"involved"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/EqualityAssertMapComparator.java#L53-L68 |
14,221 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java | DMNDiagram.setSize | public void setSize(org.kie.dmn.model.api.dmndi.Dimension value) {
this.size = value;
} | java | public void setSize(org.kie.dmn.model.api.dmndi.Dimension value) {
this.size = value;
} | [
"public",
"void",
"setSize",
"(",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"Dimension",
"value",
")",
"{",
"this",
".",
"size",
"=",
"value",
";",
"}"
] | Sets the value of the size property.
@param value
allowed object is
{@link Dimension } | [
"Sets",
"the",
"value",
"of",
"the",
"size",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java#L49-L51 |
14,222 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java | DMNDiagram.getDMNDiagramElement | public List<org.kie.dmn.model.api.dmndi.DiagramElement> getDMNDiagramElement() {
if (dmnDiagramElement == null) {
dmnDiagramElement = new ArrayList<>();
}
return this.dmnDiagramElement;
} | java | public List<org.kie.dmn.model.api.dmndi.DiagramElement> getDMNDiagramElement() {
if (dmnDiagramElement == null) {
dmnDiagramElement = new ArrayList<>();
}
return this.dmnDiagramElement;
} | [
"public",
"List",
"<",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"DiagramElement",
">",
"getDMNDiagramElement",
"(",
")",
"{",
"if",
"(",
"dmnDiagramElement",
"==",
"null",
")",
"{",
"dmnDiagramElement",
"=",
"new",
"Arr... | Gets the value of the dmnDiagramElement 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 dmnDiagramElement property.
<p>
F... | [
"Gets",
"the",
"value",
"of",
"the",
"dmnDiagramElement",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNDiagram.java#L77-L82 |
14,223 | kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/marshaller/FEELStringMarshaller.java | FEELStringMarshaller.unmarshall | @Override
public Object unmarshall(Type feelType, String value) {
if ( "null".equals( value ) ) {
return null;
} else if ( feelType.equals( org.kie.dmn.feel.lang.types.BuiltInType.NUMBER ) ) {
return BuiltInFunctions.getFunction( NumberFunction.class ).invoke( value, null, nu... | java | @Override
public Object unmarshall(Type feelType, String value) {
if ( "null".equals( value ) ) {
return null;
} else if ( feelType.equals( org.kie.dmn.feel.lang.types.BuiltInType.NUMBER ) ) {
return BuiltInFunctions.getFunction( NumberFunction.class ).invoke( value, null, nu... | [
"@",
"Override",
"public",
"Object",
"unmarshall",
"(",
"Type",
"feelType",
",",
"String",
"value",
")",
"{",
"if",
"(",
"\"null\"",
".",
"equals",
"(",
"value",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"feelType",
".",
"equals",
... | Unmarshalls the given string into a FEEL value.
IMPORTANT: please note that it is only possible to unmarshall simple
values, like strings and numbers. Complex values like lists and contexts
don't have enough metadata marshalled in the string to enable them to be
unmarshalled.
@param feelType the expected type of the ... | [
"Unmarshalls",
"the",
"given",
"string",
"into",
"a",
"FEEL",
"value",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/marshaller/FEELStringMarshaller.java#L78-L101 |
14,224 | kiegroup/drools | drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java | ObjectTypeConfigurationRegistry.getObjectTypeConf | public ObjectTypeConf getObjectTypeConf(EntryPointId entrypoint,
Object object) {
// first see if it's a ClassObjectTypeConf
Object key;
if (object instanceof Activation) {
key = ClassObjectType.Match_ObjectType.getClassTyp... | java | public ObjectTypeConf getObjectTypeConf(EntryPointId entrypoint,
Object object) {
// first see if it's a ClassObjectTypeConf
Object key;
if (object instanceof Activation) {
key = ClassObjectType.Match_ObjectType.getClassTyp... | [
"public",
"ObjectTypeConf",
"getObjectTypeConf",
"(",
"EntryPointId",
"entrypoint",
",",
"Object",
"object",
")",
"{",
"// first see if it's a ClassObjectTypeConf ",
"Object",
"key",
";",
"if",
"(",
"object",
"instanceof",
"Activation",
")",
"{",
"key",
"=",
"C... | Returns the ObjectTypeConfiguration object for the given object or
creates a new one if none is found in the cache | [
"Returns",
"the",
"ObjectTypeConfiguration",
"object",
"for",
"the",
"given",
"object",
"or",
"creates",
"a",
"new",
"one",
"if",
"none",
"is",
"found",
"in",
"the",
"cache"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/common/ObjectTypeConfigurationRegistry.java#L48-L80 |
14,225 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/dsl/DSLTokenizedMappingFile.java | DSLTokenizedMappingFile.readFile | private String readFile( Reader reader ) throws IOException {
lineLengths = new ArrayList<Integer>();
lineLengths.add( null );
LineNumberReader lnr = new LineNumberReader( reader );
StringBuilder sb = new StringBuilder();
int nlCount = 0;
boolean inEntry = false;
... | java | private String readFile( Reader reader ) throws IOException {
lineLengths = new ArrayList<Integer>();
lineLengths.add( null );
LineNumberReader lnr = new LineNumberReader( reader );
StringBuilder sb = new StringBuilder();
int nlCount = 0;
boolean inEntry = false;
... | [
"private",
"String",
"readFile",
"(",
"Reader",
"reader",
")",
"throws",
"IOException",
"{",
"lineLengths",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
")",
";",
"lineLengths",
".",
"add",
"(",
"null",
")",
";",
"LineNumberReader",
"lnr",
"=",
"new"... | Read a DSL file and convert it to a String. Comment lines are removed.
Split lines are joined, inserting a space for an EOL, but maintaining the
original number of lines by inserting EOLs. Options are recognized.
Keeps track of original line lengths for fixing parser error messages.
@param reader for the DSL file data
... | [
"Read",
"a",
"DSL",
"file",
"and",
"convert",
"it",
"to",
"a",
"String",
".",
"Comment",
"lines",
"are",
"removed",
".",
"Split",
"lines",
"are",
"joined",
"inserting",
"a",
"space",
"for",
"an",
"EOL",
"but",
"maintaining",
"the",
"original",
"number",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/dsl/DSLTokenizedMappingFile.java#L62-L107 |
14,226 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/model/Pattern52.java | Pattern52.clonePattern | public Pattern52 clonePattern() {
Pattern52 cloned = new Pattern52();
cloned.setBoundName( getBoundName() );
cloned.setChildColumns( new ArrayList<ConditionCol52>( getChildColumns() ) );
cloned.setEntryPointName( getEntryPointName() );
cloned.setFactType( getFactType() );
... | java | public Pattern52 clonePattern() {
Pattern52 cloned = new Pattern52();
cloned.setBoundName( getBoundName() );
cloned.setChildColumns( new ArrayList<ConditionCol52>( getChildColumns() ) );
cloned.setEntryPointName( getEntryPointName() );
cloned.setFactType( getFactType() );
... | [
"public",
"Pattern52",
"clonePattern",
"(",
")",
"{",
"Pattern52",
"cloned",
"=",
"new",
"Pattern52",
"(",
")",
";",
"cloned",
".",
"setBoundName",
"(",
"getBoundName",
"(",
")",
")",
";",
"cloned",
".",
"setChildColumns",
"(",
"new",
"ArrayList",
"<",
"Co... | Clones this pattern instance.
@return The cloned instance. | [
"Clones",
"this",
"pattern",
"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/Pattern52.java#L123-L132 |
14,227 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/shared/model/Pattern52.java | Pattern52.update | public void update( Pattern52 other ) {
setBoundName( other.getBoundName() );
setChildColumns( other.getChildColumns() );
setEntryPointName( other.getEntryPointName() );
setFactType( other.getFactType() );
setNegated( other.isNegated() );
setWindow( other.getWindow() );
... | java | public void update( Pattern52 other ) {
setBoundName( other.getBoundName() );
setChildColumns( other.getChildColumns() );
setEntryPointName( other.getEntryPointName() );
setFactType( other.getFactType() );
setNegated( other.isNegated() );
setWindow( other.getWindow() );
... | [
"public",
"void",
"update",
"(",
"Pattern52",
"other",
")",
"{",
"setBoundName",
"(",
"other",
".",
"getBoundName",
"(",
")",
")",
";",
"setChildColumns",
"(",
"other",
".",
"getChildColumns",
"(",
")",
")",
";",
"setEntryPointName",
"(",
"other",
".",
"ge... | Update this pattern instance properties with the given ones from other pattern instance.
@param other The pattern to obtain the properties to set. | [
"Update",
"this",
"pattern",
"instance",
"properties",
"with",
"the",
"given",
"ones",
"from",
"other",
"pattern",
"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/Pattern52.java#L138-L145 |
14,228 | kiegroup/drools | drools-workbench-models/drools-workbench-models-commons/src/main/java/org/drools/workbench/models/commons/backend/rule/context/GeneratorContextRuleModelVisitor.java | GeneratorContextRuleModelVisitor.visitActionFieldList | private void visitActionFieldList(final ActionInsertFact afl) {
String factType = afl.getFactType();
for (ActionFieldValue afv : afl.getFieldValues()) {
InterpolationVariable var = new InterpolationVariable(afv.getValue(),
afv... | java | private void visitActionFieldList(final ActionInsertFact afl) {
String factType = afl.getFactType();
for (ActionFieldValue afv : afl.getFieldValues()) {
InterpolationVariable var = new InterpolationVariable(afv.getValue(),
afv... | [
"private",
"void",
"visitActionFieldList",
"(",
"final",
"ActionInsertFact",
"afl",
")",
"{",
"String",
"factType",
"=",
"afl",
".",
"getFactType",
"(",
")",
";",
"for",
"(",
"ActionFieldValue",
"afv",
":",
"afl",
".",
"getFieldValues",
"(",
")",
")",
"{",
... | ActionInsertFact, ActionSetField, ActionpdateField | [
"ActionInsertFact",
"ActionSetField",
"ActionpdateField"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-commons/src/main/java/org/drools/workbench/models/commons/backend/rule/context/GeneratorContextRuleModelVisitor.java#L133-L146 |
14,229 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/PMML4Compiler.java | PMML4Compiler.loadModel | public PMML loadModel(String model, InputStream source) {
try {
if (schema == null) {
visitorBuildResults.add(new PMMLWarning(ResourceFactory.newInputStreamResource(source), "Could not validate PMML document, schema not available"));
}
final JAXBContext jc;
... | java | public PMML loadModel(String model, InputStream source) {
try {
if (schema == null) {
visitorBuildResults.add(new PMMLWarning(ResourceFactory.newInputStreamResource(source), "Could not validate PMML document, schema not available"));
}
final JAXBContext jc;
... | [
"public",
"PMML",
"loadModel",
"(",
"String",
"model",
",",
"InputStream",
"source",
")",
"{",
"try",
"{",
"if",
"(",
"schema",
"==",
"null",
")",
"{",
"visitorBuildResults",
".",
"add",
"(",
"new",
"PMMLWarning",
"(",
"ResourceFactory",
".",
"newInputStream... | Imports a PMML source file, returning a Java descriptor
@param model the PMML package name (classes derived from a specific schema)
@param source the name of the PMML resource storing the predictive model
@return the Java Descriptor of the PMML resource | [
"Imports",
"a",
"PMML",
"source",
"file",
"returning",
"a",
"Java",
"descriptor"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/PMML4Compiler.java#L750-L784 |
14,230 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java | AccumulateNode.createMemory | public Memory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
BetaMemory betaMemory = this.constraints.createBetaMemory(config,
NodeTypeEnums.AccumulateNode);
AccumulateMemory memory = this.accumulate.isMultiF... | java | public Memory createMemory(final RuleBaseConfiguration config, InternalWorkingMemory wm) {
BetaMemory betaMemory = this.constraints.createBetaMemory(config,
NodeTypeEnums.AccumulateNode);
AccumulateMemory memory = this.accumulate.isMultiF... | [
"public",
"Memory",
"createMemory",
"(",
"final",
"RuleBaseConfiguration",
"config",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"BetaMemory",
"betaMemory",
"=",
"this",
".",
"constraints",
".",
"createBetaMemory",
"(",
"config",
",",
"NodeTypeEnums",
".",
"Accumu... | Creates a BetaMemory for the BetaNode's memory. | [
"Creates",
"a",
"BetaMemory",
"for",
"the",
"BetaNode",
"s",
"memory",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/AccumulateNode.java#L230-L240 |
14,231 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/dsl/DefaultDSLMapping.java | DefaultDSLMapping.getEntries | public List<DSLMappingEntry> getEntries(final DSLMappingEntry.Section section) {
final List<DSLMappingEntry> list = new LinkedList<DSLMappingEntry>();
for ( final Iterator<DSLMappingEntry> it = this.entries.iterator(); it.hasNext(); ) {
final DSLMappingEntry entry = it.next();
if... | java | public List<DSLMappingEntry> getEntries(final DSLMappingEntry.Section section) {
final List<DSLMappingEntry> list = new LinkedList<DSLMappingEntry>();
for ( final Iterator<DSLMappingEntry> it = this.entries.iterator(); it.hasNext(); ) {
final DSLMappingEntry entry = it.next();
if... | [
"public",
"List",
"<",
"DSLMappingEntry",
">",
"getEntries",
"(",
"final",
"DSLMappingEntry",
".",
"Section",
"section",
")",
"{",
"final",
"List",
"<",
"DSLMappingEntry",
">",
"list",
"=",
"new",
"LinkedList",
"<",
"DSLMappingEntry",
">",
"(",
")",
";",
"fo... | Returns the list of mappings for the given section
@param section
@return | [
"Returns",
"the",
"list",
"of",
"mappings",
"for",
"the",
"given",
"section"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/dsl/DefaultDSLMapping.java#L78-L87 |
14,232 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/ReteooRuleBuilder.java | ReteooRuleBuilder.addInitialFactPattern | private void addInitialFactPattern( final GroupElement subrule ) {
// creates a pattern for initial fact
final Pattern pattern = new Pattern( 0,
ClassObjectType.InitialFact_ObjectType );
// adds the pattern as the first child of the given AND group ... | java | private void addInitialFactPattern( final GroupElement subrule ) {
// creates a pattern for initial fact
final Pattern pattern = new Pattern( 0,
ClassObjectType.InitialFact_ObjectType );
// adds the pattern as the first child of the given AND group ... | [
"private",
"void",
"addInitialFactPattern",
"(",
"final",
"GroupElement",
"subrule",
")",
"{",
"// creates a pattern for initial fact",
"final",
"Pattern",
"pattern",
"=",
"new",
"Pattern",
"(",
"0",
",",
"ClassObjectType",
".",
"InitialFact_ObjectType",
")",
";",
"//... | Adds a query pattern to the given subrule | [
"Adds",
"a",
"query",
"pattern",
"to",
"the",
"given",
"subrule"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/ReteooRuleBuilder.java#L226-L235 |
14,233 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildContext.java | BuildContext.push | public void push(final RuleConditionElement rce) {
if (this.buildstack == null) {
this.buildstack = new LinkedList<>();
}
this.buildstack.addLast(rce);
} | java | public void push(final RuleConditionElement rce) {
if (this.buildstack == null) {
this.buildstack = new LinkedList<>();
}
this.buildstack.addLast(rce);
} | [
"public",
"void",
"push",
"(",
"final",
"RuleConditionElement",
"rce",
")",
"{",
"if",
"(",
"this",
".",
"buildstack",
"==",
"null",
")",
"{",
"this",
".",
"buildstack",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"}",
"this",
".",
"buildstack",
"."... | Adds the rce to the build stack | [
"Adds",
"the",
"rce",
"to",
"the",
"build",
"stack"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildContext.java#L264-L269 |
14,234 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildContext.java | BuildContext.stackIterator | ListIterator<RuleConditionElement> stackIterator() {
if (this.buildstack == null) {
this.buildstack = new LinkedList<>();
}
return this.buildstack.listIterator(this.buildstack.size());
} | java | ListIterator<RuleConditionElement> stackIterator() {
if (this.buildstack == null) {
this.buildstack = new LinkedList<>();
}
return this.buildstack.listIterator(this.buildstack.size());
} | [
"ListIterator",
"<",
"RuleConditionElement",
">",
"stackIterator",
"(",
")",
"{",
"if",
"(",
"this",
".",
"buildstack",
"==",
"null",
")",
"{",
"this",
".",
"buildstack",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"}",
"return",
"this",
".",
"buildst... | Returns a list iterator to iterate over the stacked elements | [
"Returns",
"a",
"list",
"iterator",
"to",
"iterate",
"over",
"the",
"stacked",
"elements"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildContext.java#L294-L299 |
14,235 | kiegroup/drools | drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java | RuleDescrVisitor.visitConsequence | private Consequence visitConsequence(VerifierComponent parent,
Object o) {
TextConsequence consequence = new TextConsequence(rule);
String text = o.toString();
/*
* Strip all comments out of the code.
*/
StringBuffer buffer = ... | java | private Consequence visitConsequence(VerifierComponent parent,
Object o) {
TextConsequence consequence = new TextConsequence(rule);
String text = o.toString();
/*
* Strip all comments out of the code.
*/
StringBuffer buffer = ... | [
"private",
"Consequence",
"visitConsequence",
"(",
"VerifierComponent",
"parent",
",",
"Object",
"o",
")",
"{",
"TextConsequence",
"consequence",
"=",
"new",
"TextConsequence",
"(",
"rule",
")",
";",
"String",
"text",
"=",
"o",
".",
"toString",
"(",
")",
";",
... | Creates verifier object from rule consequence. Currently only supports
text based consequences.
@param o Consequence object.
@return Verifier object that implements the Consequence interface. | [
"Creates",
"verifier",
"object",
"from",
"rule",
"consequence",
".",
"Currently",
"only",
"supports",
"text",
"based",
"consequences",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java#L170-L211 |
14,236 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java | BinaryHeapQueue.enqueue | public void enqueue(final Activation element) {
if ( isFull() ) {
grow();
}
percolateUpMaxHeap( element );
element.setQueued(true);
if ( log.isTraceEnabled() ) {
log.trace( "Queue Added {} {}", element.getQueueIndex(), element);
}
} | java | public void enqueue(final Activation element) {
if ( isFull() ) {
grow();
}
percolateUpMaxHeap( element );
element.setQueued(true);
if ( log.isTraceEnabled() ) {
log.trace( "Queue Added {} {}", element.getQueueIndex(), element);
}
} | [
"public",
"void",
"enqueue",
"(",
"final",
"Activation",
"element",
")",
"{",
"if",
"(",
"isFull",
"(",
")",
")",
"{",
"grow",
"(",
")",
";",
"}",
"percolateUpMaxHeap",
"(",
"element",
")",
";",
"element",
".",
"setQueued",
"(",
"true",
")",
";",
"if... | Inserts an Queueable into queue.
@param element the Queueable to be inserted | [
"Inserts",
"an",
"Queueable",
"into",
"queue",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java#L154-L165 |
14,237 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java | BinaryHeapQueue.dequeue | public Activation dequeue() throws NoSuchElementException {
if ( isEmpty() ) {
return null;
}
final Activation result = this.elements[1];
dequeue(result.getQueueIndex());
return result;
} | java | public Activation dequeue() throws NoSuchElementException {
if ( isEmpty() ) {
return null;
}
final Activation result = this.elements[1];
dequeue(result.getQueueIndex());
return result;
} | [
"public",
"Activation",
"dequeue",
"(",
")",
"throws",
"NoSuchElementException",
"{",
"if",
"(",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Activation",
"result",
"=",
"this",
".",
"elements",
"[",
"1",
"]",
";",
"dequeue",
"(",... | Returns the Queueable on top of heap and remove it.
@return the Queueable at top of heap
@throws NoSuchElementException if <code>isEmpty() == true</code> | [
"Returns",
"the",
"Queueable",
"on",
"top",
"of",
"heap",
"and",
"remove",
"it",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java#L173-L182 |
14,238 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java | BinaryHeapQueue.grow | private void grow() {
final Activation[] elements = new Activation[this.elements.length * 2];
System.arraycopy( this.elements,
0,
elements,
0,
this.elements.length );
this.elements = elements;... | java | private void grow() {
final Activation[] elements = new Activation[this.elements.length * 2];
System.arraycopy( this.elements,
0,
elements,
0,
this.elements.length );
this.elements = elements;... | [
"private",
"void",
"grow",
"(",
")",
"{",
"final",
"Activation",
"[",
"]",
"elements",
"=",
"new",
"Activation",
"[",
"this",
".",
"elements",
".",
"length",
"*",
"2",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"elements",
",",
"0",
",",... | Increases the size of the heap to support additional elements | [
"Increases",
"the",
"size",
"of",
"the",
"heap",
"to",
"support",
"additional",
"elements"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/BinaryHeapQueue.java#L308-L316 |
14,239 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java | ReteooBuilder.removePath | private void removePath( Collection<InternalWorkingMemory> wms, RuleRemovalContext context, Map<Integer, BaseNode> stillInUse, Collection<ObjectSource> alphas, PathEndNode endNode ) {
LeftTupleNode[] nodes = endNode.getPathNodes();
for (int i = endNode.getPositionInPath(); i >= 0; i--) {
Bas... | java | private void removePath( Collection<InternalWorkingMemory> wms, RuleRemovalContext context, Map<Integer, BaseNode> stillInUse, Collection<ObjectSource> alphas, PathEndNode endNode ) {
LeftTupleNode[] nodes = endNode.getPathNodes();
for (int i = endNode.getPositionInPath(); i >= 0; i--) {
Bas... | [
"private",
"void",
"removePath",
"(",
"Collection",
"<",
"InternalWorkingMemory",
">",
"wms",
",",
"RuleRemovalContext",
"context",
",",
"Map",
"<",
"Integer",
",",
"BaseNode",
">",
"stillInUse",
",",
"Collection",
"<",
"ObjectSource",
">",
"alphas",
",",
"PathE... | Path's must be removed starting from the outer most path, iterating towards the inner most path.
Each time it reaches a subnetwork beta node, the current path evaluation ends, and instead the subnetwork
path continues. | [
"Path",
"s",
"must",
"be",
"removed",
"starting",
"from",
"the",
"outer",
"most",
"path",
"iterating",
"towards",
"the",
"inner",
"most",
"path",
".",
"Each",
"time",
"it",
"reaches",
"a",
"subnetwork",
"beta",
"node",
"the",
"current",
"path",
"evaluation",... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/ReteooBuilder.java#L218-L243 |
14,240 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java | BuildUtils.attachNode | public <T extends BaseNode> T attachNode(BuildContext context, T candidate) {
BaseNode node = null;
RuleBasePartitionId partition = null;
if ( candidate.getType() == NodeTypeEnums.EntryPointNode ) {
// entry point nodes are always shared
node = context.getKnowledgeBase().... | java | public <T extends BaseNode> T attachNode(BuildContext context, T candidate) {
BaseNode node = null;
RuleBasePartitionId partition = null;
if ( candidate.getType() == NodeTypeEnums.EntryPointNode ) {
// entry point nodes are always shared
node = context.getKnowledgeBase().... | [
"public",
"<",
"T",
"extends",
"BaseNode",
">",
"T",
"attachNode",
"(",
"BuildContext",
"context",
",",
"T",
"candidate",
")",
"{",
"BaseNode",
"node",
"=",
"null",
";",
"RuleBasePartitionId",
"partition",
"=",
"null",
";",
"if",
"(",
"candidate",
".",
"ge... | Attaches a node into the network. If a node already exists that could
substitute, it is used instead.
@param context
The current build context
@param candidate
The node to attach.
@return the actual attached node that may be the one given as parameter
or eventually one that was already in the cache if sharing is enab... | [
"Attaches",
"a",
"node",
"into",
"the",
"network",
".",
"If",
"a",
"node",
"already",
"exists",
"that",
"could",
"substitute",
"it",
"is",
"used",
"instead",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L96-L163 |
14,241 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java | BuildUtils.isSharingEnabledForNode | private boolean isSharingEnabledForNode(BuildContext context, BaseNode node) {
if ( NodeTypeEnums.isLeftTupleSource( node )) {
return context.getKnowledgeBase().getConfiguration().isShareBetaNodes();
} else if ( NodeTypeEnums.isObjectSource( node ) ) {
return context.getKnowledge... | java | private boolean isSharingEnabledForNode(BuildContext context, BaseNode node) {
if ( NodeTypeEnums.isLeftTupleSource( node )) {
return context.getKnowledgeBase().getConfiguration().isShareBetaNodes();
} else if ( NodeTypeEnums.isObjectSource( node ) ) {
return context.getKnowledge... | [
"private",
"boolean",
"isSharingEnabledForNode",
"(",
"BuildContext",
"context",
",",
"BaseNode",
"node",
")",
"{",
"if",
"(",
"NodeTypeEnums",
".",
"isLeftTupleSource",
"(",
"node",
")",
")",
"{",
"return",
"context",
".",
"getKnowledgeBase",
"(",
")",
".",
"... | Utility function to check if sharing is enabled for nodes of the given class | [
"Utility",
"function",
"to",
"check",
"if",
"sharing",
"is",
"enabled",
"for",
"nodes",
"of",
"the",
"given",
"class"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L185-L192 |
14,242 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java | BuildUtils.createBetaNodeConstraint | public BetaConstraints createBetaNodeConstraint(final BuildContext context,
final List<BetaNodeFieldConstraint> list,
final boolean disableIndexing) {
BetaConstraints constraints;
switch ( list.size()... | java | public BetaConstraints createBetaNodeConstraint(final BuildContext context,
final List<BetaNodeFieldConstraint> list,
final boolean disableIndexing) {
BetaConstraints constraints;
switch ( list.size()... | [
"public",
"BetaConstraints",
"createBetaNodeConstraint",
"(",
"final",
"BuildContext",
"context",
",",
"final",
"List",
"<",
"BetaNodeFieldConstraint",
">",
"list",
",",
"final",
"boolean",
"disableIndexing",
")",
"{",
"BetaConstraints",
"constraints",
";",
"switch",
... | Creates and returns a BetaConstraints object for the given list of constraints
@param context the current build context
@param list the list of constraints | [
"Creates",
"and",
"returns",
"a",
"BetaConstraints",
"object",
"for",
"the",
"given",
"list",
"of",
"constraints"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L213-L247 |
14,243 | kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java | BuildUtils.calculateTemporalDistance | public TemporalDependencyMatrix calculateTemporalDistance(GroupElement groupElement) {
// find the events
List<Pattern> events = new ArrayList<Pattern>();
selectAllEventPatterns( events,
groupElement );
final int size = events.size();
if ( size >=... | java | public TemporalDependencyMatrix calculateTemporalDistance(GroupElement groupElement) {
// find the events
List<Pattern> events = new ArrayList<Pattern>();
selectAllEventPatterns( events,
groupElement );
final int size = events.size();
if ( size >=... | [
"public",
"TemporalDependencyMatrix",
"calculateTemporalDistance",
"(",
"GroupElement",
"groupElement",
")",
"{",
"// find the events",
"List",
"<",
"Pattern",
">",
"events",
"=",
"new",
"ArrayList",
"<",
"Pattern",
">",
"(",
")",
";",
"selectAllEventPatterns",
"(",
... | Calculates the temporal distance between all event patterns in the given
subrule.
@param groupElement the root element of a subrule being added to the rulebase | [
"Calculates",
"the",
"temporal",
"distance",
"between",
"all",
"event",
"patterns",
"in",
"the",
"given",
"subrule",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L291-L343 |
14,244 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/asm/MethodComparator.java | MethodComparator.equivalent | public boolean equivalent(final String method1,
final ClassReader class1,
final String method2,
final ClassReader class2) {
return getMethodBytecode( method1, class1 ).equals( getMethodBytecode( method2, class2 ) );
} | java | public boolean equivalent(final String method1,
final ClassReader class1,
final String method2,
final ClassReader class2) {
return getMethodBytecode( method1, class1 ).equals( getMethodBytecode( method2, class2 ) );
} | [
"public",
"boolean",
"equivalent",
"(",
"final",
"String",
"method1",
",",
"final",
"ClassReader",
"class1",
",",
"final",
"String",
"method2",
",",
"final",
"ClassReader",
"class2",
")",
"{",
"return",
"getMethodBytecode",
"(",
"method1",
",",
"class1",
")",
... | This actually does the comparing.
Class1 and Class2 are class reader instances to the respective classes. method1 and method2 are looked up on the
respective classes and their contents compared.
This is a convenience method. | [
"This",
"actually",
"does",
"the",
"comparing",
".",
"Class1",
"and",
"Class2",
"are",
"class",
"reader",
"instances",
"to",
"the",
"respective",
"classes",
".",
"method1",
"and",
"method2",
"are",
"looked",
"up",
"on",
"the",
"respective",
"classes",
"and",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/asm/MethodComparator.java#L40-L45 |
14,245 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/asm/MethodComparator.java | MethodComparator.getMethodBytecode | public String getMethodBytecode(final String methodName,
final ClassReader classReader) {
final Tracer visit = new Tracer( methodName );
classReader.accept( visit, ClassReader.SKIP_DEBUG );
return visit.getText();
} | java | public String getMethodBytecode(final String methodName,
final ClassReader classReader) {
final Tracer visit = new Tracer( methodName );
classReader.accept( visit, ClassReader.SKIP_DEBUG );
return visit.getText();
} | [
"public",
"String",
"getMethodBytecode",
"(",
"final",
"String",
"methodName",
",",
"final",
"ClassReader",
"classReader",
")",
"{",
"final",
"Tracer",
"visit",
"=",
"new",
"Tracer",
"(",
"methodName",
")",
";",
"classReader",
".",
"accept",
"(",
"visit",
",",... | This will return a series of bytecode instructions which can be used to compare one method with another.
debug info like local var declarations and line numbers are ignored, so the focus is on the content. | [
"This",
"will",
"return",
"a",
"series",
"of",
"bytecode",
"instructions",
"which",
"can",
"be",
"used",
"to",
"compare",
"one",
"method",
"with",
"another",
".",
"debug",
"info",
"like",
"local",
"var",
"declarations",
"and",
"line",
"numbers",
"are",
"igno... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/asm/MethodComparator.java#L51-L56 |
14,246 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/Shape.java | Shape.setBounds | public void setBounds(org.kie.dmn.model.api.dmndi.Bounds value) {
this.bounds = value;
} | java | public void setBounds(org.kie.dmn.model.api.dmndi.Bounds value) {
this.bounds = value;
} | [
"public",
"void",
"setBounds",
"(",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"Bounds",
"value",
")",
"{",
"this",
".",
"bounds",
"=",
"value",
";",
"}"
] | Sets the value of the bounds property.
@param value
allowed object is
{@link Bounds } | [
"Sets",
"the",
"value",
"of",
"the",
"bounds",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/Shape.java#L43-L45 |
14,247 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java | DroolsStreamUtils.streamOut | public static byte[] streamOut(Object object, boolean compressed) throws IOException {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
streamOut(bytes, object, compressed);
bytes.flush();
bytes.close();
return bytes.toByteArray();
} | java | public static byte[] streamOut(Object object, boolean compressed) throws IOException {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
streamOut(bytes, object, compressed);
bytes.flush();
bytes.close();
return bytes.toByteArray();
} | [
"public",
"static",
"byte",
"[",
"]",
"streamOut",
"(",
"Object",
"object",
",",
"boolean",
"compressed",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bytes",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"streamOut",
"(",
"bytes",
",",
"... | This routine would stream out the give object, uncompressed or compressed depending on the given flag,
and store the streamed contents in the return byte array. The output contents could only be read by
the corresponding "streamIn" method of this class.
@param object
@param compressed
@return
@throws IOException | [
"This",
"routine",
"would",
"stream",
"out",
"the",
"give",
"object",
"uncompressed",
"or",
"compressed",
"depending",
"on",
"the",
"given",
"flag",
"and",
"store",
"the",
"streamed",
"contents",
"in",
"the",
"return",
"byte",
"array",
".",
"The",
"output",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L60-L67 |
14,248 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java | DroolsStreamUtils.streamOut | public static void streamOut(OutputStream out, Object object) throws IOException {
streamOut(out, object, false);
} | java | public static void streamOut(OutputStream out, Object object) throws IOException {
streamOut(out, object, false);
} | [
"public",
"static",
"void",
"streamOut",
"(",
"OutputStream",
"out",
",",
"Object",
"object",
")",
"throws",
"IOException",
"{",
"streamOut",
"(",
"out",
",",
"object",
",",
"false",
")",
";",
"}"
] | This method would stream out the given object to the given output stream uncompressed.
The output contents could only be read by the corresponding "streamIn" method of this class.
@param out
@param object
@throws IOException | [
"This",
"method",
"would",
"stream",
"out",
"the",
"given",
"object",
"to",
"the",
"given",
"output",
"stream",
"uncompressed",
".",
"The",
"output",
"contents",
"could",
"only",
"be",
"read",
"by",
"the",
"corresponding",
"streamIn",
"method",
"of",
"this",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L76-L78 |
14,249 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java | DroolsStreamUtils.streamOut | public static void streamOut(OutputStream out, Object object, boolean compressed) throws IOException {
if (compressed) {
out = new GZIPOutputStream(out);
}
DroolsObjectOutputStream doos = null;
try {
doos = new DroolsObjectOutputStream(out);
doos.write... | java | public static void streamOut(OutputStream out, Object object, boolean compressed) throws IOException {
if (compressed) {
out = new GZIPOutputStream(out);
}
DroolsObjectOutputStream doos = null;
try {
doos = new DroolsObjectOutputStream(out);
doos.write... | [
"public",
"static",
"void",
"streamOut",
"(",
"OutputStream",
"out",
",",
"Object",
"object",
",",
"boolean",
"compressed",
")",
"throws",
"IOException",
"{",
"if",
"(",
"compressed",
")",
"{",
"out",
"=",
"new",
"GZIPOutputStream",
"(",
"out",
")",
";",
"... | This method would stream out the given object to the given output stream uncompressed or compressed
depending on the given flag. The output contents could only be read by the corresponding "streamIn"
methods of this class.
@param out
@param object
@throws IOException | [
"This",
"method",
"would",
"stream",
"out",
"the",
"given",
"object",
"to",
"the",
"given",
"output",
"stream",
"uncompressed",
"or",
"compressed",
"depending",
"on",
"the",
"given",
"flag",
".",
"The",
"output",
"contents",
"could",
"only",
"be",
"read",
"b... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L88-L104 |
14,250 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java | DroolsStreamUtils.streamIn | public static Object streamIn(byte[] bytes, ClassLoader classLoader)
throws IOException, ClassNotFoundException {
return streamIn(bytes, classLoader, false);
} | java | public static Object streamIn(byte[] bytes, ClassLoader classLoader)
throws IOException, ClassNotFoundException {
return streamIn(bytes, classLoader, false);
} | [
"public",
"static",
"Object",
"streamIn",
"(",
"byte",
"[",
"]",
"bytes",
",",
"ClassLoader",
"classLoader",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"return",
"streamIn",
"(",
"bytes",
",",
"classLoader",
",",
"false",
")",
";",
"}"
] | This method reads the contents from the given byte array and returns the object. It is expected that
the contents in the given buffer was not compressed, and the content stream was written by the corresponding
streamOut methods of this class.
@param bytes
@param classLoader
@return
@throws IOException
@throws ClassNot... | [
"This",
"method",
"reads",
"the",
"contents",
"from",
"the",
"given",
"byte",
"array",
"and",
"returns",
"the",
"object",
".",
"It",
"is",
"expected",
"that",
"the",
"contents",
"in",
"the",
"given",
"buffer",
"was",
"not",
"compressed",
"and",
"the",
"con... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L129-L132 |
14,251 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java | DroolsStreamUtils.streamIn | public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed)
throws IOException, ClassNotFoundException {
if (compressed)
in = new GZIPInputStream(in);
return new DroolsObjectInputStream(in, classLoader).readObject();
} | java | public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed)
throws IOException, ClassNotFoundException {
if (compressed)
in = new GZIPInputStream(in);
return new DroolsObjectInputStream(in, classLoader).readObject();
} | [
"public",
"static",
"Object",
"streamIn",
"(",
"InputStream",
"in",
",",
"ClassLoader",
"classLoader",
",",
"boolean",
"compressed",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"if",
"(",
"compressed",
")",
"in",
"=",
"new",
"GZIPInputStream"... | This method reads the contents from the given input stream and returns the object. The contents in the given
stream could be compressed or uncompressed depending on the given flag. It is assumed that the content
stream was written by the corresponding streamOut methods of this class.
@param in
@return
@throws IOExcep... | [
"This",
"method",
"reads",
"the",
"contents",
"from",
"the",
"given",
"input",
"stream",
"and",
"returns",
"the",
"object",
".",
"The",
"contents",
"in",
"the",
"given",
"stream",
"could",
"be",
"compressed",
"or",
"uncompressed",
"depending",
"on",
"the",
"... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L201-L206 |
14,252 | kiegroup/drools | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNModelImpl.java | DMNModelImpl.nameInCurrentModel | public String nameInCurrentModel(DMNNode node) {
if (node.getModelNamespace().equals(this.getNamespace())) {
return node.getName();
} else {
Optional<String> lookupAlias = getImportAliasFor(node.getModelNamespace(), node.getModelName());
if (lookupAlias.isPresent()) {... | java | public String nameInCurrentModel(DMNNode node) {
if (node.getModelNamespace().equals(this.getNamespace())) {
return node.getName();
} else {
Optional<String> lookupAlias = getImportAliasFor(node.getModelNamespace(), node.getModelName());
if (lookupAlias.isPresent()) {... | [
"public",
"String",
"nameInCurrentModel",
"(",
"DMNNode",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getModelNamespace",
"(",
")",
".",
"equals",
"(",
"this",
".",
"getNamespace",
"(",
")",
")",
")",
"{",
"return",
"node",
".",
"getName",
"(",
")",
";"... | Given a DMNNode, compute the proper name of the node, considering DMN-Imports.
For DMNNode in this current model, name is simply the name of the model.
For imported DMNNodes, this is the name with the prefix of the direct-dependency of the import `name`.
For transitively-imported DMNNodes, it is always null. | [
"Given",
"a",
"DMNNode",
"compute",
"the",
"proper",
"name",
"of",
"the",
"node",
"considering",
"DMN",
"-",
"Imports",
".",
"For",
"DMNNode",
"in",
"this",
"current",
"model",
"name",
"is",
"simply",
"the",
"name",
"of",
"the",
"model",
".",
"For",
"imp... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/impl/DMNModelImpl.java#L144-L155 |
14,253 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java | DrlParser.parse | public PackageDescr parse(final Resource resource, final String text) throws DroolsParserException {
this.resource = resource;
return parse(false, text);
} | java | public PackageDescr parse(final Resource resource, final String text) throws DroolsParserException {
this.resource = resource;
return parse(false, text);
} | [
"public",
"PackageDescr",
"parse",
"(",
"final",
"Resource",
"resource",
",",
"final",
"String",
"text",
")",
"throws",
"DroolsParserException",
"{",
"this",
".",
"resource",
"=",
"resource",
";",
"return",
"parse",
"(",
"false",
",",
"text",
")",
";",
"}"
] | Parse a rule from text | [
"Parse",
"a",
"rule",
"from",
"text"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java#L67-L70 |
14,254 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java | DrlParser.getExpandedDRL | public String getExpandedDRL(final String source,
final Reader dsl) throws DroolsParserException {
DefaultExpanderResolver resolver = getDefaultResolver(dsl);
return getExpandedDRL(source,
resolver);
} | java | public String getExpandedDRL(final String source,
final Reader dsl) throws DroolsParserException {
DefaultExpanderResolver resolver = getDefaultResolver(dsl);
return getExpandedDRL(source,
resolver);
} | [
"public",
"String",
"getExpandedDRL",
"(",
"final",
"String",
"source",
",",
"final",
"Reader",
"dsl",
")",
"throws",
"DroolsParserException",
"{",
"DefaultExpanderResolver",
"resolver",
"=",
"getDefaultResolver",
"(",
"dsl",
")",
";",
"return",
"getExpandedDRL",
"(... | This will expand the DRL. useful for debugging.
@param source -
the source which use a DSL
@param dsl -
the DSL itself.
@throws DroolsParserException
If unable to expand in any way. | [
"This",
"will",
"expand",
"the",
"DRL",
".",
"useful",
"for",
"debugging",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java#L178-L183 |
14,255 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java | DrlParser.getExpandedDRL | public String getExpandedDRL(final String source,
final DefaultExpanderResolver resolver) throws DroolsParserException {
final Expander expander = resolver.get("*",
null);
final String expanded = expander.expand( source );
if ( expander.hasErrors... | java | public String getExpandedDRL(final String source,
final DefaultExpanderResolver resolver) throws DroolsParserException {
final Expander expander = resolver.get("*",
null);
final String expanded = expander.expand( source );
if ( expander.hasErrors... | [
"public",
"String",
"getExpandedDRL",
"(",
"final",
"String",
"source",
",",
"final",
"DefaultExpanderResolver",
"resolver",
")",
"throws",
"DroolsParserException",
"{",
"final",
"Expander",
"expander",
"=",
"resolver",
".",
"get",
"(",
"\"*\"",
",",
"null",
")",
... | This will expand the DRL using the given expander resolver. useful for
debugging.
@param source -
the source which use a DSL
@param resolver -
the DSL expander resolver itself.
@throws DroolsParserException
If unable to expand in any way. | [
"This",
"will",
"expand",
"the",
"DRL",
"using",
"the",
"given",
"expander",
"resolver",
".",
"useful",
"for",
"debugging",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java#L196-L211 |
14,256 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java | DrlParser.makeErrorList | private void makeErrorList( final DRLParser parser ) {
for ( final DroolsParserException recogErr : lexer.getErrors() ) {
final ParserError err = new ParserError( resource,
recogErr.getMessage(),
... | java | private void makeErrorList( final DRLParser parser ) {
for ( final DroolsParserException recogErr : lexer.getErrors() ) {
final ParserError err = new ParserError( resource,
recogErr.getMessage(),
... | [
"private",
"void",
"makeErrorList",
"(",
"final",
"DRLParser",
"parser",
")",
"{",
"for",
"(",
"final",
"DroolsParserException",
"recogErr",
":",
"lexer",
".",
"getErrors",
"(",
")",
")",
"{",
"final",
"ParserError",
"err",
"=",
"new",
"ParserError",
"(",
"r... | Convert the antlr exceptions to drools parser exceptions | [
"Convert",
"the",
"antlr",
"exceptions",
"to",
"drools",
"parser",
"exceptions"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/compiler/DrlParser.java#L273-L288 |
14,257 | kiegroup/drools | drools-examples/src/main/java/org/drools/examples/sudoku/Sudoku.java | Sudoku.dumpGrid | public void dumpGrid() {
StringBuilder dumpGridSb = new StringBuilder();
Formatter fmt = new Formatter(dumpGridSb);
fmt.format(" ");
for (int iCol = 0; iCol < 9; iCol++) {
fmt.format("Col: %d ", iCol);
}
fmt.format("\n");
for (int iRow = 0; i... | java | public void dumpGrid() {
StringBuilder dumpGridSb = new StringBuilder();
Formatter fmt = new Formatter(dumpGridSb);
fmt.format(" ");
for (int iCol = 0; iCol < 9; iCol++) {
fmt.format("Col: %d ", iCol);
}
fmt.format("\n");
for (int iRow = 0; i... | [
"public",
"void",
"dumpGrid",
"(",
")",
"{",
"StringBuilder",
"dumpGridSb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Formatter",
"fmt",
"=",
"new",
"Formatter",
"(",
"dumpGridSb",
")",
";",
"fmt",
".",
"format",
"(",
"\" \"",
")",
";",
"for",
"... | Nice printout of the grid. | [
"Nice",
"printout",
"of",
"the",
"grid",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-examples/src/main/java/org/drools/examples/sudoku/Sudoku.java#L74-L104 |
14,258 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtree/src/main/java/org/drools/workbench/models/guided/dtree/backend/GuidedDecisionTreeModelMarshallingVisitor.java | GuidedDecisionTreeModelMarshallingVisitor.getDataType | private String getDataType(final Value value) {
if (value instanceof BigDecimalValue) {
return DataType.TYPE_NUMERIC_BIGDECIMAL;
} else if (value instanceof BigIntegerValue) {
return DataType.TYPE_NUMERIC_BIGINTEGER;
} else if (value instanceof BooleanValue) {
... | java | private String getDataType(final Value value) {
if (value instanceof BigDecimalValue) {
return DataType.TYPE_NUMERIC_BIGDECIMAL;
} else if (value instanceof BigIntegerValue) {
return DataType.TYPE_NUMERIC_BIGINTEGER;
} else if (value instanceof BooleanValue) {
... | [
"private",
"String",
"getDataType",
"(",
"final",
"Value",
"value",
")",
"{",
"if",
"(",
"value",
"instanceof",
"BigDecimalValue",
")",
"{",
"return",
"DataType",
".",
"TYPE_NUMERIC_BIGDECIMAL",
";",
"}",
"else",
"if",
"(",
"value",
"instanceof",
"BigIntegerValu... | Convert a typed Value into legacy DataType | [
"Convert",
"a",
"typed",
"Value",
"into",
"legacy",
"DataType"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-guided-dtree/src/main/java/org/drools/workbench/models/guided/dtree/backend/GuidedDecisionTreeModelMarshallingVisitor.java#L390-L416 |
14,259 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.packageStatement | public String packageStatement( PackageDescrBuilder pkg ) throws RecognitionException {
String pkgName = null;
try {
helper.start( pkg,
PackageDescrBuilder.class,
null );
match( input,
DRL5Lexer.ID,
... | java | public String packageStatement( PackageDescrBuilder pkg ) throws RecognitionException {
String pkgName = null;
try {
helper.start( pkg,
PackageDescrBuilder.class,
null );
match( input,
DRL5Lexer.ID,
... | [
"public",
"String",
"packageStatement",
"(",
"PackageDescrBuilder",
"pkg",
")",
"throws",
"RecognitionException",
"{",
"String",
"pkgName",
"=",
"null",
";",
"try",
"{",
"helper",
".",
"start",
"(",
"pkg",
",",
"PackageDescrBuilder",
".",
"class",
",",
"null",
... | Parses a package statement and returns the name of the package
or null if none is defined.
packageStatement := PACKAGE qualifiedIdentifier SEMICOLON?
@return the name of the package or null if none is defined | [
"Parses",
"a",
"package",
"statement",
"and",
"returns",
"the",
"name",
"of",
"the",
"package",
"or",
"null",
"if",
"none",
"is",
"defined",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L154-L192 |
14,260 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.speculateFullAnnotation | private boolean speculateFullAnnotation() {
state.backtracking++;
int start = input.mark();
try {
exprParser.fullAnnotation( null );
} catch ( RecognitionException re ) {
System.err.println( "impossible: " + re );
re.printStackTrace();
}
... | java | private boolean speculateFullAnnotation() {
state.backtracking++;
int start = input.mark();
try {
exprParser.fullAnnotation( null );
} catch ( RecognitionException re ) {
System.err.println( "impossible: " + re );
re.printStackTrace();
}
... | [
"private",
"boolean",
"speculateFullAnnotation",
"(",
")",
"{",
"state",
".",
"backtracking",
"++",
";",
"int",
"start",
"=",
"input",
".",
"mark",
"(",
")",
";",
"try",
"{",
"exprParser",
".",
"fullAnnotation",
"(",
"null",
")",
";",
"}",
"catch",
"(",
... | Invokes the expression parser, trying to parse the annotation
as a full java-style annotation
@return true if the sequence of tokens will match the
elementValuePairs() syntax. false otherwise. | [
"Invokes",
"the",
"expression",
"parser",
"trying",
"to",
"parse",
"the",
"annotation",
"as",
"a",
"full",
"java",
"-",
"style",
"annotation"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L4082-L4097 |
14,261 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.type | public String type() throws RecognitionException {
String type = "";
try {
int first = input.index(), last = first;
match( input,
DRL5Lexer.ID,
null,
new int[]{DRL5Lexer.DOT, DRL5Lexer.LESS},
DroolsEditor... | java | public String type() throws RecognitionException {
String type = "";
try {
int first = input.index(), last = first;
match( input,
DRL5Lexer.ID,
null,
new int[]{DRL5Lexer.DOT, DRL5Lexer.LESS},
DroolsEditor... | [
"public",
"String",
"type",
"(",
")",
"throws",
"RecognitionException",
"{",
"String",
"type",
"=",
"\"\"",
";",
"try",
"{",
"int",
"first",
"=",
"input",
".",
"index",
"(",
")",
",",
"last",
"=",
"first",
";",
"match",
"(",
"input",
",",
"DRL5Lexer",
... | Matches a type name
type := ID typeArguments? ( DOT ID typeArguments? )* (LEFT_SQUARE RIGHT_SQUARE)*
@return
@throws RecognitionException | [
"Matches",
"a",
"type",
"name"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L4112-L4171 |
14,262 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.typeArguments | public String typeArguments() throws RecognitionException {
String typeArguments = "";
try {
int first = input.index();
Token token = match( input,
DRL5Lexer.LESS,
null,
new int[]{D... | java | public String typeArguments() throws RecognitionException {
String typeArguments = "";
try {
int first = input.index();
Token token = match( input,
DRL5Lexer.LESS,
null,
new int[]{D... | [
"public",
"String",
"typeArguments",
"(",
")",
"throws",
"RecognitionException",
"{",
"String",
"typeArguments",
"=",
"\"\"",
";",
"try",
"{",
"int",
"first",
"=",
"input",
".",
"index",
"(",
")",
";",
"Token",
"token",
"=",
"match",
"(",
"input",
",",
"... | Matches type arguments
typeArguments := LESS typeArgument (COMMA typeArgument)* GREATER
@return
@throws RecognitionException | [
"Matches",
"type",
"arguments"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L4181-L4220 |
14,263 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.conditionalExpression | public String conditionalExpression() throws RecognitionException {
int first = input.index();
exprParser.conditionalExpression();
if ( state.failed ) return null;
if ( state.backtracking == 0 && input.index() > first ) {
// expression consumed something
String e... | java | public String conditionalExpression() throws RecognitionException {
int first = input.index();
exprParser.conditionalExpression();
if ( state.failed ) return null;
if ( state.backtracking == 0 && input.index() > first ) {
// expression consumed something
String e... | [
"public",
"String",
"conditionalExpression",
"(",
")",
"throws",
"RecognitionException",
"{",
"int",
"first",
"=",
"input",
".",
"index",
"(",
")",
";",
"exprParser",
".",
"conditionalExpression",
"(",
")",
";",
"if",
"(",
"state",
".",
"failed",
")",
"retur... | Matches a conditional expression
@return
@throws RecognitionException | [
"Matches",
"a",
"conditional",
"expression"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L4332-L4344 |
14,264 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java | DRL5Parser.recoverFromMismatchedToken | protected Token recoverFromMismatchedToken( TokenStream input,
int ttype,
String text,
int[] follow )
throws Recog... | java | protected Token recoverFromMismatchedToken( TokenStream input,
int ttype,
String text,
int[] follow )
throws Recog... | [
"protected",
"Token",
"recoverFromMismatchedToken",
"(",
"TokenStream",
"input",
",",
"int",
"ttype",
",",
"String",
"text",
",",
"int",
"[",
"]",
"follow",
")",
"throws",
"RecognitionException",
"{",
"RecognitionException",
"e",
"=",
"null",
";",
"// if next toke... | Attempt to recover from a single missing or extra token.
EXTRA TOKEN
LA(1) is not what we are looking for. If LA(2) has the right token,
however, then assume LA(1) is some extra spurious token. Delete it
and LA(2) as if we were doing a normal match(), which advances the
input.
MISSING TOKEN
If current token is co... | [
"Attempt",
"to",
"recover",
"from",
"a",
"single",
"missing",
"or",
"extra",
"token",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Parser.java#L4490-L4528 |
14,265 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/commons/jci/compilers/JavaCompilerFactory.java | JavaCompilerFactory.createCompiler | public JavaCompiler createCompiler(final String pHint) {
final String className;
if (pHint.indexOf('.') < 0) {
className = "org.drools.compiler.commons.jci.compilers." + ClassUtils.toJavaCasing(pHint) + "JavaCompiler";
} else {
className = pHint;
}
... | java | public JavaCompiler createCompiler(final String pHint) {
final String className;
if (pHint.indexOf('.') < 0) {
className = "org.drools.compiler.commons.jci.compilers." + ClassUtils.toJavaCasing(pHint) + "JavaCompiler";
} else {
className = pHint;
}
... | [
"public",
"JavaCompiler",
"createCompiler",
"(",
"final",
"String",
"pHint",
")",
"{",
"final",
"String",
"className",
";",
"if",
"(",
"pHint",
".",
"indexOf",
"(",
"'",
"'",
")",
"<",
"0",
")",
"{",
"className",
"=",
"\"org.drools.compiler.commons.jci.compile... | Tries to guess the class name by convention. So for compilers
following the naming convention
org.apache.commons.jci.compilers.SomeJavaCompiler
you can use the short-hands "some"/"Some"/"SOME". Otherwise
you have to provide the full class name. The compiler is
getting instanciated via (cached) reflection.
@param pHi... | [
"Tries",
"to",
"guess",
"the",
"class",
"name",
"by",
"convention",
".",
"So",
"for",
"compilers",
"following",
"the",
"naming",
"convention"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/commons/jci/compilers/JavaCompilerFactory.java#L62-L91 |
14,266 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDTDRLOtherwiseHelper.java | GuidedDTDRLOtherwiseHelper.getBuilder | public static OtherwiseBuilder getBuilder( ConditionCol52 c ) {
if ( c.getOperator().equals( "==" ) ) {
return new EqualsOtherwiseBuilder();
} else if ( c.getOperator().equals( "!=" ) ) {
return new NotEqualsOtherwiseBuilder();
}
throw new IllegalArgumentExceptio... | java | public static OtherwiseBuilder getBuilder( ConditionCol52 c ) {
if ( c.getOperator().equals( "==" ) ) {
return new EqualsOtherwiseBuilder();
} else if ( c.getOperator().equals( "!=" ) ) {
return new NotEqualsOtherwiseBuilder();
}
throw new IllegalArgumentExceptio... | [
"public",
"static",
"OtherwiseBuilder",
"getBuilder",
"(",
"ConditionCol52",
"c",
")",
"{",
"if",
"(",
"c",
".",
"getOperator",
"(",
")",
".",
"equals",
"(",
"\"==\"",
")",
")",
"{",
"return",
"new",
"EqualsOtherwiseBuilder",
"(",
")",
";",
"}",
"else",
... | Retrieve the correct OtherwiseBuilder for the given column
@param c
@return | [
"Retrieve",
"the",
"correct",
"OtherwiseBuilder",
"for",
"the",
"given",
"column"
] | 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/GuidedDTDRLOtherwiseHelper.java#L181-L189 |
14,267 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/GuidedDTDRLOtherwiseHelper.java | GuidedDTDRLOtherwiseHelper.extractColumnData | private static List<DTCellValue52> extractColumnData( List<List<DTCellValue52>> data,
int columnIndex ) {
List<DTCellValue52> columnData = new ArrayList<DTCellValue52>();
for ( List<DTCellValue52> row : data ) {
columnData.add( row.ge... | java | private static List<DTCellValue52> extractColumnData( List<List<DTCellValue52>> data,
int columnIndex ) {
List<DTCellValue52> columnData = new ArrayList<DTCellValue52>();
for ( List<DTCellValue52> row : data ) {
columnData.add( row.ge... | [
"private",
"static",
"List",
"<",
"DTCellValue52",
">",
"extractColumnData",
"(",
"List",
"<",
"List",
"<",
"DTCellValue52",
">",
">",
"data",
",",
"int",
"columnIndex",
")",
"{",
"List",
"<",
"DTCellValue52",
">",
"columnData",
"=",
"new",
"ArrayList",
"<",... | Extract data relating to a single column | [
"Extract",
"data",
"relating",
"to",
"a",
"single",
"column"
] | 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/GuidedDTDRLOtherwiseHelper.java#L192-L199 |
14,268 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/asm/ClassFieldInspector.java | ClassFieldInspector.processClassWithByteCode | private void processClassWithByteCode( final Class< ? > clazz,
final InputStream stream,
final boolean includeFinalMethods ) throws IOException {
final ClassReader reader = new ClassReader( stream );
final ClassFieldV... | java | private void processClassWithByteCode( final Class< ? > clazz,
final InputStream stream,
final boolean includeFinalMethods ) throws IOException {
final ClassReader reader = new ClassReader( stream );
final ClassFieldV... | [
"private",
"void",
"processClassWithByteCode",
"(",
"final",
"Class",
"<",
"?",
">",
"clazz",
",",
"final",
"InputStream",
"stream",
",",
"final",
"boolean",
"includeFinalMethods",
")",
"throws",
"IOException",
"{",
"final",
"ClassReader",
"reader",
"=",
"new",
... | Walk up the inheritance hierarchy recursively, reading in fields | [
"Walk",
"up",
"the",
"inheritance",
"hierarchy",
"recursively",
"reading",
"in",
"fields"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/asm/ClassFieldInspector.java#L99-L144 |
14,269 | kiegroup/drools | drools-core/src/main/java/org/drools/core/factmodel/ClassDefinition.java | ClassDefinition.getField | public FieldDefinition getField(int index) {
if (index >= fields.size() || index < 0) {
return null;
}
Iterator<FieldDefinition> iter = fields.values().iterator();
for (int j = 0; j < index ; j++) {
iter.next();
}
return iter.next();
} | java | public FieldDefinition getField(int index) {
if (index >= fields.size() || index < 0) {
return null;
}
Iterator<FieldDefinition> iter = fields.values().iterator();
for (int j = 0; j < index ; j++) {
iter.next();
}
return iter.next();
} | [
"public",
"FieldDefinition",
"getField",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
">=",
"fields",
".",
"size",
"(",
")",
"||",
"index",
"<",
"0",
")",
"{",
"return",
"null",
";",
"}",
"Iterator",
"<",
"FieldDefinition",
">",
"iter",
"=",
"f... | Returns the field at position index, as defined by the builder using the @position annotation
@param index
@return the index-th field | [
"Returns",
"the",
"field",
"at",
"position",
"index",
"as",
"defined",
"by",
"the",
"builder",
"using",
"the"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/factmodel/ClassDefinition.java#L189-L198 |
14,270 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java | PMML4UnitImpl.initDataDictionaryMap | private void initDataDictionaryMap() {
DataDictionary dd = rawPmml.getDataDictionary();
if (dd != null) {
dataDictionaryMap = new HashMap<>();
for (DataField dataField : dd.getDataFields()) {
PMMLDataField df = new PMMLDataField(dataField);
dataDic... | java | private void initDataDictionaryMap() {
DataDictionary dd = rawPmml.getDataDictionary();
if (dd != null) {
dataDictionaryMap = new HashMap<>();
for (DataField dataField : dd.getDataFields()) {
PMMLDataField df = new PMMLDataField(dataField);
dataDic... | [
"private",
"void",
"initDataDictionaryMap",
"(",
")",
"{",
"DataDictionary",
"dd",
"=",
"rawPmml",
".",
"getDataDictionary",
"(",
")",
";",
"if",
"(",
"dd",
"!=",
"null",
")",
"{",
"dataDictionaryMap",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"... | Initializes the internal structure that holds data dictionary information.
This initializer should be called prior to any other initializers, since
many other structures may have a dependency on the data dictionary. | [
"Initializes",
"the",
"internal",
"structure",
"that",
"holds",
"data",
"dictionary",
"information",
".",
"This",
"initializer",
"should",
"be",
"called",
"prior",
"to",
"any",
"other",
"initializers",
"since",
"many",
"other",
"structures",
"may",
"have",
"a",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java#L84-L95 |
14,271 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java | PMML4UnitImpl.getMiningFieldsForModel | public List<MiningField> getMiningFieldsForModel(String modelId) {
PMML4Model model = modelsMap.get(modelId);
if (model != null) {
return model.getRawMiningFields();
}
return null;
} | java | public List<MiningField> getMiningFieldsForModel(String modelId) {
PMML4Model model = modelsMap.get(modelId);
if (model != null) {
return model.getRawMiningFields();
}
return null;
} | [
"public",
"List",
"<",
"MiningField",
">",
"getMiningFieldsForModel",
"(",
"String",
"modelId",
")",
"{",
"PMML4Model",
"model",
"=",
"modelsMap",
".",
"get",
"(",
"modelId",
")",
";",
"if",
"(",
"model",
"!=",
"null",
")",
"{",
"return",
"model",
".",
"... | Retrieves a List of the raw MiningField objects for a
given model
@param modelId The identifier of the model for which the list of MiningField objects is retrieved
@return The list of MiningField objects belonging to the identified model | [
"Retrieves",
"a",
"List",
"of",
"the",
"raw",
"MiningField",
"objects",
"for",
"a",
"given",
"model"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java#L140-L146 |
14,272 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java | PMML4UnitImpl.getMiningFields | public Map<String, List<MiningField>> getMiningFields() {
Map<String, List<MiningField>> miningFieldsMap = new HashMap<>();
for (PMML4Model model : getModels()) {
List<MiningField> miningFields = model.getRawMiningFields();
miningFieldsMap.put(model.getModelId(), miningFields);
... | java | public Map<String, List<MiningField>> getMiningFields() {
Map<String, List<MiningField>> miningFieldsMap = new HashMap<>();
for (PMML4Model model : getModels()) {
List<MiningField> miningFields = model.getRawMiningFields();
miningFieldsMap.put(model.getModelId(), miningFields);
... | [
"public",
"Map",
"<",
"String",
",",
"List",
"<",
"MiningField",
">",
">",
"getMiningFields",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"MiningField",
">",
">",
"miningFieldsMap",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"... | Retrieves a Map with entries that consist of
key -> a model identifier
value -> the List of raw MiningField objects belonging to the model referenced by the key
@return The Map of model identifiers and their corresponding list of raw MiningField objects | [
"Retrieves",
"a",
"Map",
"with",
"entries",
"that",
"consist",
"of",
"key",
"-",
">",
"a",
"model",
"identifier",
"value",
"-",
">",
"the",
"List",
"of",
"raw",
"MiningField",
"objects",
"belonging",
"to",
"the",
"model",
"referenced",
"by",
"the",
"key"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java#L154-L162 |
14,273 | kiegroup/drools | kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java | PMML4UnitImpl.getChildModels | public Map<String, PMML4Model> getChildModels(String parentModelId) {
PMML4Model parent = modelsMap.get(parentModelId);
Map<String, PMML4Model> childMap = parent.getChildModels();
return (childMap != null && !childMap.isEmpty()) ? new HashMap<>(childMap) : new HashMap<>();
} | java | public Map<String, PMML4Model> getChildModels(String parentModelId) {
PMML4Model parent = modelsMap.get(parentModelId);
Map<String, PMML4Model> childMap = parent.getChildModels();
return (childMap != null && !childMap.isEmpty()) ? new HashMap<>(childMap) : new HashMap<>();
} | [
"public",
"Map",
"<",
"String",
",",
"PMML4Model",
">",
"getChildModels",
"(",
"String",
"parentModelId",
")",
"{",
"PMML4Model",
"parent",
"=",
"modelsMap",
".",
"get",
"(",
"parentModelId",
")",
";",
"Map",
"<",
"String",
",",
"PMML4Model",
">",
"childMap"... | Retrieves a Map whose entries consist of
key -> a model identifier
value -> the PMML4Model object that the key refers to
where the PMML4Model indicates that it
@param parentModelId
@return | [
"Retrieves",
"a",
"Map",
"whose",
"entries",
"consist",
"of",
"key",
"-",
">",
"a",
"model",
"identifier",
"value",
"-",
">",
"the",
"PMML4Model",
"object",
"that",
"the",
"key",
"refers",
"to",
"where",
"the",
"PMML4Model",
"indicates",
"that",
"it"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-pmml/src/main/java/org/kie/pmml/pmml_4_2/model/PMML4UnitImpl.java#L205-L209 |
14,274 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/DataUtilities.java | DataUtilities.makeDataLists | public static List<List<DTCellValue52>> makeDataLists( Object[][] oldData ) {
List<List<DTCellValue52>> newData = new ArrayList<List<DTCellValue52>>();
for ( int iRow = 0; iRow < oldData.length; iRow++ ) {
Object[] oldRow = oldData[ iRow ];
List<DTCellValue52> newRow = makeDataRo... | java | public static List<List<DTCellValue52>> makeDataLists( Object[][] oldData ) {
List<List<DTCellValue52>> newData = new ArrayList<List<DTCellValue52>>();
for ( int iRow = 0; iRow < oldData.length; iRow++ ) {
Object[] oldRow = oldData[ iRow ];
List<DTCellValue52> newRow = makeDataRo... | [
"public",
"static",
"List",
"<",
"List",
"<",
"DTCellValue52",
">",
">",
"makeDataLists",
"(",
"Object",
"[",
"]",
"[",
"]",
"oldData",
")",
"{",
"List",
"<",
"List",
"<",
"DTCellValue52",
">>",
"newData",
"=",
"new",
"ArrayList",
"<",
"List",
"<",
"DT... | Convert a two-dimensional array of Strings to a List of Lists, with
type-safe individual entries
@param oldData
@return New data | [
"Convert",
"a",
"two",
"-",
"dimensional",
"array",
"of",
"Strings",
"to",
"a",
"List",
"of",
"Lists",
"with",
"type",
"-",
"safe",
"individual",
"entries"
] | 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/DataUtilities.java#L34-L42 |
14,275 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/util/DataUtilities.java | DataUtilities.makeDataRowList | public static List<DTCellValue52> makeDataRowList( Object[] oldRow ) {
List<DTCellValue52> row = new ArrayList<DTCellValue52>();
//Row numbers are numerical
if ( oldRow[ 0 ] instanceof String ) {
DTCellValue52 rowDcv = new DTCellValue52( new Integer( (String) oldRow[ 0 ] ) );
... | java | public static List<DTCellValue52> makeDataRowList( Object[] oldRow ) {
List<DTCellValue52> row = new ArrayList<DTCellValue52>();
//Row numbers are numerical
if ( oldRow[ 0 ] instanceof String ) {
DTCellValue52 rowDcv = new DTCellValue52( new Integer( (String) oldRow[ 0 ] ) );
... | [
"public",
"static",
"List",
"<",
"DTCellValue52",
">",
"makeDataRowList",
"(",
"Object",
"[",
"]",
"oldRow",
")",
"{",
"List",
"<",
"DTCellValue52",
">",
"row",
"=",
"new",
"ArrayList",
"<",
"DTCellValue52",
">",
"(",
")",
";",
"//Row numbers are numerical",
... | Convert a single dimension array of Strings to a List with type-safe
entries. The first entry is converted into a numerical row number
@param oldRow
@return New row | [
"Convert",
"a",
"single",
"dimension",
"array",
"of",
"Strings",
"to",
"a",
"List",
"with",
"type",
"-",
"safe",
"entries",
".",
"The",
"first",
"entry",
"is",
"converted",
"into",
"a",
"numerical",
"row",
"number"
] | 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/DataUtilities.java#L50-L76 |
14,276 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java | SegmentUtilities.createSegmentMemory | public static void createSegmentMemory(LeftTupleSource tupleSource, InternalWorkingMemory wm) {
Memory mem = wm.getNodeMemory((MemoryFactory) tupleSource);
SegmentMemory smem = mem.getSegmentMemory();
if ( smem == null ) {
createSegmentMemory(tupleSource, mem, wm);
}
} | java | public static void createSegmentMemory(LeftTupleSource tupleSource, InternalWorkingMemory wm) {
Memory mem = wm.getNodeMemory((MemoryFactory) tupleSource);
SegmentMemory smem = mem.getSegmentMemory();
if ( smem == null ) {
createSegmentMemory(tupleSource, mem, wm);
}
} | [
"public",
"static",
"void",
"createSegmentMemory",
"(",
"LeftTupleSource",
"tupleSource",
",",
"InternalWorkingMemory",
"wm",
")",
"{",
"Memory",
"mem",
"=",
"wm",
".",
"getNodeMemory",
"(",
"(",
"MemoryFactory",
")",
"tupleSource",
")",
";",
"SegmentMemory",
"sme... | Initialises the NodeSegment memory for all nodes in the segment. | [
"Initialises",
"the",
"NodeSegment",
"memory",
"for",
"all",
"nodes",
"in",
"the",
"segment",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java#L64-L70 |
14,277 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java | SegmentUtilities.inSubNetwork | public static boolean inSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource) {
LeftTupleSource startTupleSource = riaNode.getStartTupleSource();
LeftTupleSource parent = riaNode.getLeftTupleSource();
while (parent != startTupleSource) {
if (parent == leftTupleS... | java | public static boolean inSubNetwork(RightInputAdapterNode riaNode, LeftTupleSource leftTupleSource) {
LeftTupleSource startTupleSource = riaNode.getStartTupleSource();
LeftTupleSource parent = riaNode.getLeftTupleSource();
while (parent != startTupleSource) {
if (parent == leftTupleS... | [
"public",
"static",
"boolean",
"inSubNetwork",
"(",
"RightInputAdapterNode",
"riaNode",
",",
"LeftTupleSource",
"leftTupleSource",
")",
"{",
"LeftTupleSource",
"startTupleSource",
"=",
"riaNode",
".",
"getStartTupleSource",
"(",
")",
";",
"LeftTupleSource",
"parent",
"=... | Is the LeftTupleSource a node in the sub network for the RightInputAdapterNode
To be in the same network, it must be a node is after the two output of the parent
and before the rianode. | [
"Is",
"the",
"LeftTupleSource",
"a",
"node",
"in",
"the",
"sub",
"network",
"for",
"the",
"RightInputAdapterNode",
"To",
"be",
"in",
"the",
"same",
"network",
"it",
"must",
"be",
"a",
"node",
"is",
"after",
"the",
"two",
"output",
"of",
"the",
"parent",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java#L363-L375 |
14,278 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java | SegmentUtilities.updateRiaAndTerminalMemory | private static int updateRiaAndTerminalMemory( LeftTupleSource lt,
LeftTupleSource originalLt,
SegmentMemory smem,
InternalWorkingMemory wm,
... | java | private static int updateRiaAndTerminalMemory( LeftTupleSource lt,
LeftTupleSource originalLt,
SegmentMemory smem,
InternalWorkingMemory wm,
... | [
"private",
"static",
"int",
"updateRiaAndTerminalMemory",
"(",
"LeftTupleSource",
"lt",
",",
"LeftTupleSource",
"originalLt",
",",
"SegmentMemory",
"smem",
",",
"InternalWorkingMemory",
"wm",
",",
"boolean",
"fromPrototype",
",",
"int",
"nodeTypesInSegment",
")",
"{",
... | This adds the segment memory to the terminal node or ria node's list of memories.
In the case of the terminal node this allows it to know that all segments from
the tip to root are linked.
In the case of the ria node its all the segments up to the start of the subnetwork.
This is because the rianode only cares if all o... | [
"This",
"adds",
"the",
"segment",
"memory",
"to",
"the",
"terminal",
"node",
"or",
"ria",
"node",
"s",
"list",
"of",
"memories",
".",
"In",
"the",
"case",
"of",
"the",
"terminal",
"node",
"this",
"allows",
"it",
"to",
"know",
"that",
"all",
"segments",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java#L385-L442 |
14,279 | kiegroup/drools | drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java | SegmentUtilities.isRootNode | public static boolean isRootNode(LeftTupleNode node, TerminalNode removingTN) {
return node.getType() == NodeTypeEnums.LeftInputAdapterNode || isNonTerminalTipNode( node.getLeftTupleSource(), removingTN );
} | java | public static boolean isRootNode(LeftTupleNode node, TerminalNode removingTN) {
return node.getType() == NodeTypeEnums.LeftInputAdapterNode || isNonTerminalTipNode( node.getLeftTupleSource(), removingTN );
} | [
"public",
"static",
"boolean",
"isRootNode",
"(",
"LeftTupleNode",
"node",
",",
"TerminalNode",
"removingTN",
")",
"{",
"return",
"node",
".",
"getType",
"(",
")",
"==",
"NodeTypeEnums",
".",
"LeftInputAdapterNode",
"||",
"isNonTerminalTipNode",
"(",
"node",
".",
... | Returns whether the node is the root of a segment.
Lians are always the root of a segment.
node cannot be null.
The result should discount any removingRule. That means it gives you the result as
if the rule had already been removed from the network. | [
"Returns",
"whether",
"the",
"node",
"is",
"the",
"root",
"of",
"a",
"segment",
".",
"Lians",
"are",
"always",
"the",
"root",
"of",
"a",
"segment",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java#L471-L473 |
14,280 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java | RuleBuilder.build | public static void build(final RuleBuildContext context) {
RuleDescr ruleDescr = context.getRuleDescr();
final RuleConditionBuilder builder = (RuleConditionBuilder) context.getDialect().getBuilder( ruleDescr.getLhs().getClass() );
if ( builder != null ) {
Pattern prefixPattern = con... | java | public static void build(final RuleBuildContext context) {
RuleDescr ruleDescr = context.getRuleDescr();
final RuleConditionBuilder builder = (RuleConditionBuilder) context.getDialect().getBuilder( ruleDescr.getLhs().getClass() );
if ( builder != null ) {
Pattern prefixPattern = con... | [
"public",
"static",
"void",
"build",
"(",
"final",
"RuleBuildContext",
"context",
")",
"{",
"RuleDescr",
"ruleDescr",
"=",
"context",
".",
"getRuleDescr",
"(",
")",
";",
"final",
"RuleConditionBuilder",
"builder",
"=",
"(",
"RuleConditionBuilder",
")",
"context",
... | Build the give rule into the | [
"Build",
"the",
"give",
"rule",
"into",
"the"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuilder.java#L101-L132 |
14,281 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java | RuleSheetParserUtil.getImportList | public static List<Import> getImportList(final List<String> importCells) {
final List<Import> importList = new ArrayList<Import>();
if ( importCells == null ) return importList;
for( String importCell: importCells ){
final StringTokenizer tokens = new StringTokenizer( importCell, ",... | java | public static List<Import> getImportList(final List<String> importCells) {
final List<Import> importList = new ArrayList<Import>();
if ( importCells == null ) return importList;
for( String importCell: importCells ){
final StringTokenizer tokens = new StringTokenizer( importCell, ",... | [
"public",
"static",
"List",
"<",
"Import",
">",
"getImportList",
"(",
"final",
"List",
"<",
"String",
">",
"importCells",
")",
"{",
"final",
"List",
"<",
"Import",
">",
"importList",
"=",
"new",
"ArrayList",
"<",
"Import",
">",
"(",
")",
";",
"if",
"("... | Create a list of Import model objects from cell contents.
@param importCells The cells containing text for all the classes to import.
@return A list of Import classes, which can be added to the ruleset. | [
"Create",
"a",
"list",
"of",
"Import",
"model",
"objects",
"from",
"cell",
"contents",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L52-L65 |
14,282 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java | RuleSheetParserUtil.getVariableList | public static List<Global> getVariableList( final List<String> variableCells ){
final List<Global> variableList = new ArrayList<Global>();
if ( variableCells == null ) return variableList;
for( String variableCell: variableCells ){
final StringTokenizer tokens = new StringTokenizer(... | java | public static List<Global> getVariableList( final List<String> variableCells ){
final List<Global> variableList = new ArrayList<Global>();
if ( variableCells == null ) return variableList;
for( String variableCell: variableCells ){
final StringTokenizer tokens = new StringTokenizer(... | [
"public",
"static",
"List",
"<",
"Global",
">",
"getVariableList",
"(",
"final",
"List",
"<",
"String",
">",
"variableCells",
")",
"{",
"final",
"List",
"<",
"Global",
">",
"variableList",
"=",
"new",
"ArrayList",
"<",
"Global",
">",
"(",
")",
";",
"if",... | Create a list of Global model objects from cell contents.
@param variableCella The cells containing text for all the global variables to set.
@return A list of Variable classes, which can be added to the ruleset. | [
"Create",
"a",
"list",
"of",
"Global",
"model",
"objects",
"from",
"cell",
"contents",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L72-L91 |
14,283 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java | RuleSheetParserUtil.rc2name | public static String rc2name( int row, int col ){
StringBuilder sb = new StringBuilder();
int b = 26;
int p = 1;
if( col >= b ){
col -= b;
p *= b;
}
if( col >= b*b ){
col -= b*b;
p *= b;
}
while( p > 0 ){
... | java | public static String rc2name( int row, int col ){
StringBuilder sb = new StringBuilder();
int b = 26;
int p = 1;
if( col >= b ){
col -= b;
p *= b;
}
if( col >= b*b ){
col -= b*b;
p *= b;
}
while( p > 0 ){
... | [
"public",
"static",
"String",
"rc2name",
"(",
"int",
"row",
",",
"int",
"col",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"b",
"=",
"26",
";",
"int",
"p",
"=",
"1",
";",
"if",
"(",
"col",
">=",
"b",
")",
... | Convert spreadsheet row, column numbers to a cell name.
@param row row number
@param col the column number. Start with zero.
@return The spreadsheet name for this cell, "A" to "ZZZ". | [
"Convert",
"spreadsheet",
"row",
"column",
"numbers",
"to",
"a",
"cell",
"name",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L121-L140 |
14,284 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java | ActionType.addNewActionType | public static void addNewActionType( final Map<Integer, ActionType> actionTypeMap,
final String value,
final int column,
final int row ) {
final String ucValue = value.toUpperCase();
... | java | public static void addNewActionType( final Map<Integer, ActionType> actionTypeMap,
final String value,
final int column,
final int row ) {
final String ucValue = value.toUpperCase();
... | [
"public",
"static",
"void",
"addNewActionType",
"(",
"final",
"Map",
"<",
"Integer",
",",
"ActionType",
">",
"actionTypeMap",
",",
"final",
"String",
"value",
",",
"final",
"int",
"column",
",",
"final",
"int",
"row",
")",
"{",
"final",
"String",
"ucValue",
... | Create a new action type that matches this cell, and add it to the map,
keyed on that column. | [
"Create",
"a",
"new",
"action",
"type",
"that",
"matches",
"this",
"cell",
"and",
"add",
"it",
"to",
"the",
"map",
"keyed",
"on",
"that",
"column",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java#L143-L172 |
14,285 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java | ActionType.addTemplate | public void addTemplate( int row,
int column,
String content ) {
if ( this.sourceBuilder == null ) {
throw new DecisionTableParseException(
"Unexpected content \"" + content + "\" in cell " +
Ru... | java | public void addTemplate( int row,
int column,
String content ) {
if ( this.sourceBuilder == null ) {
throw new DecisionTableParseException(
"Unexpected content \"" + content + "\" in cell " +
Ru... | [
"public",
"void",
"addTemplate",
"(",
"int",
"row",
",",
"int",
"column",
",",
"String",
"content",
")",
"{",
"if",
"(",
"this",
".",
"sourceBuilder",
"==",
"null",
")",
"{",
"throw",
"new",
"DecisionTableParseException",
"(",
"\"Unexpected content \\\"\"",
"+... | This is where a code snippet template is added. | [
"This",
"is",
"where",
"a",
"code",
"snippet",
"template",
"is",
"added",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java#L177-L186 |
14,286 | kiegroup/drools | drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java | ActionType.addCellValue | public void addCellValue( int row,
int column,
String content,
boolean _escapeQuotesFlag,
boolean trimCell ) {
if ( _escapeQuotesFlag ) {
//Michael Neale:
// For single... | java | public void addCellValue( int row,
int column,
String content,
boolean _escapeQuotesFlag,
boolean trimCell ) {
if ( _escapeQuotesFlag ) {
//Michael Neale:
// For single... | [
"public",
"void",
"addCellValue",
"(",
"int",
"row",
",",
"int",
"column",
",",
"String",
"content",
",",
"boolean",
"_escapeQuotesFlag",
",",
"boolean",
"trimCell",
")",
"{",
"if",
"(",
"_escapeQuotesFlag",
")",
"{",
"//Michael Neale:",
"// For single standard qu... | Values are added to populate the template.
The source builder contained needs to be "cleared" when the resultant snippet is extracted. | [
"Values",
"are",
"added",
"to",
"populate",
"the",
"template",
".",
"The",
"source",
"builder",
"contained",
"needs",
"to",
"be",
"cleared",
"when",
"the",
"resultant",
"snippet",
"is",
"extracted",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/ActionType.java#L199-L214 |
14,287 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java | DRL6StrictParser.typeArgument | public String typeArgument() throws RecognitionException {
String typeArgument = "";
try {
int first = input.index(), last = first;
int next = input.LA(1);
switch (next) {
case DRL6Lexer.QUESTION:
match(input,
... | java | public String typeArgument() throws RecognitionException {
String typeArgument = "";
try {
int first = input.index(), last = first;
int next = input.LA(1);
switch (next) {
case DRL6Lexer.QUESTION:
match(input,
... | [
"public",
"String",
"typeArgument",
"(",
")",
"throws",
"RecognitionException",
"{",
"String",
"typeArgument",
"=",
"\"\"",
";",
"try",
"{",
"int",
"first",
"=",
"input",
".",
"index",
"(",
")",
",",
"last",
"=",
"first",
";",
"int",
"next",
"=",
"input"... | Matches a type argument
typeArguments := QUESTION (( EXTENDS | SUPER ) type )?
| type
;
@return
@throws org.antlr.runtime.RecognitionException | [
"Matches",
"a",
"type",
"argument"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java#L4681-L4736 |
14,288 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java | DRL6StrictParser.qualifiedIdentifier | public String qualifiedIdentifier() throws RecognitionException {
String qi = "";
try {
Token first = match(input,
DRL6Lexer.ID,
null,
new int[]{DRL6Lexer.DOT},
DroolsEditorType.IDENTIFIER);
if (state... | java | public String qualifiedIdentifier() throws RecognitionException {
String qi = "";
try {
Token first = match(input,
DRL6Lexer.ID,
null,
new int[]{DRL6Lexer.DOT},
DroolsEditorType.IDENTIFIER);
if (state... | [
"public",
"String",
"qualifiedIdentifier",
"(",
")",
"throws",
"RecognitionException",
"{",
"String",
"qi",
"=",
"\"\"",
";",
"try",
"{",
"Token",
"first",
"=",
"match",
"(",
"input",
",",
"DRL6Lexer",
".",
"ID",
",",
"null",
",",
"new",
"int",
"[",
"]",... | Matches a qualified identifier
qualifiedIdentifier := ID ( DOT ID )*
@return
@throws org.antlr.runtime.RecognitionException | [
"Matches",
"a",
"qualified",
"identifier"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java#L4746-L4782 |
14,289 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java | DRL6StrictParser.chunk | public String chunk(final int leftDelimiter,
final int rightDelimiter,
final int location) {
String chunk = "";
int first = -1, last = first;
try {
match(input,
leftDelimiter,
null,
null,
... | java | public String chunk(final int leftDelimiter,
final int rightDelimiter,
final int location) {
String chunk = "";
int first = -1, last = first;
try {
match(input,
leftDelimiter,
null,
null,
... | [
"public",
"String",
"chunk",
"(",
"final",
"int",
"leftDelimiter",
",",
"final",
"int",
"rightDelimiter",
",",
"final",
"int",
"location",
")",
"{",
"String",
"chunk",
"=",
"\"\"",
";",
"int",
"first",
"=",
"-",
"1",
",",
"last",
"=",
"first",
";",
"tr... | Matches a chunk started by the leftDelimiter and ended by the rightDelimiter.
@param leftDelimiter
@param rightDelimiter
@param location
@return the matched chunk without the delimiters | [
"Matches",
"a",
"chunk",
"started",
"by",
"the",
"leftDelimiter",
"and",
"ended",
"by",
"the",
"rightDelimiter",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java#L4834-L4884 |
14,290 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java | DRL6StrictParser.match | Token match( TokenStream input,
int ttype,
String text,
int[] follow,
DroolsEditorType etype ) throws RecognitionException {
Token matchedSymbol = null;
matchedSymbol = input.LT(1);
if (input.LA(1) == ttype && (text == null || t... | java | Token match( TokenStream input,
int ttype,
String text,
int[] follow,
DroolsEditorType etype ) throws RecognitionException {
Token matchedSymbol = null;
matchedSymbol = input.LT(1);
if (input.LA(1) == ttype && (text == null || t... | [
"Token",
"match",
"(",
"TokenStream",
"input",
",",
"int",
"ttype",
",",
"String",
"text",
",",
"int",
"[",
"]",
"follow",
",",
"DroolsEditorType",
"etype",
")",
"throws",
"RecognitionException",
"{",
"Token",
"matchedSymbol",
"=",
"null",
";",
"matchedSymbol"... | Match current input symbol against ttype and optionally
check the text of the token against text. Attempt
single token insertion or deletion error recovery. If
that fails, throw MismatchedTokenException. | [
"Match",
"current",
"input",
"symbol",
"against",
"ttype",
"and",
"optionally",
"check",
"the",
"text",
"of",
"the",
"token",
"against",
"text",
".",
"Attempt",
"single",
"token",
"insertion",
"or",
"deletion",
"error",
"recovery",
".",
"If",
"that",
"fails",
... | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java#L4895-L4921 |
14,291 | kiegroup/drools | drools-templates/src/main/java/org/drools/template/jdbc/ResultSetGenerator.java | ResultSetGenerator.processData | private void processData(final ResultSet rs,
List<DataListener> listeners) {
try {
ResultSetMetaData rsmd = rs.getMetaData();
int colCount = rsmd.getColumnCount();
int i = 0;
while (rs.next()) {
newRow(listeners, i, ... | java | private void processData(final ResultSet rs,
List<DataListener> listeners) {
try {
ResultSetMetaData rsmd = rs.getMetaData();
int colCount = rsmd.getColumnCount();
int i = 0;
while (rs.next()) {
newRow(listeners, i, ... | [
"private",
"void",
"processData",
"(",
"final",
"ResultSet",
"rs",
",",
"List",
"<",
"DataListener",
">",
"listeners",
")",
"{",
"try",
"{",
"ResultSetMetaData",
"rsmd",
"=",
"rs",
".",
"getMetaData",
"(",
")",
";",
"int",
"colCount",
"=",
"rsmd",
".",
"... | Iterate through the resultset.
@param rs the resultset for the table data
@param listeners list of template data listener | [
"Iterate",
"through",
"the",
"resultset",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-templates/src/main/java/org/drools/template/jdbc/ResultSetGenerator.java#L89-L130 |
14,292 | kiegroup/drools | drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java | TypeDeclarationUtils.toBuildableType | public static String toBuildableType(String className, ClassLoader loader) {
int arrayDim = BuildUtils.externalArrayDimSize(className);
String prefix = "";
String coreType = arrayDim == 0 ? className : className.substring(0, className.indexOf("["));
coreType = typeName2ClassName(coreTyp... | java | public static String toBuildableType(String className, ClassLoader loader) {
int arrayDim = BuildUtils.externalArrayDimSize(className);
String prefix = "";
String coreType = arrayDim == 0 ? className : className.substring(0, className.indexOf("["));
coreType = typeName2ClassName(coreTyp... | [
"public",
"static",
"String",
"toBuildableType",
"(",
"String",
"className",
",",
"ClassLoader",
"loader",
")",
"{",
"int",
"arrayDim",
"=",
"BuildUtils",
".",
"externalArrayDimSize",
"(",
"className",
")",
";",
"String",
"prefix",
"=",
"\"\"",
";",
"String",
... | not the cleanest logic, but this is what the builders expect downstream | [
"not",
"the",
"cleanest",
"logic",
"but",
"this",
"is",
"what",
"the",
"builders",
"expect",
"downstream"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/builder/impl/TypeDeclarationUtils.java#L273-L290 |
14,293 | kiegroup/drools | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNEvaluatorCompiler.java | DMNEvaluatorCompiler.recurseUpToInferTypeRef | private static QName recurseUpToInferTypeRef(DMNModelImpl model, OutputClause originalElement, DMNElement recursionIdx) {
if ( recursionIdx.getParent() instanceof Decision ) {
InformationItem parentVariable = ((Decision) recursionIdx.getParent()).getVariable();
if ( parentVariable != nul... | java | private static QName recurseUpToInferTypeRef(DMNModelImpl model, OutputClause originalElement, DMNElement recursionIdx) {
if ( recursionIdx.getParent() instanceof Decision ) {
InformationItem parentVariable = ((Decision) recursionIdx.getParent()).getVariable();
if ( parentVariable != nul... | [
"private",
"static",
"QName",
"recurseUpToInferTypeRef",
"(",
"DMNModelImpl",
"model",
",",
"OutputClause",
"originalElement",
",",
"DMNElement",
"recursionIdx",
")",
"{",
"if",
"(",
"recursionIdx",
".",
"getParent",
"(",
")",
"instanceof",
"Decision",
")",
"{",
"... | Utility method for DecisionTable with only 1 output, to infer typeRef from parent
@param model used for reporting errors
@param originalElement the original OutputClause[0] single output for which the DecisionTable parameter recursionIdx is being processed for inferring the typeRef
@param recursionIdx start of the recu... | [
"Utility",
"method",
"for",
"DecisionTable",
"with",
"only",
"1",
"output",
"to",
"infer",
"typeRef",
"from",
"parent"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNEvaluatorCompiler.java#L682-L732 |
14,294 | kiegroup/drools | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNEvaluatorCompiler.java | DMNEvaluatorCompiler.variableTypeRefOrErrIfNull | private static QName variableTypeRefOrErrIfNull(DMNModelImpl model, InformationItem variable) {
if ( variable.getTypeRef() != null ) {
return variable.getTypeRef();
} else {
MsgUtil.reportMessage( logger,
DMNMessage.Severity.ERROR,
variable... | java | private static QName variableTypeRefOrErrIfNull(DMNModelImpl model, InformationItem variable) {
if ( variable.getTypeRef() != null ) {
return variable.getTypeRef();
} else {
MsgUtil.reportMessage( logger,
DMNMessage.Severity.ERROR,
variable... | [
"private",
"static",
"QName",
"variableTypeRefOrErrIfNull",
"(",
"DMNModelImpl",
"model",
",",
"InformationItem",
"variable",
")",
"{",
"if",
"(",
"variable",
".",
"getTypeRef",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"variable",
".",
"getTypeRef",
"(",
")... | Utility method to have a error message is reported if a DMN Variable is missing typeRef.
@param model used for reporting errors
@param variable the variable to extract typeRef
@return the `variable.typeRef` or null in case of errors. Errors are reported with standard notification mechanism via MsgUtil.reportMessage | [
"Utility",
"method",
"to",
"have",
"a",
"error",
"message",
"is",
"reported",
"if",
"a",
"DMN",
"Variable",
"is",
"missing",
"typeRef",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNEvaluatorCompiler.java#L740-L755 |
14,295 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DateUtils.java | DateUtils.parseDate | public static Date parseDate(final String input) {
try {
return df.get().parse(input);
} catch (final ParseException e) {
try {
// FIXME: Workaround to make the tests run with non-English locales
return new SimpleDateFormat(DATE_FORMAT_MASK, Locale... | java | public static Date parseDate(final String input) {
try {
return df.get().parse(input);
} catch (final ParseException e) {
try {
// FIXME: Workaround to make the tests run with non-English locales
return new SimpleDateFormat(DATE_FORMAT_MASK, Locale... | [
"public",
"static",
"Date",
"parseDate",
"(",
"final",
"String",
"input",
")",
"{",
"try",
"{",
"return",
"df",
".",
"get",
"(",
")",
".",
"parse",
"(",
"input",
")",
";",
"}",
"catch",
"(",
"final",
"ParseException",
"e",
")",
"{",
"try",
"{",
"//... | Use the simple date formatter to read the date from a string | [
"Use",
"the",
"simple",
"date",
"formatter",
"to",
"read",
"the",
"date",
"from",
"a",
"string"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DateUtils.java#L62-L74 |
14,296 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DateUtils.java | DateUtils.getRightDate | public static Date getRightDate(final Object object2) {
if (object2 == null) {
return null;
}
if (object2 instanceof String) {
return parseDate((String) object2);
} else if (object2 instanceof Date) {
return (Date) object2;
} else {
... | java | public static Date getRightDate(final Object object2) {
if (object2 == null) {
return null;
}
if (object2 instanceof String) {
return parseDate((String) object2);
} else if (object2 instanceof Date) {
return (Date) object2;
} else {
... | [
"public",
"static",
"Date",
"getRightDate",
"(",
"final",
"Object",
"object2",
")",
"{",
"if",
"(",
"object2",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"object2",
"instanceof",
"String",
")",
"{",
"return",
"parseDate",
"(",
"(",
... | Converts the right hand side date as appropriate | [
"Converts",
"the",
"right",
"hand",
"side",
"date",
"as",
"appropriate"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DateUtils.java#L82-L94 |
14,297 | kiegroup/drools | drools-core/src/main/java/org/drools/core/util/DateUtils.java | DateUtils.getDateFormatMask | public static String getDateFormatMask() {
String fmt = System.getProperty("drools.dateformat");
if (fmt == null) {
fmt = DEFAULT_FORMAT_MASK;
}
return fmt;
} | java | public static String getDateFormatMask() {
String fmt = System.getProperty("drools.dateformat");
if (fmt == null) {
fmt = DEFAULT_FORMAT_MASK;
}
return fmt;
} | [
"public",
"static",
"String",
"getDateFormatMask",
"(",
")",
"{",
"String",
"fmt",
"=",
"System",
".",
"getProperty",
"(",
"\"drools.dateformat\"",
")",
";",
"if",
"(",
"fmt",
"==",
"null",
")",
"{",
"fmt",
"=",
"DEFAULT_FORMAT_MASK",
";",
"}",
"return",
"... | Check for the system property override, if it exists | [
"Check",
"for",
"the",
"system",
"property",
"override",
"if",
"it",
"exists"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DateUtils.java#L97-L103 |
14,298 | kiegroup/drools | drools-workbench-models/drools-workbench-models-guided-dtable/src/main/java/org/drools/workbench/models/guided/dtable/backend/GuidedDecisionTableProviderImpl.java | GuidedDecisionTableProviderImpl.hasDSLSentences | public static boolean hasDSLSentences(final GuidedDecisionTable52 model) {
for (CompositeColumn<? extends BaseColumn> column : model.getConditions()) {
if (column instanceof BRLConditionColumn) {
final BRLConditionColumn brlColumn = (BRLConditionColumn) column;
for (I... | java | public static boolean hasDSLSentences(final GuidedDecisionTable52 model) {
for (CompositeColumn<? extends BaseColumn> column : model.getConditions()) {
if (column instanceof BRLConditionColumn) {
final BRLConditionColumn brlColumn = (BRLConditionColumn) column;
for (I... | [
"public",
"static",
"boolean",
"hasDSLSentences",
"(",
"final",
"GuidedDecisionTable52",
"model",
")",
"{",
"for",
"(",
"CompositeColumn",
"<",
"?",
"extends",
"BaseColumn",
">",
"column",
":",
"model",
".",
"getConditions",
"(",
")",
")",
"{",
"if",
"(",
"c... | a DataModelOracle just to determine whether the model has DSLs is an expensive operation and not needed here. | [
"a",
"DataModelOracle",
"just",
"to",
"determine",
"whether",
"the",
"model",
"has",
"DSLs",
"is",
"an",
"expensive",
"operation",
"and",
"not",
"needed",
"here",
"."
] | 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/GuidedDecisionTableProviderImpl.java#L52-L74 |
14,299 | kiegroup/drools | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNStyle.java | DMNStyle.setFillColor | public void setFillColor(org.kie.dmn.model.api.dmndi.Color value) {
this.fillColor = value;
} | java | public void setFillColor(org.kie.dmn.model.api.dmndi.Color value) {
this.fillColor = value;
} | [
"public",
"void",
"setFillColor",
"(",
"org",
".",
"kie",
".",
"dmn",
".",
"model",
".",
"api",
".",
"dmndi",
".",
"Color",
"value",
")",
"{",
"this",
".",
"fillColor",
"=",
"value",
";",
"}"
] | Sets the value of the fillColor property.
@param value
allowed object is
{@link Color } | [
"Sets",
"the",
"value",
"of",
"the",
"fillColor",
"property",
"."
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_2/dmndi/DMNStyle.java#L56-L58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.