Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
267,800
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AbstractRegexpArrangementMatcher that = (AbstractRegexpArrangementMatcher)o; return myPattern.equals(that.myPattern); }
equals
267,801
String () { return String.format("regexp '%s'", myPattern); }
toString
267,802
boolean (@NotNull ArrangementEntry entry) { if (entry instanceof ModifierAwareArrangementEntry) { final Set<? extends ArrangementSettingsToken> modifiers = ((ModifierAwareArrangementEntry)entry).getModifiers(); for (ArrangementAtomMatchCondition condition : myModifiers) { final Object value = condition.getValue(); bool...
isMatched
267,803
int () { return myModifiers.hashCode(); }
hashCode
267,804
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ByModifierArrangementEntryMatcher matcher = (ByModifierArrangementEntryMatcher)o; if (!myModifiers.equals(matcher.myModifiers)) { return false; } return true; }
equals
267,805
String () { return "with modifiers " + myModifiers; }
toString
267,806
boolean (@NotNull ArrangementEntry entry) { if (entry instanceof TextAwareArrangementEntry) { return StringUtil.equals(((TextAwareArrangementEntry)entry).getText(), myText); } return false; }
isMatched
267,807
int () { return myText.hashCode(); }
hashCode
267,808
boolean (Object o) { if (this == o) { return true; } if (!(o instanceof ByTextArrangementEntryMatcher matcher)) { return false; } if (!myText.equals(matcher.myText)) { return false; } return true; }
equals
267,809
String () { return "with text " + myText; }
toString
267,810
ArrangementEntryMatcher () { return myMatcher; }
getMatcher
267,811
ArrangementSettingsToken () { return myOrderType; }
getOrderType
267,812
int () { int result = myMatcher.hashCode(); result = 31 * result + myOrderType.hashCode(); return result; }
hashCode
267,813
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ArrangementMatchRule that = (ArrangementMatchRule)o; return myOrderType == that.myOrderType && myMatcher.equals(that.myMatcher); }
equals
267,814
String () { return String.format("matcher: %s, sort type: %s", myMatcher, myOrderType); }
toString
267,815
boolean (@NotNull ArrangementEntry entry) { for (ArrangementEntryMatcher matcher : myMatchers) { if (!matcher.isMatched(entry)) { return false; } } return true; }
isMatched
267,816
void (@NotNull ArrangementEntryMatcher rule) { myMatchers.add(rule); }
addMatcher
267,817
int () { return myMatchers.hashCode(); }
hashCode
267,818
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CompositeArrangementEntryMatcher matcher = (CompositeArrangementEntryMatcher)o; return myMatchers.equals(matcher.myMatchers); }
equals
267,819
String () { return String.format("all of those: %s", myMatchers); }
toString
267,820
String (@NotNull ArrangementEntry entry) { if (entry instanceof NamespaceAwareArrangementEntry) { return ((NamespaceAwareArrangementEntry)entry).getNamespace(); } else { return null; } }
getTextToMatch
267,821
Element (@NotNull ArrangementMatchCondition condition) { MySerializationVisitor visitor = new MySerializationVisitor(); condition.invite(visitor); return visitor.result; }
serialize
267,822
StdArrangementEntryMatcher (@NotNull Element matcherElement) { ArrangementMatchCondition condition = deserializeCondition(matcherElement); return condition == null ? null : new StdArrangementEntryMatcher(condition); }
deserialize
267,823
ArrangementMatchCondition (@NotNull Element matcherElement) { String name = matcherElement.getName(); if (COMPOSITE_CONDITION_NAME.equals(name)) { ArrangementCompositeMatchCondition composite = new ArrangementCompositeMatchCondition(); for (Element child : matcherElement.getChildren()) { ArrangementMatchCondition deser...
deserializeCondition
267,824
ArrangementMatchCondition (@NotNull Element matcherElement) { String id = matcherElement.getName(); ArrangementSettingsToken token = StdArrangementTokens.byId(id); boolean processInnerText = true; if (token != null && (StdArrangementTokens.General.TYPE.equals(token) || StdArrangementTokens.General.MODIFIER.equals(token...
deserializeAtomCondition
267,825
Boolean (@NotNull String text) { if (StringUtil.equalsIgnoreCase(text, Boolean.TRUE.toString())) { return true; } if (StringUtil.equalsIgnoreCase(text, Boolean.FALSE.toString())) { return false; } return null; }
parseBooleanValue
267,826
void (@NotNull ArrangementAtomMatchCondition condition) { ArrangementSettingsToken type = condition.getType(); final Element element = new Element(type.getId()); if (StdArrangementTokenType.REG_EXP.is(type)) { element.setText(StringUtil.escapeStringCharacters(condition.getValue().toString())); } else if (condition.getV...
visit
267,827
void (@NotNull ArrangementCompositeMatchCondition condition) { Element composite = new Element(COMPOSITE_CONDITION_NAME); register(composite); parent = composite; List<ArrangementMatchCondition> operands = new ArrayList<>(condition.getOperands()); ContainerUtil.sort(operands, CONDITION_COMPARATOR); for (ArrangementMatc...
visit
267,828
void (@NotNull Element element) { if (result == null) { result = element; } if (parent != null) { parent.addContent(element); } }
register
267,829
StdArrangementEntryMatcher () { return (StdArrangementEntryMatcher)super.getMatcher(); }
getMatcher
267,830
StdArrangementMatchRule () { return new StdArrangementMatchRule(new StdArrangementEntryMatcher(getMatcher().getCondition().clone()), getOrderType()); }
clone
267,831
int (@NotNull StdArrangementMatchRule o) { final Map<ArrangementSettingsToken, Object> tokenValues = ArrangementUtil.extractTokens(getMatcher().getCondition()); final Map<ArrangementSettingsToken, Object> tokenValues1 = ArrangementUtil.extractTokens(o.getMatcher().getCondition()); final Set<ArrangementSettingsToken> to...
compareTo
267,832
String (@NotNull Map<ArrangementSettingsToken, Object> tokens) { for (Map.Entry<ArrangementSettingsToken, Object> token : tokens.entrySet()) { if (StdArrangementTokenType.ENTRY_TYPE.is(token.getKey())) { final Object value = token.getValue(); if (!(value instanceof Boolean) || (Boolean)value) { return token.getKey().ge...
getEntryType
267,833
boolean (@NotNull ArrangementEntry entry) { return false; }
isMatched
267,834
String (@NotNull ArrangementEntry entry) { if (entry instanceof NameAwareArrangementEntry) { return ((NameAwareArrangementEntry)entry).getName(); } else { return null; } }
getTextToMatch
267,835
ArrangementMatchCondition () { return myCondition; }
getCondition
267,836
boolean (@NotNull ArrangementEntry entry) { return myDelegate.isMatched(entry); }
isMatched
267,837
int () { return myCondition.hashCode(); }
hashCode
267,838
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } StdArrangementEntryMatcher matcher = (StdArrangementEntryMatcher)o; return myCondition.equals(matcher.myCondition); }
equals
267,839
String () { return myCondition.toString(); }
toString
267,840
ArrangementEntryMatcher (@NotNull ArrangementMatchCondition condition, @NotNull StdMatcherBuilder builder) { MyVisitor visitor = new MyVisitor(builder); condition.invite(visitor); return visitor.getMatcher(); }
doBuildMatcher
267,841
void (@NotNull StdArrangementSettingsToken token, @NotNull ArrangementAtomMatchCondition condition) { StdArrangementTokenType tokenType = token.getTokenType(); context.putValue(tokenType, condition); }
addToContext
267,842
void (@NotNull ArrangementAtomMatchCondition condition) { if (StdArrangementTokens.Regexp.NAME.equals(condition.getType())) { myNamePattern = condition.getValue().toString(); return; } else if (StdArrangementTokens.Regexp.XML_NAMESPACE.equals(condition.getType())) { myNamespacePattern = condition.getValue().toString();...
onCondition
267,843
Collection<ArrangementEntryMatcher> () { List<ArrangementEntryMatcher> result = new ArrayList<>(myMatchers); Collection<ArrangementAtomMatchCondition> entryTokens = context.get(StdArrangementTokenType.ENTRY_TYPE); if (!entryTokens.isEmpty()) { result.add(new ByTypeArrangementEntryMatcher(entryTokens)); } Collection<Arr...
buildMatchers
267,844
void (@NotNull ArrangementEntryMatcher matcher) { myMatchers.add(matcher); }
addMatcher
267,845
void (@NotNull ArrangementAtomMatchCondition condition) { myMatcherBuilder.onCondition(condition); }
visit
267,846
void (@NotNull ArrangementCompositeMatchCondition condition) { if (!nestedComposite) { nestedComposite = true; for (ArrangementMatchCondition c : condition.getOperands()) { c.invite(this); } } else { myMatcherBuilder.addMatcher(doBuildMatcher(condition, myMatcherBuilder)); } }
visit
267,847
ArrangementEntryMatcher () { Collection<ArrangementEntryMatcher> matchers = myMatcherBuilder.buildMatchers(); if (matchers.size() == 1) { return matchers.iterator().next(); } else { CompositeArrangementEntryMatcher result = new CompositeArrangementEntryMatcher(); for (ArrangementEntryMatcher matcher : matchers) { resul...
getMatcher
267,848
List<StdArrangementMatchRule> () { return myMatchRules; }
getMatchRules
267,849
ArrangementSectionRule (StdArrangementMatchRule @NotNull ... rules) { return create(null, null, rules); }
create
267,850
ArrangementSectionRule (@Nullable String start, @Nullable String end, StdArrangementMatchRule @NotNull ... rules) { return create(start, end, rules.length == 0 ? ContainerUtil.emptyList() : List.of(rules)); }
create
267,851
ArrangementSectionRule (@Nullable String start, @Nullable String end, @NotNull List<? extends StdArrangementMatchRule> rules) { final List<StdArrangementMatchRule> matchRules = new ArrayList<>(); if (StringUtil.isNotEmpty(start)) { matchRules.add(createSectionRule(start, START_SECTION)); } matchRules.addAll(rules); if ...
create
267,852
StdArrangementMatchRule (@NotNull String comment, @NotNull ArrangementSettingsToken token) { final ArrangementAtomMatchCondition text = new ArrangementAtomMatchCondition(StdArrangementTokens.Regexp.TEXT, comment); final ArrangementMatchCondition condition = ArrangementUtil.combine(new ArrangementAtomMatchCondition(toke...
createSectionRule
267,853
String () { return myStartComment; }
getStartComment
267,854
String () { return myEndComment; }
getEndComment
267,855
int () { int factor = 31; int hash = StringUtil.notNullize(myStartComment).hashCode() + factor * StringUtil.notNullize(myEndComment).hashCode(); for (StdArrangementMatchRule rule : myMatchRules) { factor *= factor; hash += rule.hashCode() * factor; } return hash; }
hashCode
267,856
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ArrangementSectionRule section = (ArrangementSectionRule)o; if (!StringUtil.equals(myStartComment, section.myStartComment) || !StringUtil.equals(myEndComment, section.myEndComment) || myMatchRules.s...
equals
267,857
String () { if (StringUtil.isEmpty(myStartComment)) { return "Section: [" + StringUtil.join(myMatchRules, ",") + "]"; } return "Section " + "(" + myStartComment + (StringUtil.isEmpty(myEndComment) ? "" : ", " + myEndComment) + ")"; }
toString
267,858
ArrangementSectionRule () { final List<StdArrangementMatchRule> rules = new ArrayList<>(); for (StdArrangementMatchRule myMatchRule : myMatchRules) { rules.add(myMatchRule.clone()); } return new ArrangementSectionRule(myStartComment, myEndComment, rules); }
clone
267,859
ArrangementSettingsToken () { return myGroupingType; }
getGroupingType
267,860
ArrangementSettingsToken () { return myOrderType; }
getOrderType
267,861
ArrangementGroupingRule () { return new ArrangementGroupingRule(myGroupingType, myOrderType); }
clone
267,862
int () { int result = myGroupingType.hashCode(); result = 31 * result + myOrderType.hashCode(); return result; }
hashCode
267,863
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ArrangementGroupingRule rule = (ArrangementGroupingRule)o; if (myOrderType != rule.myOrderType) return false; if (!myGroupingType.equals(rule.myGroupingType)) return false; return true; }
equals
267,864
String () { return String.format("(%s, %s)", myGroupingType, myOrderType); }
toString
267,865
Set<ArrangementMatchCondition> () { return myOperands; }
getOperands
267,866
ArrangementCompositeMatchCondition (@NotNull ArrangementMatchCondition condition) { myOperands.add(condition); return this; }
addOperand
267,867
void (@NotNull ArrangementMatchCondition condition) { myOperands.remove(condition); }
removeOperand
267,868
void (@NotNull ArrangementMatchConditionVisitor visitor) { visitor.visit(this); }
invite
267,869
ArrangementCompositeMatchCondition () { ArrangementCompositeMatchCondition result = new ArrangementCompositeMatchCondition(); for (ArrangementMatchCondition operand : myOperands) { result.addOperand(operand.clone()); } return result; }
clone
267,870
int () { return myOperands.hashCode(); }
hashCode
267,871
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ArrangementCompositeMatchCondition setting = (ArrangementCompositeMatchCondition)o; return myOperands.equals(setting.myOperands); }
equals
267,872
String () { return String.format("(%s)", StringUtil.join(myOperands, " and ")); }
toString
267,873
ArrangementSettingsToken () { return myType; }
getType
267,874
Object () { return myValue; }
getValue
267,875
void (@NotNull ArrangementMatchConditionVisitor visitor) { visitor.visit(this); }
invite
267,876
int () { int result = myType.hashCode(); result = 31 * result + myValue.hashCode(); return result; }
hashCode
267,877
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ArrangementAtomMatchCondition setting = (ArrangementAtomMatchCondition)o; if (!myType.equals(setting.myType)) { return false; } if (!myValue.equals(setting.myValue)) { return false; } return true; }
equals
267,878
ArrangementAtomMatchCondition () { return new ArrangementAtomMatchCondition(myType, myValue); }
clone
267,879
String () { return getPresentableValue(); }
toString
267,880
StdArrangementExtendableSettings (@NotNull List<? extends ArrangementGroupingRule> groupingRules, @NotNull List<? extends StdArrangementMatchRule> matchRules, @NotNull Collection<? extends StdArrangementRuleAliasToken> rulesAliases) { final List<ArrangementSectionRule> sectionRules = new ArrayList<>(); for (StdArrangem...
createByMatchRules
267,881
Set<StdArrangementRuleAliasToken> () { return myRulesAliases; }
getRuleAliases
267,882
Set<StdArrangementRuleAliasToken> () { final Set<StdArrangementRuleAliasToken> definitions = new HashSet<>(); for (StdArrangementRuleAliasToken definition : myRulesAliases) { definitions.add(definition.clone()); } return definitions; }
cloneTokenDefinitions
267,883
List<ArrangementSectionRule> () { synchronized (myExtendedSectionRules) { if (myExtendedSectionRules.isEmpty()) { final Map<String, StdArrangementRuleAliasToken> tokenIdToDefinition = new HashMap<>(myRulesAliases.size()); for (StdArrangementRuleAliasToken alias : myRulesAliases) { final String id = alias.getId(); token...
getExtendedSectionRules
267,884
void (@NotNull final StdArrangementMatchRule rule, @NotNull final List<? super StdArrangementMatchRule> rules, @NotNull final Map<String, StdArrangementRuleAliasToken> tokenIdToDefinition) { final List<StdArrangementMatchRule> sequence = getRuleSequence(rule, tokenIdToDefinition); if (sequence.isEmpty()) { rules.add(ru...
appendExpandedRules
267,885
List<StdArrangementMatchRule> (@NotNull final StdArrangementMatchRule rule, @NotNull final Map<String, StdArrangementRuleAliasToken> tokenIdToDefinition) { final List<StdArrangementMatchRule> seqRule = new SmartList<>(); rule.getMatcher().getCondition().invite(new ArrangementMatchConditionVisitor() { @Override public v...
getRuleSequence
267,886
void (@NotNull ArrangementAtomMatchCondition condition) { final StdArrangementRuleAliasToken token = tokenIdToDefinition.get(condition.getType().getId()); if (token != null && !token.getDefinitionRules().isEmpty()) { seqRule.addAll(token.getDefinitionRules()); } }
visit
267,887
void (@NotNull ArrangementCompositeMatchCondition condition) { for (ArrangementMatchCondition operand : condition.getOperands()) { if (!seqRule.isEmpty()) { return; } operand.invite(this); } }
visit
267,888
ArrangementCompositeMatchCondition (final ArrangementMatchCondition original) { final ArrangementCompositeMatchCondition composite = new ArrangementCompositeMatchCondition(); original.invite(new ArrangementMatchConditionVisitor() { @Override public void visit(@NotNull ArrangementAtomMatchCondition condition) { if (!Arr...
removeAliasRuleToken
267,889
void (@NotNull ArrangementAtomMatchCondition condition) { if (!ArrangementUtil.isAliasedCondition(condition)) { composite.addOperand(condition); } }
visit
267,890
void (@NotNull ArrangementCompositeMatchCondition condition) { for (ArrangementMatchCondition c : condition.getOperands()) { c.invite(this); } }
visit
267,891
void (@NotNull StdArrangementMatchRule rule) { addSectionRule(rule); myRulesByPriority.clear(); myExtendedSectionRules.clear(); }
addRule
267,892
StdArrangementExtendableSettings () { return new StdArrangementExtendableSettings(cloneGroupings(), cloneSectionRules(), cloneTokenDefinitions()); }
clone
267,893
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; StdArrangementExtendableSettings settings = (StdArrangementExtendableSettings)o; if (!super.equals(settings)) return false; if (!myRulesAliases.equals(settings.myRulesAliases)) return false; return true; }
equals
267,894
StdArrangementTokenUiRole (@NotNull ArrangementSettingsToken token) { final StdArrangementTokenUiRole role = token instanceof StdArrangementSettingsToken ? ((StdArrangementSettingsToken)token).getTokenType().getUiRole() : null; if (role == null) { throw new IllegalArgumentException("Can't deduce UI role for token " + t...
deduceRole
267,895
List<CompositeArrangementSettingsToken> () { return myChildren; }
getChildren
267,896
ArrangementSettingsToken () { return myToken; }
getToken
267,897
StdArrangementTokenUiRole () { return myRole; }
getRole
267,898
String () { return myToken.toString() + "-" + myRole; }
toString
267,899
StdInvertibleArrangementSettingsToken (@NonNls @NotNull String id, @Nls @NotNull String displayName, @Nls @NotNull String invertedDisplayName, @NotNull StdArrangementTokenType tokenType) { return new StdInvertibleArrangementSettingsToken(id, displayName, invertedDisplayName, tokenType); }
invertibleToken