TODO think about super grammar
193885
public static AbstractElement findFirstWithSameConflicts(final AbstractElement element, final Grammar grammar) {
		final List<String> conflicting = getConflictingKeywords(element, grammar);
		AbstractElement result = element;
		Iterator<AbstractElement> iterator = Iterators.filter(
				Iterators.filter(EcoreUtil.getAllContents(grammar, true), AbstractElement.class),
				new Predicate<AbstractElement>() {
					@Override
					public boolean apply(AbstractElement param) {
						final List<String> otherConflicting = getConflictingKeywords(param, grammar);
						return otherConflicting != null && otherConflicting.equals(conflicting);
					}
				});
		if (iterator.hasNext())
			result = iterator.next();

		return result;
	}
1353769
public final void superSuffix() throws RecognitionException {
		int superSuffix_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 139) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1292:5: ( arguments | '.' Identifier ( arguments )? )
			int alt191=2;
			int LA191_0 = input.LA(1);
			if ( (LA191_0==36) ) {
				alt191=1;
			}
			else if ( (LA191_0==47) ) {
				alt191=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 191, 0, input);
				throw nvae;
			}

			switch (alt191) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1292:7: arguments
					{
					pushFollow(FOLLOW_arguments_in_superSuffix6353);
					arguments();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1293:9: '.' Identifier ( arguments )?
					{
					match(input,47,FOLLOW_47_in_superSuffix6363); if (state.failed) return;
					match(input,Identifier,FOLLOW_Identifier_in_superSuffix6365); if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1293:24: ( arguments )?
					int alt190=2;
					int LA190_0 = input.LA(1);
					if ( (LA190_0==36) ) {
						alt190=1;
					}
					switch (alt190) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1293:25: arguments
							{
							pushFollow(FOLLOW_arguments_in_superSuffix6368);
							arguments();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 139, superSuffix_StartIndex); }

		}
	}
1297178
function basicParser(condition, str) {
    let result = [];

    for (let i = 0; i < str.length; ++i) {
        if (condition(str[i])) {
            result.push(str[i]);
        }
    }

    return result;
}
23804
private Expression consolidateAnd(And and) {
        Expression result = and;
        Expression lhs = and.getOperand().get(0);
        Expression rhs = and.getOperand().get(1);
        if (isBooleanLiteral(lhs, true)) {
            result = rhs;
        } else if (isBooleanLiteral(rhs, true)) {
            result = lhs;
        } else if (lhs instanceof And) {
            and.getOperand().set(0, consolidateAnd((And) lhs));
        } else if (rhs instanceof And) {
            and.getOperand().set(1, consolidateAnd((And) rhs));
        }

        return result;
    }
1077526
function(cls,superClass) {
    cls.super_ = superClass;
    cls.prototype = Object.create(superClass.prototype,{
      constructor: {
        value: cls,
        writable: true,
        enumerable: false,
        configurable: true,
      },
    });
  }
562179
function processsupercall() {
		if (methodname) {
			if (!character.match(METHODNAME)) {
				buffer += '.call';
				methodname = false;
			}
		} else if (superargs) {
			if (character.match(METHODNAME)) {
				buffer += ', ';
				superargs = false;
			}
		}
		switch (character) {
			case '(':
				character = '(this';
				superargs = true;
				break;
			case ')':
				supercall = false;
				superargs = false;
				break;
		}
	}
597839
def _do_conjunction(self, _and=("and", "e", "en", "et", "und", "y")):
        
        w = self.words
        if len(w) > 2 and w[-2].type == "CC" and w[-2].chunk is None:
            cc  = w[-2].string.lower() in _and and AND or OR
            ch1 = w[-3].chunk
            ch2 = w[-1].chunk
            if ch1 is not None and \
               ch2 is not None:
                ch1.conjunctions.append(ch2, cc)
                ch2.conjunctions.append(ch1, cc)
60770
public boolean add(E o) {
    	if(o!=null && !contains(o)){
    		return super.add(o);
    	}
    	return false;
    }
1370355
function isDistinctInterpretationForSame(sentence) {
    var mp = {};
    var res = sentence.every(function (word, index) {
        var seen = mp[word.string];
        if (!seen) {
            mp[word.string] = word;
            return true;
        }
        if (!seen.rule || !word.rule) {
            return true;
        }
        if (seen.rule.bitindex === word.rule.bitindex
            && seen.rule.matchedString !== word.rule.matchedString) {
            //  console.log("skipping this" + JSON.stringify(sentence,undefined,2));
            return false;
        }
        return true;
    });
    return res;
}
671705
public Sentence makeSentence(String[] words, String[] posTags, boolean rootFirst, boolean lowerCased)
    {
        ArrayList<Integer> tokens = new ArrayList<Integer>();
        ArrayList<Integer> tags = new ArrayList<Integer>();
        ArrayList<Integer> bc4 = new ArrayList<Integer>();
        ArrayList<Integer> bc6 = new ArrayList<Integer>();
        ArrayList<Integer> bcf = new ArrayList<Integer>();

        int i = 0;
        for (String word : words)
        {
            if (word.length() == 0)
                continue;
            String lowerCaseWord = word.toLowerCase();
            if (lowerCased)
                word = lowerCaseWord;

            int[] clusterIDs = clusterId(word);
            bcf.add(clusterIDs[0]);
            bc4.add(clusterIDs[1]);
            bc6.add(clusterIDs[2]);

            String pos = posTags[i];

            int wi = -1;
            if (wordId.containsKey(word))
                wi = wordId.get(word);

            int pi = -1;
            if (wordId.containsKey(pos))
                pi = wordId.get(pos);

            tokens.add(wi);
            tags.add(pi);

            i++;
        }

        if (!rootFirst)
        {
            tokens.add(0);
            tags.add(0);
            bcf.add(0);
            bc6.add(0);
            bc4.add(0);
        }

        return new Sentence(tokens, tags, bc4, bc6, bcf);
    }
435497
function (args) {
            args = argsToArray(arguments);
            return !args.length ? this._super(arguments) : this.group.apply(this, args);
        }
160502
function breakwords () {
  return through2.obj(function (chunk, _, cb) {
    const words = chunk.split(' ')
      .map(i => i.trim())
      .filter(Boolean)
      .filter(i => i !== '(LISTEN)') // ugh.
    this.push(words)
    cb()
  })
}
939239
function() {
    this._super.apply(this, arguments);
    this._transpilerCache = {};
    this.toFormat = esperanto[formatToFunctionName[this.format]];

    if (this.format === 'umd' && !this.bundleOptions) {
      throw new Error(umdMesssage);
    }
  }
608582
@Override
    public AttributeType<D> sup(AttributeType<D> superType) {
        ((AttributeTypeImpl<D>) superType).sups().forEach(st -> checkInstancesMatchRegex(st.regex()));
        return super.sup(superType);
    }
671388
private final void step4() {
        switch (b[k]) {
            case 'e':
                if (endWith("icate")) {
                    r("ic");
                    break;
                }
                if (endWith("ative")) {
                    r("");
                    break;
                }
                if (endWith("alize")) {
                    r("al");
                    break;
                }
                break;
            case 'i':
                if (endWith("iciti")) {
                    r("ic");
                    break;
                }
                break;
            case 'l':
                if (endWith("ical")) {
                    r("ic");
                    break;
                }
                if (endWith("ful")) {
                    r("");
                    break;
                }
                break;
            case 's':
                if (endWith("ness")) {
                    r("");
                    break;
                }
                break;
        }
    }
691782
public boolean hasAnySubexpressionWithPredicate(SubexprFinderPredicate pred) {
        if (pred.matches(this)) {
            return true;
        }

        if (m_left != null && m_left.hasAnySubexpressionWithPredicate(pred)) {
            return true;
        }

        if (m_right != null && m_right.hasAnySubexpressionWithPredicate(pred)) {
            return true;
        }

        if (m_args != null) {
            for (AbstractExpression argument : m_args) {
                if (argument.hasAnySubexpressionWithPredicate(pred)) {
                    return true;
                }
            }
        }

        return false;
    }
352861
private GrammaticalStructure tagDependencies(Tree tree, boolean makeCopulaVerbHead) {
        SemanticHeadFinder headFinder = new SemanticHeadFinder(!makeCopulaVerbHead); // keep copula verbs as head
        // string -> true return all tokens including punctuations.
        GrammaticalStructure gs = new EnglishGrammaticalStructure(tree, string -> true, headFinder);
        return gs;
    }