Process all rules in this highlighter.
@param highlights current highlights, new highlights can be added to this list however it should not be modified in any other ways
769370
public void process (HighlightTextArea textArea, Array<Highlight> highlights) {
		for (HighlightRule rule : rules) {
			rule.process(textArea, highlights);
		}
	}
1108967
private void startSliding(boolean highlight, boolean fireEvent) {
		if (highlight) {
			DOM.setElementProperty(lineElement, "className", SLIDER_LINE + " "
					+ SLIDER_LINE_SLIDING);
			DOM.setElementProperty(knobImage.getElement(), "className", SLIDER_KNOB + " "
					+ SLIDER_KNOB_SLIDING);
		}
	}
85347
function() {
			if (this.startLine !== Number.MAX_VALUE && this.endLine !== -1) {
				this.dispatchEvent({
					type: "Highlight",
					start: this.startLine,
					end: this.endLine
				});
			}
			this.startLine = Number.MAX_VALUE;
			this.endLine = -1;
		}
1035259
private void process(ImmutableSetMultimap<Class<? extends Annotation>, Element> validElements) {
    for (ProcessingStep step : steps) {
      ImmutableSetMultimap<Class<? extends Annotation>, Element> stepElements =
          new ImmutableSetMultimap.Builder<Class<? extends Annotation>, Element>()
              .putAll(indexByAnnotation(elementsDeferredBySteps.get(step), step.annotations()))
              .putAll(filterKeys(validElements, Predicates.<Object>in(step.annotations())))
              .build();
      if (stepElements.isEmpty()) {
        elementsDeferredBySteps.removeAll(step);
      } else {
        Set<? extends Element> rejectedElements = step.process(stepElements);
        elementsDeferredBySteps.replaceValues(
            step,
            transform(
                rejectedElements,
                new Function<Element, ElementName>() {
                  @Override
                  public ElementName apply(Element element) {
                    return ElementName.forAnnotatedElement(element);
                  }
                }));
      }
    }
  }
625659
private static void processNewTraceComponents() {
        if (allTraceComponentsLock.tryLock()) {
            try {
                TraceComponent tc = newTracecomponents.poll();
                while (tc != null) {
                    allTraceComponents.add(tc);
                    tc = newTracecomponents.poll();
                }
            } finally {
                allTraceComponentsLock.unlock();
            }
        }
    }
602828
public void process() {
        processOverview();
        for ( ClassDoc doc : rootDoc.classes() ) {
            packages.add(doc.containingPackage());
            processClass(doc);
        }
        for ( PackageDoc doc : packages ) {
            processPackage(doc);
        }
    }
1318663
function rule(name) {
        if (_highlight.ref === name) {
            return;
        }
        hide();
        _highlight = {type: "css", ref: name};
        RemoteAgent.call("highlightRule", name);
    }
1091693
function processRule(node, item, list) {
    var selectors = node.prelude.children;
    var declarations = node.block.children;
    var nodeCompareMarker = selectors.first().compareMarker;
    var skippedCompareMarkers = {};

    list.nextUntil(item.next, function(next, nextItem) {
        // skip non-ruleset node if safe
        if (next.type !== 'Rule') {
            return utils.unsafeToSkipNode.call(selectors, next);
        }

        if (node.pseudoSignature !== next.pseudoSignature) {
            return true;
        }

        var nextFirstSelector = next.prelude.children.head;
        var nextDeclarations = next.block.children;
        var nextCompareMarker = nextFirstSelector.data.compareMarker;

        // if next ruleset has same marked as one of skipped then stop joining
        if (nextCompareMarker in skippedCompareMarkers) {
            return true;
        }

        // try to join by selectors
        if (selectors.head === selectors.tail) {
            if (selectors.first().id === nextFirstSelector.data.id) {
                declarations.appendList(nextDeclarations);
                list.remove(nextItem);
                return;
            }
        }

        // try to join by properties
        if (utils.isEqualDeclarations(declarations, nextDeclarations)) {
            var nextStr = nextFirstSelector.data.id;

            selectors.some(function(data, item) {
                var curStr = data.id;

                if (nextStr < curStr) {
                    selectors.insert(nextFirstSelector, item);
                    return true;
                }

                if (!item.next) {
                    selectors.insert(nextFirstSelector);
                    return true;
                }
            });

            list.remove(nextItem);
            return;
        }

        // go to next ruleset if current one can be skipped (has no equal specificity nor element selector)
        if (nextCompareMarker === nodeCompareMarker) {
            return true;
        }

        skippedCompareMarkers[nextCompareMarker] = true;
    });
}
619290
function processRules(rules) {


		if (rules !== undefined) {

			rCount = rules.length;

			//reduce common declarations amongst children into parent
			if (OPTIONS.new_reduce_common_into_parent) {


				var directParents = [];
				var hierachy = [];
				var hierachyKeys = [];
				var hierachyLen = 0;
				var selectedHierachyLevel = 0;
				var commonParentsIdx = -1;
				var commonParentsKeys = [];
				var commonParents = [];
				var commonParentsLen = 0;
				var commonParent = '';
				var commonParent2 = '';
				var commonParentTotal = 0;
				var commonParentDeclarations = [];
				var commonLineage = '';
				var newParentDeclarations = [];
				var processedCommonParentsChildren = [];
				var classLineage = '';
				var parentClassLineage = '';
				var lineageLabel = '';
				var tmpDeclarations = [];

				for (i = 0; i < rCount; ++i) {

					///rules
					//group classes - create hierarchy
					if (rules[i].selectors !== undefined) {
						for (j = 0; j < rules[i].selectors.length; j++) { //each comma delimited
							
							if (rules[i].selectors[j].indexOf('.') != -1) {

								classLineage = rules[i].selectors[j].split(' ');
								parentClassLineage = classLineage.slice(0); //clone
								parentClassLineage.pop();
								parentClassLineage = parentClassLineage.join(' ');

								if (parentClassLineage !== undefined && parentClassLineage != '') {

									if (directParents[parentClassLineage] !== undefined) {
										directParents[parentClassLineage].push({
											selector: rules[i].selectors[j],
											index: i
										});
									} else {
										directParents[parentClassLineage] = [{
											selector: rules[i].selectors[j],
											index: i
										}];	
									}
									
								}


								for (k = 0; k < classLineage.length; k++) { //depth of hierachy

									if (k > 0) {
										lineageLabel = '';

										for (l = k; l > 0; l--) {
											lineageLabel += classLineage[k-l] + ' ';	
										}
										lineageLabel += classLineage[k];	

										if (hierachy[lineageLabel] === undefined) {
											hierachy[lineageLabel] = 0;
										}

										hierachy[lineageLabel] += 1;

									} else {

										if (hierachy[classLineage[k]] === undefined) {
											hierachy[classLineage[k]] = 0;
										}

										hierachy[classLineage[k]] += 1;
									}
								} //end of for
							} //end of if
						} //end of for
					}
				}

				function sortHierachy(obj) {
					var keys = Object.keys(obj);
					keys.sort(function(a,b){return b.length-a.length})
					hierachy = [];
					for (i = 0; i < keys.length; i++) {

						hierachy[keys[i]] = obj[keys[i]];


						Object.keys(directParents).forEach(function(key, index, val) {
						  
						  if (this[key].length > 1) {
							  for (j = 0; j < this[key].length; j++) {

							  	if (keys[i] == this[key][j].selector) {

								  	if (OPTIONS.verbose) { console.log(success('Process - Rules - Group Common Parent Rule : ' + keys[i] ));}
								  	commonParentsKeys.push({
								  		selector: key,
								  		index: this[key][j].index,
								  		childSelector: keys[i]
								  	});
								  }
							  }
							}

						}, directParents);
					}
					return hierachy;
				}
				sortHierachy(hierachy);
				hierachyKeys = Object.keys(hierachy);
				hierachyLen = hierachyKeys.length;
				selectedHierachyLevel = 0;
				commonParentsLen = commonParentsKeys.length;

				// get declarations
				for (i = 0; i < commonParentsKeys.length; i++) {

					if (rules[commonParentsKeys[i].index].declarations !== undefined) {

						for (j = 0; j < rules[commonParentsKeys[i].index].declarations.length; j++) {

							if (commonParentDeclarations[rules[commonParentsKeys[i].index].declarations[j].property + '_' + rules[commonParentsKeys[i].index].declarations[j].value] !== undefined) {

								commonParentDeclarations[rules[commonParentsKeys[i].index].declarations[j].property + '_' + rules[commonParentsKeys[i].index].declarations[j].value].count += 1;

							} else {
								commonParentDeclarations[rules[commonParentsKeys[i].index].declarations[j].property + '_' + rules[commonParentsKeys[i].index].declarations[j].value] = {

									property: rules[commonParentsKeys[i].index].declarations[j].property,
									value: rules[commonParentsKeys[i].index].declarations[j].value,
									count: 1,
									selector: rules[commonParentsKeys[i].index].selectors,
									selectorIndex: commonParentsKeys[i].index,
									commonParent: commonParentsKeys[i].selector
								};
							}
						}

					}

				}

				Object.keys(commonParentDeclarations).forEach(function(val, index, key) {

					if (this[val].count == directParents[this[val].commonParent].length) {

						if (newParentDeclarations[this[val].commonParent] !== undefined) {
							newParentDeclarations[this[val].commonParent].declarations.push({
								type: 'declaration',
								property: this[val].property,
								value: this[val].value
							});
						} else {
							newParentDeclarations[this[val].commonParent] = {
								declarations: [{
									type: 'declaration',
									property: this[val].property,
									value: this[val].value
								}],
								selectorIndex: this[val].selectorIndex
							};
						}

						commonParents.push(this[val].commonParent);
					}

				}, commonParentDeclarations);


				commonParentsLen = commonParentsKeys.length;

				for (i = 0; i < commonParentsLen; i++) {

					Object.keys(newParentDeclarations).forEach(function(key, index) {

						if (commonParentsKeys[i] !== undefined && commonParentsKeys[i].selector == key) {

						  if (rules[commonParentsKeys[i].index] !== undefined && rules[commonParentsKeys[i].index].declarations !== undefined) {
						  	
						  	//clone declarations
						  	tmpDeclarations = rules[commonParentsKeys[i].index].declarations.slice(0); //clone
						  	dCount = tmpDeclarations.length;
							  
						  	for (j = 0; j < this[key].declarations.length; j++) { //each parent declaration

							  	//remove declarations
							  	for (k = 0; k < dCount; k++) { //each child declaration

							  		if (
							  			this[key].declarations[j] !== undefined
							  			&& this[key].declarations[j].type == 'declaration'
							  			&& this[key].declarations[j].property == tmpDeclarations[k].property
							  			&& this[key].declarations[j].value == tmpDeclarations[k].value
							  		) {
							  			tmpDeclarations.splice(k, 1); 
							  			k -= 1;
							  			dCount-=1;
							  		}
							  	} //end of k loop

							  } //end of j loop
							  
							  if (tmpDeclarations.length == 0) {

							  	//remove whole rule
							  	rules.splice(commonParentsKeys[i].index, 1);
							  	i-=1;
							  	commonParentsLen-=1;

							  } else {
							  	//update declarations
							  	rules[commonParentsKeys[i].index].declarations = tmpDeclarations;
							  }
								  	
						  }
						}
					  
					}, newParentDeclarations);
				} //end of i loop

				//Create Common Parents
				Object.keys(newParentDeclarations).forEach(function(key, index) {
				  
				  rules.splice( ((this[key].selectorIndex-1 < 0) ? this[key].selectorIndex : this[key].selectorIndex-1), 0, {
						type : 'rule',
						selectors: [key],
						declarations: this[key].declarations
					});

				}, newParentDeclarations);

				//some cleanup
				directParents = [];
				hierachy = [];
				hierachyKeys = [];
				commonParentsKeys = [];
				commonParents = [];
				commonParentDeclarations = [];
				newParentDeclarations = [];
				processedCommonParentsChildren = [];
				tmpDeclarations = [];
				
				//reset rules count
				rCount = rules.length;

			} //end of reduce common declarations amongst children into parent





			for (i = 0; i < rCount; ++i) {

				////comments
				//checking declarations for comments
				if (rules[i] !== undefined && rules[i].declarations !== undefined) {
					declarations = rules[i].declarations;
					dCount = declarations.length;

					for (j = 0; j < dCount; ++j) {

						//check for empty properties
						if (rules[i].declarations[j].value == '') {
							summary.empty_declarations.push({
								'selectors': rules[i].selectors,
								'property': rules[i].declarations[j]
							});
						}

						//remove comments in declarations - for turning off comments
						if (OPTIONS.trim_comments || OPTIONS.trim) {
							if (declarations[j] !== undefined && declarations[j].type == 'comment') {
								if (OPTIONS.verbose) { console.log(info('Process - Rules - Remove Comment')); }
								rules[i].declarations.splice(j, 1);
								j-=1;
								dCount-=1;
							}
						}
					}
				}

				//remove comments in root - for turning off comments
				if (OPTIONS.trim_comments || OPTIONS.trim) {
					if (rules[i] !== undefined && rules[i].type == 'comment') {
						if (OPTIONS.verbose) { console.log(info('Process - Rules - Remove Comment')); }
						rules.splice(i, 1);
						i-=1;
						rCount-=1;
					}
				}
				////end of comments


				////rules
				//remove duplicate root rules
				for (j = i+1; j < rCount; ++j) {
					// console.log(j, rCount)
					//root rules
					//rule selector
					if (rules[i] !== undefined 
						// && rules[i].type == 'rule'
						&& rules[i].selectors !== undefined 
						&& rules[j] !== undefined && rules[j].selectors !== undefined) {

						//duplicate rule found
						if (rules[i].selectors.toString() == rules[j].selectors.toString()) {

							//remove previous comment in root
							if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
								if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {

									rules.splice(i-1, 1);
									i-=1;
									j-=1;
									rCount-=1;
								}
							}

							if (OPTIONS.verbose) { console.log(success('Process - Rules - Group Duplicate Rule : ' + (rules[j].selectors ? rules[j].selectors.join(', ') : '')));}

							//copy + reduce
							summary.stats.summary.noDuplicateRules += 1;
							if ( j < i && (j-i) > 1 ) { //check comparison distance
								summary.duplicate_rules.push({
									'selectors': (rules[i].type == 'page') ? '@page' : rules[i].selectors,
									'position': rules[i].position
								});
								rules[j].declarations = rules[j].declarations.concat(rules[i].declarations);
								rules.splice(i, 1);
							} else {
								summary.duplicate_rules.push({
									'selectors': (rules[j].type == 'page') ? '@page' : rules[j].selectors,
									'position': rules[j].position
								});
								rules[i].declarations = rules[i].declarations.concat(rules[j].declarations);
								rules.splice(j, 1);
							}
							i-=1;
							j-=1;
							rCount-=1;				

						}
					} //end of rule selector

					//media selector - it could affect evaluation sequence
					if (rules[i] !== undefined && rules[i].type == 'media' 
						&& rules[i].media !== undefined 
						&& rules[j] !== undefined && rules[j].media !== undefined
						&& OPTIONS.bypass_media_rules != true
					) {

						//duplicate rule found
						if (rules[i].media.toString() == rules[j].media.toString()) {

							//remove previous comment in root
							if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
								if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {

									rules.splice(i-1, 1);
									i-=1;
									j-=1;
									rCount-=1;
								}
							}

							if (OPTIONS.verbose) { console.log(info('Process - Rules - @media - Group Duplicate Rule : ' + (rules[j].selectors ? rules[j].selectors.join(', ') : ''))); }

							//copy + reduce
							summary.stats.summary.noDuplicateRules += 1;
							if ( j < i && (j-i) > 1 ) { //check comparison distance
								summary.duplicate_rules.push({
									'selectors': '@media ' + rules[i].media,
									'position': rules[i].position
								});
								rules[j].rules = rules[j].rules.concat(rules[i].rules);
								rules.splice(i, 1);
							} else {
								summary.duplicate_rules.push({
									'selectors': '@media ' + rules[j].media,
									'position': rules[j].position
								});
								rules[i].rules = rules[i].rules.concat(rules[j].rules);
								rules.splice(j, 1);
							}
							i-=1;
							j-=1;
							rCount-=1;
						}
					} 
					//end of media selector

					//document selector
					if (rules[i] !== undefined && rules[i].type == 'document' 
						&& rules[i].document !== undefined 
						&& rules[j] !== undefined && rules[j].document !== undefined) {

						//duplicate rule found
						if (rules[i].document.toString() == rules[j].document.toString()) {

							//remove previous comment in root
							if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
								if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {

									rules.splice(i-1, 1);
									i-=1;
									j-=1;
									rCount-=1;
								}
							}

							if (OPTIONS.verbose) { console.log(success('Process - Rules - @document - Group Duplicate Rule : ' + (rules[j].selectors ? rules[j].selectors.join(', ') : ''))); }

							//copy + reduce
							summary.stats.summary.noDuplicateRules += 1;
							if ( j < i && (j-i) > 1 ) { //check comparison distance
								summary.duplicate_rules.push({
									'selectors': '@document ' + rules[i].document,
									'position': rules[i].position
								});
								rules[j].rules = rules[j].rules.concat(rules[i].rules);
								rules.splice(i, 1);
							} else {
								summary.duplicate_rules.push({
									'selectors': '@document ' + rules[j].document,
									'position': rules[j].position
								});
								rules[i].rules = rules[i].rules.concat(rules[j].rules);
								rules.splice(j, 1);
							}
							i-=1;
							j-=1;
							rCount-=1;
							
						}
					} //end of document selector

					//supports selector
					if (rules[i] !== undefined && rules[i].type == 'supports' 
						&& rules[i].supports !== undefined 
						&& rules[j] !== undefined && rules[j].supports !== undefined) {

						//duplicate rule found
						if (rules[i].supports.toString() == rules[j].supports.toString()) {

							//remove previous comment in root
							if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
								if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {

									rules.splice(i-1, 1);
									i-=1;
									j-=1;
									rCount-=1;
								}
							}

							
							if (OPTIONS.verbose) { console.log(success('Process - Rules - @supports - Group Duplicate Rule : ' + (rules[j].supports ? rules[j].supports : ''))); }

							//copy + reduce
							summary.stats.summary.noDuplicateRules += 1;
							if ( j < i && (j-i) > 1 ) { //check comparison distance
								summary.duplicate_rules.push({
									'selectors': '@supports ' + rules[i].supports,
									'position': rules[i].position
								});
								rules[j].rules = rules[j].rules.concat(rules[i].rules);
								rules.splice(i, 1);
							} else {
								summary.duplicate_rules.push({
									'selectors': '@supports ' + rules[j].supports,
									'position': rules[j].position
								});
								rules[i].rules = rules[i].rules.concat(rules[j].rules);
								rules.splice(j, 1);
							}
							i-=1;
							j-=1;
							rCount-=1;
							

						}
					} //end of supports selector



				} //end of j
				////end of rules


				////declarations
				//reduce root delcarations by property name and by duplicate values
				if (rules[i] !== undefined 
					&& (rules[i].type == 'rule' || (rules[i].type == 'page' && OPTIONS.bypass_page_rules == false))
				) {

					declarationsNameCounts = [];

					dCount = rules[i].declarations.length;

					//declarations duplicate check
					for (l = 0; l < dCount; ++l) {

						if (rules[i].declarations[l].type == 'declaration') {
							if (declarationsNameCounts[rules[i].declarations[l].property] !== undefined) {
								declarationsNameCounts[rules[i].declarations[l].property] += 1;
							} else {
								declarationsNameCounts[rules[i].declarations[l].property] = 1;
							}
						}
					} //end of declarations duplicate check


					//reduce according to values
					declarationsValueCounts = [];
					valKey = '';
					//detect duplicate values
					for (key in declarationsNameCounts) {

			      if (!reduceRulesListName.includes(key)) { //only properties not in list


							for (l = 0; l < dCount; ++l) {

								if (
									rules[i].declarations[l].type == 'declaration'
									&& rules[i].declarations[l].property == key
								) {
									hash = crypto.createHash('sha256');
									hash.update(rules[i].declarations[l].property + rules[i].declarations[l].value);
									
									valKey = hash.digest('hex');

									if (declarationsValueCounts[valKey] !== undefined) {
										declarationsValueCounts[valKey].id += ',' + l;
										declarationsValueCounts[valKey].count += 1;
									} else {
										declarationsValueCounts[valKey] = {
											id : l,
											count : 1
										}
									}
								}
							}
			      }
			    }

			    //remove duplicate declarations by duplicate values
			    declarationsValueCountsCount = Object.keys(declarationsValueCounts).length;

			    amountRemoved = 1;

					for (key in declarationsValueCounts) {
			      if (declarationsValueCounts.hasOwnProperty(key)) {


			      	if (declarationsValueCounts[key].count > 1) {
			      		duplicate_ids = declarationsValueCounts[key].id.split(',');

			      		amountRemoved = 1; //shift the ids by the amount removed
								for (l = 0; l < duplicate_ids.length-1; ++l) { // -1 to leave last behind

									//remove previous comment above declaration to be removed
									if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {

										if (rules[i].declarations[duplicate_ids[l]-1] !== undefined && rules[i].declarations[duplicate_ids[l]-1].type == 'comment') {

											rules[i].declarations.splice(duplicate_ids[l]-1, 1);
											dCount-=1;

											//adjust removal ids by amount already removed
											if (duplicate_ids[l] !== undefined) {
												duplicate_ids[l] -= amountRemoved; //shift the ids by the amount removed
											}
											amountRemoved += 1;
										}
									}

									if (OPTIONS.verbose) { console.log(success('Process - Declaration - Group Duplicate Declarations : ' + (rules[i].selectors ? rules[i].selectors.join(', ') : '') + ' - ' + (rules[i].declarations[l]!==undefined?rules[i].declarations[l].property:''))); }

									summary.duplicate_declarations.push(rules[i].declarations[duplicate_ids[l]]);
									summary.stats.summary.noDuplicateDeclarations += 1;
									rules[i].declarations.splice(duplicate_ids[l], 1);
									dCount-=1;

									//adjust removal ids by amount already removed
									if (duplicate_ids[l+1] !== undefined) {
										duplicate_ids[l+1] -= amountRemoved; //shift the ids by the amount removed

										//shift all the ids of the declarations afterwards
										for (key2 in declarationsValueCounts) {
											if (declarationsValueCounts.hasOwnProperty(key2) && (key2 != key)) {

												if (typeof declarationsValueCounts[key2].id == 'number') {
													duplicate_ids = [];
													duplicate_ids[0] = declarationsValueCounts[key2].id;
												} else {
													duplicate_ids = declarationsValueCounts[key2].id.split(',');	
												}
							      		
							      		for (l = 0; l < duplicate_ids.length; ++l) {
							      			
													if (duplicate_ids[l] !== undefined) {
								      			duplicate_ids[l] -= amountRemoved;
								      		}
							      		}
							      		declarationsValueCounts[key2].id = duplicate_ids.join();
											}
										}
										//end of shifting all ids

									}
									amountRemoved += 1;
								}

				      } //end of if
			      } //end of if
			    } //end of for in
					//end of reduce according to values

					for (k = 0; k < reduceRulesListNameCount; ++k) {

						//declarations reduction
						for (key in declarationsNameCounts) {
				      if (declarationsNameCounts.hasOwnProperty(key)) {

								if (declarationsNameCounts[key] > 1) {

									for (l = 0; l < dCount; ++l) {
										if (rules[i].declarations[l].type == 'declaration') {

											if (
												rules[i].declarations[l].property == key 
												&& declarationsNameCounts[key] > 1 //leave behind 1
											) {

												//reduce according to list
												if (rules[i].declarations[l].property == reduceRulesListName[k]) { 
													
													// console.log(declarationsNameCounts[key])
													// console.log(key)
													// console.log(rules[i].declarations[l].property)
													// console.log(reduceRulesListName[k])

													//remove previous comment above declaration to be removed
													if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
														if (rules[i].declarations[l-1] !== undefined && rules[i].declarations[l-1].type == 'comment') {

															rules[i].declarations.splice(l-1, 1);
															l-=1;
															dCount-=1;
														}
													}

													if (OPTIONS.verbose) { console.log(success('Process - Declaration - Group Duplicate Declarations : ' + (rules[i].selectors ? rules[i].selectors.join(', ') : '') + ' - ' + (rules[i].declarations[l]!==undefined?rules[i].declarations[l].property:''))); }

													// console.log(rules[i].declarations[l].value.indexOf('!important') !== -1)
													// console.log(rules[i].declarations[l].value)
													// console.log(rules[i].declarations[l+1].value)

													//prioritises !important declarations
													if (rules[i].declarations[l].value.indexOf('!important') !== -1) {
														
														summary.duplicate_declarations.push(rules[i].declarations[l+1]);
														summary.stats.summary.noDuplicateDeclarations += 1;
														rules[i].declarations.splice(l+1, 1);

													} else {

														summary.duplicate_declarations.push(rules[i].declarations[l]);
														summary.stats.summary.noDuplicateDeclarations += 1;
														rules[i].declarations.splice(l, 1);
													}

													l-=1;
													dCount-=1;
													declarationsNameCounts[key] -= 1;
												}
											}
										}
									}
								}
							}
						}
					} //end of reduce root declarations by property name

				} //end of rule check



				//reduce root declarations by selector
				selectorPropertiesList = [];
				declarationsCounts = [];
				for (k = 0; k < reduceRulesListSelectorCount; ++k) {

					if (rules[i] !== undefined 
						&& rules[i].type == 'rule'
					) {

						if (rules[i].selectors !== undefined && rules[i].selectors.toString() === reduceRulesListSelector[k]) {
						
							dCount = rules[i].declarations.length;

							//detect declarations duplicates
							for (l = 0; l < dCount; ++l) {
								if (rules[i].declarations[l].type == 'declaration'
								) {
									if (declarationsCounts[rules[i].declarations[l].property] !== undefined) {
										declarationsCounts[rules[i].declarations[l].property] += 1;
									} else {
										declarationsCounts[rules[i].declarations[l].property] = 1;
									}
								}
							} //end of declarations duplicate check

							// declarations reduction
							for (key in declarationsCounts) {
					      if (declarationsCounts.hasOwnProperty(key)) {

									if (declarationsCounts[key] > 1) {

										for (l = 0; l < dCount; ++l) {
											if (rules[i].declarations[l].type == 'declaration') {

												selectorPropertiesList = reduceRulesListSelectorPName[reduceRulesListSelector[k]];
												
												if (selectorPropertiesList !== undefined) { //specific in selector

													if (rules[i].declarations[l].property == key 
														&& (selectorPropertiesList.indexOf(rules[i].declarations[l].property) != -1)
														&& declarationsCounts[key] > 1) { //leave behind 1

														//remove previous comment above declaration to be removed
														if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
															if (rules[i].declarations[l-1] !== undefined && rules[i].declarations[l-1].type == 'comment') {

																rules[i].declarations.splice(l-1, 1);
																l-=1;
																dCount-=1;
															}
														}

														if (OPTIONS.verbose) { console.log(success('Process - Declaration - Group Duplicate Declarations : ' + (rules[i].selectors ? rules[i].selectors.join(', ') : '') + ' - ' + (rules[i].declarations[l]!==undefined?rules[i].declarations[l].property:''))); }
														summary.duplicate_declarations.push(rules[i].declarations[l]);
														summary.stats.summary.noDuplicateDeclarations += 1;
														rules[i].declarations.splice(l, 1);
														l-=1;
														dCount-=1;
														declarationsCounts[key] -= 1;
													}

												} else { //all in selector

													if (rules[i].declarations[l].property == key 
														&& declarationsCounts[key] > 1) { //leave behind 1

														//remove previous comment above declaration to be removed
														if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
															if (rules[i].declarations[l-1] !== undefined && rules[i].declarations[l-1].type == 'comment') {

																rules[i].declarations.splice(l-1, 1);
																l-=1;
																dCount-=1;
															}
														}

														if (OPTIONS.verbose) { console.log(success('Process - Declaration - Group Duplicate Declarations : ' + (rules[i].selectors ? rules[i].selectors.join(', ') : '') + ' - ' + (rules[i].declarations[l]!==undefined?rules[i].declarations[l].property:''))); }
														summary.duplicate_declarations.push(rules[i].declarations[l]);
														summary.stats.summary.noDuplicateDeclarations += 1;
														rules[i].declarations.splice(l, 1);
														l-=1;
														dCount-=1;
														declarationsCounts[key] -= 1;
													}
												}
											}
										}
									}

					      }
					    } //end of declarations reduction

						} //end of if
					} //end of if				
				} //end of reduce root declarations by selector

				////end of declarations




				////empty nodes
				//remove empty @sign keyframes
				if (rules[i] != undefined && rules[i].keyframes !== undefined && rules[i].keyframes.length == 0) {

					//remove previous comment in root
					if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
						if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {
							if (OPTIONS.verbose) { console.log(info('Process - @keyframes - Remove comment : ' + (rules[i].keyframes ? rules[i].keyframes.join(', ') : ''))); }
							rules.splice(i-1, 1);
							i-=1;
							rCount-=1;
						}
					}
					
					if (OPTIONS.verbose) { console.log(info('Process - @keyframes - Remove Empty Rule : ' + (rules[i].keyframes ? rules[i].keyframes.join(', ') : ''))); }

					rules.splice(i, 1);
					i-=1;
					rCount-=1;
				}

				//remove empty @sign media
				if (rules[i] !== undefined && rules[i].type == 'media' 
					&& rules[i].rules.length == 0) {

					//remove previous comment in root
					if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
						if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {
							if (OPTIONS.verbose) { console.log(info('Process - @media - Remove comment : ' + (rules[i].media ? rules[i].media : ''))); }
							rules.splice(i-1, 1);
							i-=1;
							rCount-=1;
						}
					}
					if (OPTIONS.verbose) { console.log(info('Process - @media - Remove Empty Rule : ' + (rules[i].media ? rules[i].media : ''))); }
					rules.splice(i, 1);
					i-=1;
					rCount-=1;
				}

				//remove empty @sign document
				if (rules[i] !== undefined && rules[i].type == 'document' 
					&& rules[i].rules.length == 0) {

					//remove previous comment in root
					if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
						if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {
							if (OPTIONS.verbose) { console.log(info('Process - @document - Remove comment : ' + (rules[i].document ? rules[i].document : ''))); }
							rules.splice(i-1, 1);
							i-=1;
							rCount-=1;
						}
					}

					if (OPTIONS.verbose) { console.log(info('Process - @document - Remove Empty Rule : ' + (rules[i].document ? rules[i].document : ''))); }
					rules.splice(i, 1);
					i-=1;
					rCount-=1;
				}

				//remove empty @sign supports
				if (rules[i] !== undefined && rules[i].type == 'supports' 
					&& rules[i].rules.length == 0) {

					//remove previous comment in root
					if (OPTIONS.trim_removed_rules_previous_comment || OPTIONS.trim) {
						if (rules[i-1] !== undefined && rules[i-1].type == 'comment') {
							if (OPTIONS.verbose) { console.log(info('Process - @supports - Remove comment : ' + (rules[i].supports ? rules[i].supports : ''))); }
							rules.splice(i-1, 1);
							i-=1;
							rCount-=1;
						}
					}

					if (OPTIONS.verbose) { console.log(info('Process - @supports - Remove Empty Rule : ' + (rules[i].supports ? rules[i].supports : ''))); }
					rules.splice(i, 1);
					i-=1;
					rCount-=1;
				}
				////end of empty nodes



			} //end of i

		} //end of undefined
	}
698812
public static void processRuleElement(ParserContext context, ConfigurationRuleBuilder rule, Element element)
    {
        String id = $(element).attr("id");

        List<Element> children = $(element).children().get();
        for (Element child : children)
        {
            Object result = context.processElement(child);

            switch ($(child).tag())
            {
            case "when":
                rule.when(((Condition) result));
                break;

            case "perform":
                rule.perform(((Operation) result));
                break;

            case "otherwise":
                rule.otherwise(((Operation) result));
                break;

            case "where":
                break;
            }
        }

        if (StringUtils.isNotBlank(id))
        {
            rule.withId(id);
        }

    }
1006667
@Override protected void handleEvents(final String EVENT_TYPE) {
        super.handleEvents(EVENT_TYPE);
        if ("VISIBILITY".equals(EVENT_TYPE)) {
            title.setVisible(clock.isTitleVisible());
            title.setManaged(clock.isTitleVisible());
            text.setVisible(clock.isTextVisible());
            text.setManaged(clock.isTextVisible());
            dateText.setVisible(clock.isDateVisible());
            dateText.setManaged(clock.isDateVisible());
            dateNumber.setVisible(clock.isDateVisible());
            dateNumber.setManaged(clock.isDateVisible());
            second.setVisible(clock.isSecondsVisible());
            second.setManaged(clock.isSecondsVisible());
        } else if ("SECTION".equals(EVENT_TYPE)) {
            sections          = clock.getSections();
            highlightSections = clock.isHighlightSections();
            sectionsVisible   = clock.getSectionsVisible();
            areas             = clock.getAreas();
            highlightAreas    = clock.isHighlightAreas();
            areasVisible      = clock.getAreasVisible();
            redraw();
        }
    }
884989
@Override
    public void highlight(StringBuilder out, List<String> lines, String meta) {
        out.append("<pre");
        if (StringUtils.isNotBlank(meta)) {
            out.append(" class='brush:" + meta + "'");
        }
        out.append(">");
        for (String line : lines) {
            for (int i = 0; i < line.length(); i++) {
                final char c;
                switch (c = line.charAt(i)) {
                    case '&':
                        out.append("&amp;");
                        break;
                    case '<':
                        out.append("&lt;");
                        break;
                    case '>':
                        out.append("&gt;");
                        break;
                    default:
                        out.append(c);
                        break;
                }
            }
            out.append('\n');
        }
        out.append("</pre>");
    }
706027
static void removeHighlights(
        JTextComponent textComponent, Iterable<?> highlights)
    {
        Highlighter highlighter = textComponent.getHighlighter();
        for (Object highlight : highlights)
        {
            highlighter.removeHighlight(highlight);
        }
    }
220798
public void setHighlightAreas(final boolean HIGHLIGHT) {
        if (null == highlightAreas) {
            _highlightAreas = HIGHLIGHT;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            highlightAreas.set(HIGHLIGHT);
        }
    }
61187
function(node) {
      sre.HighlighterFactory.addEvents(
          node,
          {'mouseover': Explorer.MouseOver,
            'mouseout': Explorer.MouseOut},
          {renderer: MathJax.Hub.outputJax['jax/mml'][0].id,
            browser: MathJax.Hub.Browser.name}
      );
    }
806445
protected function _highlightMatches(Zend_Search_Lucene_Search_Highlighter_Interface $highlighter)
    {
        foreach ($this->_subqueries as $id => $subquery) {
            if ($this->_signs === null  ||  $this->_signs[$id] !== false) {
                $subquery->_highlightMatches($highlighter);
            }
        }
    }
108565
public void processUpdates(FacesContext context) {

        if (context == null) {
            throw new NullPointerException();
        }
        if (!isSubmitted()) {
            return;
        }

        // Process all facets and children of this component
        Iterator kids = getFacetsAndChildren();
        while (kids.hasNext()) {
            UIComponent kid = (UIComponent) kids.next();
            kid.processUpdates(context);
        }

    }