Returns the reconstructed original pattern.
@return the reconstructed original pattern
163518
String getPattern() {
        final StringBuilder result = new StringBuilder();

        if (myPrefix != null) {
            result.append(myPrefix);
        }
        if (mySuffixes != null) {
            result.append("*");
            for (final Literal sub : mySuffixes) {
                result.append(sub);
                result.append("*");
            }
        }
        if (myPostfix != null) {
            result.append(myPostfix);
        }
        return result.toString();
    }
836030
public Pattern getPattern()
	{
		if(pattern == null) {
			pattern = constructPattern();
			if (this instanceof SIFMiner && idFetcher != null && idMap != null) {
				pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getSourceLabel());
				pattern.add(new HasAnID(idFetcher, idMap), ((SIFMiner) this).getTargetLabel());
			}
			pattern.optimizeConstraintOrder();
		}
		return pattern;
	}
220453
public final DSLMapParser.pattern_return pattern() throws RecognitionException {
		DSLMapParser.pattern_return retval = new DSLMapParser.pattern_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token DOT28=null;
		Token MISC29=null;
		Token LEFT_CURLY30=null;
		Token RIGHT_CURLY32=null;
		Token LEFT_SQUARE33=null;
		Token RIGHT_SQUARE35=null;
		ParserRuleReturnScope literal27 =null;
		ParserRuleReturnScope literal31 =null;
		ParserRuleReturnScope pattern34 =null;

		Object DOT28_tree=null;
		Object MISC29_tree=null;
		Object LEFT_CURLY30_tree=null;
		Object RIGHT_CURLY32_tree=null;
		Object LEFT_SQUARE33_tree=null;
		Object RIGHT_SQUARE35_tree=null;

		try {
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:220:9: ( ( literal | DOT | MISC | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+ )
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:220:11: ( literal | DOT | MISC | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
			{
			root_0 = (Object)adaptor.nil();


			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:220:11: ( literal | DOT | MISC | LEFT_CURLY literal RIGHT_CURLY | LEFT_SQUARE pattern RIGHT_SQUARE )+
			int cnt16=0;
			loop16:
			while (true) {
				int alt16=6;
				switch ( input.LA(1) ) {
				case RIGHT_SQUARE:
					{
					int LA16_2 = input.LA(2);
					if ( (synpred24_DSLMap()) ) {
						alt16=1;
					}

					}
					break;
				case LEFT_SQUARE:
					{
					int LA16_3 = input.LA(2);
					if ( (synpred24_DSLMap()) ) {
						alt16=1;
					}
					else if ( (synpred28_DSLMap()) ) {
						alt16=5;
					}

					}
					break;
				case DOT:
					{
					alt16=2;
					}
					break;
				case MISC:
					{
					alt16=3;
					}
					break;
				case LEFT_CURLY:
					{
					alt16=4;
					}
					break;
				case COLON:
				case LITERAL:
					{
					alt16=1;
					}
					break;
				}
				switch (alt16) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:220:13: literal
					{
					pushFollow(FOLLOW_literal_in_pattern1290);
					literal27=literal();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, literal27.getTree());

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:221:13: DOT
					{
					DOT28=(Token)match(input,DOT,FOLLOW_DOT_in_pattern1304); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					DOT28_tree = (Object)adaptor.create(DOT28);
					adaptor.addChild(root_0, DOT28_tree);
					}

					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:222:13: MISC
					{
					MISC29=(Token)match(input,MISC,FOLLOW_MISC_in_pattern1318); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					MISC29_tree = (Object)adaptor.create(MISC29);
					adaptor.addChild(root_0, MISC29_tree);
					}

					}
					break;
				case 4 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:223:13: LEFT_CURLY literal RIGHT_CURLY
					{
					LEFT_CURLY30=(Token)match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_pattern1332); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					LEFT_CURLY30_tree = (Object)adaptor.create(LEFT_CURLY30);
					adaptor.addChild(root_0, LEFT_CURLY30_tree);
					}

					pushFollow(FOLLOW_literal_in_pattern1334);
					literal31=literal();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, literal31.getTree());

					RIGHT_CURLY32=(Token)match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_pattern1336); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					RIGHT_CURLY32_tree = (Object)adaptor.create(RIGHT_CURLY32);
					adaptor.addChild(root_0, RIGHT_CURLY32_tree);
					}

					}
					break;
				case 5 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:224:13: LEFT_SQUARE pattern RIGHT_SQUARE
					{
					LEFT_SQUARE33=(Token)match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_pattern1350); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					LEFT_SQUARE33_tree = (Object)adaptor.create(LEFT_SQUARE33);
					adaptor.addChild(root_0, LEFT_SQUARE33_tree);
					}

					pushFollow(FOLLOW_pattern_in_pattern1352);
					pattern34=pattern();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, pattern34.getTree());

					RIGHT_SQUARE35=(Token)match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_pattern1354); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					RIGHT_SQUARE35_tree = (Object)adaptor.create(RIGHT_SQUARE35);
					adaptor.addChild(root_0, RIGHT_SQUARE35_tree);
					}

					}
					break;

				default :
					if ( cnt16 >= 1 ) break loop16;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(16, input);
					throw eee;
				}
				cnt16++;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
513039
protected static Pattern[] commaDelimitedListToPatternArray(String commaDelimitedPatterns) {
        String[] patterns = commaDelimitedListToStringArray(commaDelimitedPatterns);
        List<Pattern> patternsList = new ArrayList<Pattern>();
        for (String pattern : patterns) {
            try {
                patternsList.add(Pattern.compile(pattern));
            } catch (PatternSyntaxException e) {
                throw new IllegalArgumentException("Illegal pattern syntax '" + pattern + "'", e);
            }
        }
        return patternsList.toArray(new Pattern[0]);
    }
1347796
public static String getRegexPattern(String original) {
    String res = original;
    res = specialCharsPattern.matcher(res).replaceAll("\\\\$1");
    res = specifierPattern.matcher(res).replaceAll("(.*){1}");
    return res;
  }
315095
public CharSequence format() {
    if (formatted == null) {
      if (!keysToValues.keySet().containsAll(keys)) {
        Set<String> missingKeys = new HashSet<String>(keys);
        missingKeys.removeAll(keysToValues.keySet());
        throw new IllegalArgumentException("Missing keys: " + missingKeys);
      }

      // Copy the original pattern to preserve all spans, such as bold, italic, etc.
      SpannableStringBuilder sb = new SpannableStringBuilder(pattern);
      for (Token t = head; t != null; t = t.next) {
        t.expand(sb, keysToValues);
      }

      formatted = sb;
    }
    return formatted;
  }
18573
public Matrix4d getRepeatTransform(int repeat){

		Matrix4d transform = new Matrix4d();
		transform.setIdentity();

		int[] counts = getAxisCounts(repeat);

		for(int t = counts.length-1; t>=0; t--) {
			if( counts[t] == 0 )
				continue;
			Matrix4d axis = new Matrix4d(axes.get(t).getOperator());
			for(int i=0;i<counts[t];i++) {
				transform.mul(axis);
			}
		}
		return transform;
	}
489586
protected String getString() {
		String result = cachedWildcardString;
		if(result == null) {
			synchronized(this) {
				result = cachedWildcardString;
				if(result == null) {
					if(!isMultiple()) {
						result = getDefaultLowerString();
					} else if(!isFullRange() || (result = getDefaultSegmentWildcardString()) == null) {
						result = getDefaultRangeString();
					}
					cachedWildcardString = result;
				}
			}
		}
		return result;
	}
1342809
public String getOriginalUrl() throws FlickrException {
        if (originalSize == null) {
            if (originalFormat != null) {
                return getOriginalBaseImageUrl() + "_o." + originalFormat;
            }
            return getOriginalBaseImageUrl() + DEFAULT_ORIGINAL_IMAGE_SUFFIX;
        } else {
            return originalSize.getSource();
        }
    }
950650
public function getOriginalData()
    {
        $data = $this->data;
        $originals = array();
        foreach ($this->getOriginalFields() as $field) {
            $key = 'original_' . $field;
            if (array_key_exists($key, $data)) {
                $originals[$field] = $data[$key];
            }
        }
        return $originals;
    }
440030
public Pattern getProcessPattern() {
        String arg = extraArgs.size() > 0 ? extraArgs.get(0) : null;
        try {
            return arg != null && getPid() == null ?
                    Pattern.compile(arg, Pattern.CASE_INSENSITIVE)
                    : null;
        } catch (PatternSyntaxException exp) {
            throw new IllegalArgumentException("Invalid pattern '" + arg + "' for matching process names", exp);
        }

    }
746793
@Requires("isValidPattern(pattern)")
  public R get(String pattern) {
    String canon = pattern.replace('/', '.');
    boolean exact = !canon.endsWith(".*");
    if (!exact) {
      canon = canon.substring(0, canon.length() - 2);
    }

    String[] parts = canon.split("\\.");
    TernaryNode current = root;
    R best = null;
    for (int i = 0; i < parts.length; ++i) {
      TernaryNode next = current.children.get(parts[i]);
      if (next == null) {
        break;
      }
      if (next.rule != null) {
        if (next.exact) {
          if (exact && i == parts.length - 1) {
            best = next.rule;
          }
        } else {
          best = next.rule;
        }
      }
      current = next;
    }
    return best;
  }
1341907
protected PrimitiveMatrix getViewReturns() {

        final int tmpRowDim = myViews.size();
        final int tmpColDim = 1;

        final PrimitiveMatrix.DenseReceiver retVal = MATRIX_FACTORY.makeDense(tmpRowDim, tmpColDim);

        double tmpRet;
        final double tmpRAF = this.getRiskAversion().doubleValue();

        for (int i = 0; i < tmpRowDim; i++) {

            tmpRet = myViews.get(i).getMeanReturn();

            retVal.set(i, 0, PrimitiveMath.DIVIDE.invoke(tmpRet, tmpRAF));
        }

        return retVal.build();
    }
806034
function _getCompoundedRegex() {
            if ($this->_regex == null) {
                for ($i = 0; $i < count($this->_patterns); $i++) {
                    $this->_patterns[$i] = '(' . str_replace(
                            array('/', '(', ')'),
                            array('\/', '\(', '\)'),
                            $this->_patterns[$i]) . ')';
                }
                $this->_regex = "/" . implode("|", $this->_patterns) . "/" . $this->_getPerlMatchingFlags();
            }
            return $this->_regex;
        }
1232127
public String toPattern() {
        // Return the original, applied pattern string, or else "".
        // Note: This does not take into account
        // - changes from setFormat() and similar methods, or
        // - normalization of apostrophes and arguments, for example,
        //   whether some date/time/number formatter was created via a pattern
        //   but is equivalent to the "medium" default format.
        if (customFormatArgStarts != null) {
            throw new IllegalStateException(
                    "toPattern() is not supported after custom Format objects "+
                    "have been set via setFormat() or similar APIs");
        }
        if (msgPattern == null) {
            return "";
        }
        String originalPattern = msgPattern.getPatternString();
        return originalPattern == null ? "" : originalPattern;
    }
1262269
public String getOriginalString() {

    if (this.string != null) {
      this.string = new String(this.buffer, this.initialOffset, getLength());
    }
    return this.string;
  }
1093886
public R getMatch() {
    for (Pattern<T, R> pattern : patterns) {
      if (pattern.matches(value)) {
        return pattern.apply(value);
      }
    }

    throw new MatchException("No match found for " + value);
  }