text:
import { equals } from 'vs/base/common/arrays';
import { UriComponents } from 'vs/base/common/uri';
import { escapeIcons } from 'vs/base/common/iconLabels';
import { illegalArgument } from 'vs/base/common/errors';

export interface IMarkdownString {
	readonly value: string;
	readonly isTrusted?: boolean;
	readonly supportThemeIcons?: boolean;
	uris?: { [href: string]: UriComponents };
}

export const enum MarkdownStringTextNewlineStyle {
	Paragraph = 0,
	Break = 1,
}

export class MarkdownString implements IMarkdownString {

	public value: string;
	public isTrusted?: boolean;
	public supportThemeIcons?: boolean;

	constructor(
		value: string = '',
		isTrustedOrOptions: boolean | { isTrusted?: boolean, supportThemeIcons?: boolean } = false,
	) {
		this.value = value;
		if (typeof this.value !== 'string') {
			throw illegalArgument('value');
		}

		if (typeof isTrustedOrOptions === 'boolean') {
			this.isTrusted = isTrustedOrOptions;
			this.supportThemeIcons = false;
		}
		else {
			this.isTrusted = isTrustedOrOptions.isTrusted ?? undefined;
			this.supportThemeIcons = isTrustedOrOptions.supportThemeIcons ?? false;
		}
	}

	appendText(value: string, newlineStyle: MarkdownStringTextNewlineStyle = MarkdownStringTextNewlineStyle.Paragraph): MarkdownString {
		this.value += escapeMarkdownSyntaxTokens(this.supportThemeIcons ? escapeIcons(value) : value)
			.replace(/([ \t]+)/g, (_match, g1) => ' '.repeat(g1.length))
			.replace(/^>/gm, '\\>')
			.replace(/\n/g, newlineStyle === MarkdownStringTextNewlineStyle.Break ? '\\\n' : '\n\n');

		return this;
	}

	appendMarkdown(value: string): MarkdownString {
		this.value += value;
		return this;
	}

	appendCodeblock(langId: string, code: string): MarkdownString {
		this.value += '\n```';
		this.value += langId;
		this.value += '\n';
		this.value += code;
		this.value += '\n```\n';
		return this;
	}
}

export function isEmptyMarkdownString(oneOrMany: IMarkdownString | IMarkdownString[] | null | undefined): boolean {
	if (isMarkdownString(oneOrMany)) {
		return !oneOrMany.value;
	} else if (Array.isArray(oneOrMany)) {
		return oneOrMany.every(isEmptyMarkdownString);
	} else {
		return true;
	}
}

export function isMarkdownString(thing: any): thing is IMarkdownString {
	if (thing instanceof MarkdownString) {
		return true;
	} else if (thing && typeof thing === 'object') {
		return typeof (<IMarkdownString>thing).value === 'string'
			&& (typeof (<IMarkdownString>thing).isTrusted === 'boolean' || (<IMarkdownString>thing).isTrusted === undefined)
			&& (typeof (<IMarkdownString>thing).supportThemeIcons === 'boolean' || (<IMarkdownString>thing).supportThemeIcons === undefined);
	}
	return false;
}

export function markedStringsEquals(a: IMarkdownString | IMarkdownString[], b: IMarkdownString | IMarkdownString[]): boolean {
	if (!a && !b) {
		return true;
	} else if (!a || !b) {
		return false;
	} else if (Array.isArray(a) && Array.isArray(b)) {
		return equals(a, b, markdownStringEqual);
	} else if (isMarkdownString(a) && isMarkdownString(b)) {
		return markdownStringEqual(a, b);
	} else {
		return false;
	}
}

function markdownStringEqual(a: IMarkdownString, b: IMarkdownString): boolean {
	if (a === b) {
		return true;
	} else if (!a || !b) {
		return false;
	} else {
		return a.value === b.value && a.isTrusted === b.isTrusted && a.supportThemeIcons === b.supportThemeIcons;
	}
}

export function escapeMarkdownSyntaxTokens(text: string): string {
	// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
	return text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
}

export function removeMarkdownEscapes(text: string): string {
	if (!text) {
		return text;
	}
	return text.replace(/\\([\\`*_{}[\]()#+\-.!])/g, '$1');
}

export function parseHrefAndDimensions(href: string): { href: string, dimensions: string[] } {
	const dimensions: string[] = [];
	const splitted = href.split('|').map(s => s.trim());
	href = splitted[0];
	const parameters = splitted[1];
	if (parameters) {
		const heightFromParams = /height=(\d+)/.exec(parameters);
		const widthFromParams = /width=(\d+)/.exec(parameters);
		const height = heightFromParams ? heightFromParams[1] : '';
		const width = widthFromParams ? widthFromParams[1] : '';
		const widthIsFinite = isFinite(parseInt(width));
		const heightIsFinite = isFinite(parseInt(height));
		if (widthIsFinite) {
			dimensions.push(`width="${width}"`);
		}
		if (heightIsFinite) {
			dimensions.push(`height="${height}"`);
		}
	}
	return { href, dimensions };
}


text:
package org.grobid.trainer;

import java.io.*;

import org.chasen.crfpp.CRFPPTrainer;
import org.chasen.crfpp.Tagger;
import org.grobid.core.GrobidModels;
import org.grobid.core.engines.AbstractParser;
import org.grobid.core.exceptions.GrobidException;
import org.grobid.core.factory.GrobidFactory;
import org.grobid.core.utilities.GrobidProperties;
import org.grobid.trainer.evaluation.EvaluationUtilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * User: zholudev Date: 11/21/11 Time: 2:25 PM
 */
public abstract class AbstractTrainer implements Trainer {
	private static final Logger LOGGER = LoggerFactory.getLogger(AbstractTrainer.class);
	public static final String OLD_MODEL_EXT = ".old";
	public static final String NEW_MODEL_EXT = ".new";

	protected final CRFPPTrainer crfppTrainer;

	protected GrobidModels model;
	private File trainDataPath;
	private File evalDataPath;
	private Tagger tagger;

	public AbstractTrainer(final GrobidModels model) {
		GrobidFactory.getInstance().createEngine();
		crfppTrainer = new CRFPPTrainer();
		this.model = model;
		this.trainDataPath = getTempTrainingDataPath();
		this.evalDataPath = getTempEvaluationDataPath();
	}

	@Override
	public void train() {
		final File dataPath = trainDataPath;
		createCRFPPData(getCorpusPath(), dataPath);
		final File tempModelPath = new File(GrobidProperties.getModelPath(model).getAbsolutePath() + NEW_MODEL_EXT);
		final File oldModelPath = GrobidProperties.getModelPath(model);
		crfppTrainer.train(getTemplatePath().getAbsolutePath(), dataPath.getAbsolutePath(), tempModelPath.getAbsolutePath(),
				GrobidProperties.getNBThreads());

		if (!crfppTrainer.what().isEmpty()) {
			LOGGER.warn("CRF++ Trainer warnings:\n" + crfppTrainer.what());
		} else {
			LOGGER.info("No CRF++ Trainer warnings!");
		}
		// if we are here, that means that training succeeded
		renameModels(oldModelPath, tempModelPath);
	}

	protected void renameModels(final File oldModelPath, final File tempModelPath) {
		if (oldModelPath.exists()) {
			if (!oldModelPath.renameTo(new File(oldModelPath.getAbsolutePath() + OLD_MODEL_EXT))) {
				LOGGER.warn("Unable to rename old model file: " + oldModelPath.getAbsolutePath());
				return;
			}
		}

		if (!tempModelPath.renameTo(oldModelPath)) {
			LOGGER.warn("Unable to rename new model file: " + tempModelPath);
		}
	}

	@Override
	public String evaluate() {
		createCRFPPData(getEvalCorpusPath(), evalDataPath);
		return EvaluationUtilities.evaluateStandard(evalDataPath.getAbsolutePath(), getTagger());
	}

	@Override
	public String splitTrainEvaluate(Double split) {
		final File dataPath = trainDataPath;
		createCRFPPData(getCorpusPath(), dataPath, evalDataPath, split);
		final File tempModelPath = new File(GrobidProperties.getModelPath(model).getAbsolutePath() + NEW_MODEL_EXT);
		final File oldModelPath = GrobidProperties.getModelPath(model);
		crfppTrainer.train(getTemplatePath().getAbsolutePath(), dataPath.getAbsolutePath(), tempModelPath.getAbsolutePath(),
				GrobidProperties.getNBThreads());

		if (!crfppTrainer.what().isEmpty()) {
			LOGGER.warn("CRF++ Trainer warnings:\n" + crfppTrainer.what());
		} else {
			LOGGER.info("No CRF++ Trainer warnings!");
		}
		// if we are here, that means that training succeeded
		renameModels(oldModelPath, tempModelPath);

		return EvaluationUtilities.evaluateStandard(evalDataPath.getAbsolutePath(), getTagger());
	}

	protected final File getTempTrainingDataPath() {
		try {
			return File.createTempFile(model.getModelName(), ".train", GrobidProperties.getTempPath());
		} catch (IOException e) {
			throw new RuntimeException("Unable to create a temporary training file for model: " + model);
		}
	}

	protected final File getTempEvaluationDataPath() {
		try {
			return File.createTempFile(model.getModelName(), ".test", GrobidProperties.getTempPath());
		} catch (IOException e) {
			throw new RuntimeException("Unable to create a temporary evaluation file for model: " + model);
		}
	}

	protected Tagger getTagger() {
		if (tagger == null) {
			tagger = AbstractParser.createTagger(model);
		}

		return tagger;
	}

	protected static final File getFilePath2Resources() {
		File theFile = new File(GrobidProperties.get_GROBID_HOME_PATH().getAbsoluteFile() + File.separator + ".." + File.separator
				+ "grobid-trainer" + File.separator + "resources");
		if (!theFile.exists()) {
			theFile = new File("resources");
		}
		return theFile;
	}

	protected final File getCorpusPath() {
		return GrobidProperties.getCorpusPath(getFilePath2Resources(), model);
	}

	protected final File getTemplatePath() {
		return getTemplatePath(model);
	}

	protected static File getTemplatePath(final GrobidModels model) {
		return GrobidProperties.getTemplatePath(getFilePath2Resources(), model);
	}

	protected File getEvalCorpusPath() {
		return GrobidProperties.getEvalCorpusPath(getFilePath2Resources(), model);
	}

	public static File getEvalCorpusBasePath() {
		final String path2Evelutation = getFilePath2Resources().getAbsolutePath() + File.separator + "dataset" + File.separator + "patent"
				+ File.separator + "evaluation";
		return new File(path2Evelutation);
	}

	@Override
	public GrobidModels getModel() {
		return model;
	}

	public static void runTraining(final Trainer trainer) {
		long start = System.currentTimeMillis();
		trainer.train();
		long end = System.currentTimeMillis();

		System.out.println("Model for " + trainer.getModel() + " created in " + (end - start) + " ms");

	}

	public static void runEvaluation(final Trainer trainer) {
		long start = System.currentTimeMillis();
		try {
			String report = trainer.evaluate();
			System.out.println(report);
		} catch (Exception e) {
			throw new GrobidException("An exception occurred while evaluating Grobid.", e);
		}
		long end = System.currentTimeMillis();
		System.out.println("Evaluation for " + trainer.getModel() + " model is realized in " + (end - start) + " ms");
	}

	public static void runSplitTrainingEvaluation(final Trainer trainer, Double split) {
		long start = System.currentTimeMillis();
		try {
			String report = trainer.splitTrainEvaluate(split);
			System.out.println(report);
		} catch (Exception e) {
			throw new GrobidException("An exception occurred while evaluating Grobid.", e);
		}
		long end = System.currentTimeMillis();
		System.out.println("Split, training and evaluation for " + trainer.getModel() + " model is realized in " + (end - start) + " ms");
	}

}

redpajama_set_name: RedPajamaGithub


text:
<?php
//
//  Amnesty(TM) Hypercube
//  Copyright (c) 2007 Mesa Dynamics, LLC. All rights reserved.
//

require_once 'appinclude.php';

if (!isset($user)) {
	exit;
}

$newuser = 'false';
$currentcube = NULL;
$currentwidget = NULL;

$conn = mysql_connect('mysql50-12.wc1.dfw1.stabletransit.com', '386731_root', 'boinkboink');
mysql_select_db('386731_hypercube', $conn);

function query($q) {
	global $conn;
	$result = mysql_query($q, $conn);
	if (!$result) {
		die("Invalid query -- $q -- " . mysql_error());
	}
	return $result;
}

$result = query("select facebook_id, cube_id, widget_id from facebook where fb_sig_user = " . $user);
if ($row = mysql_fetch_assoc($result)) {
	$currentcube = $row['cube_id'];
	$currentwidget = $row['widget_id'];
} else {
	$newuser = 'true';

	query("insert into cubes (user_id, serve_count) values (0, 0)");
	$result = query("select cube_id from cubes where cube_id = last_insert_id()");
	$row = mysql_fetch_assoc($result);
	$cubeid = $row['cube_id'];
	query("insert into facebook (fb_sig_user, cube_id) values (" . $user . ", " . $cubeid . ")");

	$result = query("select code, title from widgets where cube_id is null");
	while ($row = mysql_fetch_assoc($result)) {
		$code = mysql_real_escape_string($row['code']);
		$title = mysql_real_escape_string($row['title']);
		$query = sprintf("insert into widgets (code, title, cube_id, hash) values ('%s', '%s', %s, '%s')",
			$code, $title, $cubeid, md5($code));
		query($query);
	}

	$currentcube = $cubeid;
}

?>


text:
<?php

namespace celmarket\Admin;

use celmarket\Dispatcher;

class AdminReports {

    /**
     * [RO] Listeaza produsele facturabile (https://github.com/celdotro/marketplace/wiki/Listeaza-produsele-facturabile)
     * [EN] List all products that can be billed (https://github.com/celdotro/marketplace/wiki/List-billable-products)
     * @return mixed
     * @throws \GuzzleHttp\Exception\GuzzleException
     */
    public function getBillableProducts(){
        // Set method and action
        $method = 'admininfo';
        $action = 'GetBillableProducts';

        // Set data
        $data = array('param' => 1);

        $result = Dispatcher::send($method, $action, $data);

        return $result;
    }

    /**
     * [RO] Factureaza produsele disponibile (https://github.com/celdotro/marketplace/wiki/Factureaza-produse)
     * [EN] Bills available products (https://github.com/celdotro/marketplace/wiki/Bill-products)
     * @param $products
     * @return mixed
     * @throws \GuzzleHttp\Exception\GuzzleException
     */
    public function billProducts($products){
        // Set method and action
        $method = 'admininfo';
        $action = 'BillProducts';

        // Set data
        $data = array('products' => $products);

        $result = Dispatcher::send($method, $action, $data);

        return $result;
    }

    /**
     * [RO] Preia cererile de service sau retur ale clientilor (https://github.com/celdotro/marketplace/wiki/Preia-cererile-de-service)
     * [EN] Retrieve service or return requests (https://github.com/celdotro/marketplace/wiki/Retrieve-service-requests)
     * @param $type
     * @param int $page
     * @return mixed
     */
    public function getServiceRequests($type, $page = 1){
        // Set method and action
        $method = 'admininfo';
        $action = 'GetServiceRequests';

        // Set data
        $data = array('type' => $type, 'page' => $page);

        $result = Dispatcher::send($method, $action, $data);

        return $result;
    }

}


text:
.class public Landroid/media/effect/EffectFactory;
.super Ljava/lang/Object;
.source "EffectFactory.java"

# static fields
.field public static final EFFECT_AUTOFIX:Ljava/lang/String; = "android.media.effect.effects.AutoFixEffect"

.field public static final EFFECT_BACKDROPPER:Ljava/lang/String; = "android.media.effect.effects.BackDropperEffect"

.field public static final EFFECT_BITMAPOVERLAY:Ljava/lang/String; = "android.media.effect.effects.BitmapOverlayEffect"

.field public static final EFFECT_BLACKWHITE:Ljava/lang/String; = "android.media.effect.effects.BlackWhiteEffect"

.field public static final EFFECT_BRIGHTNESS:Ljava/lang/String; = "android.media.effect.effects.BrightnessEffect"

.field public static final EFFECT_CONTRAST:Ljava/lang/String; = "android.media.effect.effects.ContrastEffect"

.field public static final EFFECT_CROP:Ljava/lang/String; = "android.media.effect.effects.CropEffect"

.field public static final EFFECT_CROSSPROCESS:Ljava/lang/String; = "android.media.effect.effects.CrossProcessEffect"

.field public static final EFFECT_DOCUMENTARY:Ljava/lang/String; = "android.media.effect.effects.DocumentaryEffect"

.field public static final EFFECT_DUOTONE:Ljava/lang/String; = "android.media.effect.effects.DuotoneEffect"

.field public static final EFFECT_FILLLIGHT:Ljava/lang/String; = "android.media.effect.effects.FillLightEffect"

.field public static final EFFECT_FISHEYE:Ljava/lang/String; = "android.media.effect.effects.FisheyeEffect"

.field public static final EFFECT_FLIP:Ljava/lang/String; = "android.media.effect.effects.FlipEffect"

.field public static final EFFECT_GRAIN:Ljava/lang/String; = "android.media.effect.effects.GrainEffect"

.field public static final EFFECT_GRAYSCALE:Ljava/lang/String; = "android.media.effect.effects.GrayscaleEffect"

.field public static final EFFECT_IDENTITY:Ljava/lang/String; = "IdentityEffect"

.field public static final EFFECT_LOMOISH:Ljava/lang/String; = "android.media.effect.effects.LomoishEffect"

.field public static final EFFECT_NEGATIVE:Ljava/lang/String; = "android.media.effect.effects.NegativeEffect"

.field private static final EFFECT_PACKAGES:[Ljava/lang/String;

.field public static final EFFECT_POSTERIZE:Ljava/lang/String; = "android.media.effect.effects.PosterizeEffect"

.field public static final EFFECT_REDEYE:Ljava/lang/String; = "android.media.effect.effects.RedEyeEffect"

.field public static final EFFECT_ROTATE:Ljava/lang/String; = "android.media.effect.effects.RotateEffect"

.field public static final EFFECT_SATURATE:Ljava/lang/String; = "android.media.effect.effects.SaturateEffect"

.field public static final EFFECT_SEPIA:Ljava/lang/String; = "android.media.effect.effects.SepiaEffect"

.field public static final EFFECT_SHARPEN:Ljava/lang/String; = "android.media.effect.effects.SharpenEffect"

.field public static final EFFECT_STRAIGHTEN:Ljava/lang/String; = "android.media.effect.effects.StraightenEffect"

.field public static final EFFECT_TEMPERATURE:Ljava/lang/String; = "android.media.effect.effects.ColorTemperatureEffect"

.field public static final EFFECT_TINT:Ljava/lang/String; = "android.media.effect.effects.TintEffect"

.field public static final EFFECT_VIGNETTE:Ljava/lang/String; = "android.media.effect.effects.VignetteEffect"

# instance fields
.field private mEffectContext:Landroid/media/effect/EffectContext;

# direct methods
.method static constructor <clinit>()V
    .registers 3

    .prologue
    .line 32
    const/4 v0, 0x2

    new-array v0, v0, [Ljava/lang/String;

    .line 33
    const-string/jumbo v1, "android.media.effect.effects."

    const/4 v2, 0x0

    aput-object v1, v0, v2

    .line 34
    const-string/jumbo v1, ""

    const/4 v2, 0x1

    aput-object v1, v0, v2

    .line 32
    sput-object v0, Landroid/media/effect/EffectFactory;->EFFECT_PACKAGES:[Ljava/lang/String;

    .line 28
    return-void
.end method

.method constructor <init>(Landroid/media/effect/EffectContext;)V
    .registers 2
    .param p1, "effectContext"    # Landroid/media/effect/EffectContext;

    .prologue
    .line 425
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 426
    iput-object p1, p0, Landroid/media/effect/EffectFactory;->mEffectContext:Landroid/media/effect/EffectContext;

    .line 425
    return-void
.end method

.method private static getEffectClassByName(Ljava/lang/String;)Ljava/lang/Class;
    .registers 9
    .param p0, "className"    # Ljava/lang/String;

    .prologue
    .line 467
    const/4 v2, 0x0

    .line 470
    .local v2, "effectClass":Ljava/lang/Class;
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Thread;->getContextClassLoader()Ljava/lang/ClassLoader;

    move-result-object v0

    .line 473
    .local v0, "contextClassLoader":Ljava/lang/ClassLoader;
    sget-object v5, Landroid/media/effect/EffectFactory;->EFFECT_PACKAGES:[Ljava/lang/String;

    const/4 v4, 0x0

    array-length v6, v5

    .end local v2    # "effectClass":Ljava/lang/Class;
    :goto_d
    if-ge v4, v6, :cond_28

    aget-object v3, v5, v4

    .line 475
    .local v3, "packageName":Ljava/lang/String;
    :try_start_11
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
    :try_end_25
    .catch Ljava/lang/ClassNotFoundException; {:try_start_11 .. :try_end_25} :catch_29

    move-result-object v2

    .line 480
    .local v2, "effectClass":Ljava/lang/Class;
    if-eqz v2, :cond_2a

    .line 484
    .end local v2    # "effectClass":Ljava/lang/Class;
    .end local v3    # "packageName":Ljava/lang/String;
    :cond_28
    return-object v2

    .line 476
    .restart local v3    # "packageName":Ljava/lang/String;
    :catch_29
    move-exception v1

    .line 473
    :cond_2a
    add-int/lit8 v4, v4, 0x1

    goto :goto_d
.end method

.method private instantiateEffect(Ljava/lang/Class;Ljava/lang/String;)Landroid/media/effect/Effect;
    .registers 11
    .param p1, "effectClass"    # Ljava/lang/Class;
    .param p2, "name"    # Ljava/lang/String;

    .prologue
    .line 490
    :try_start_0
    const-class v5, Landroid/media/effect/Effect;

    invoke-virtual {p1, v5}, Ljava/lang/Class;->asSubclass(Ljava/lang/Class;)Ljava/lang/Class;
    :try_end_5
    .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_5} :catch_2a

    .line 497
    const/4 v3, 0x0

    .line 499
    .local v3, "effectConstructor":Ljava/lang/reflect/Constructor;
    const/4 v5, 0x2

    :try_start_7
    new-array v5, v5, [Ljava/lang/Class;

    const-class v6, Landroid/media/effect/EffectContext;

    const/4 v7, 0x0

    aput-object v6, v5, v7

    const-class v6, Ljava/lang/String;

    const/4 v7, 0x1

    aput-object v6, v5, v7

    invoke-virtual {p1, v5}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
    :try_end_16
    .catch Ljava/lang/NoSuchMethodException; {:try_start_7 .. :try_end_16} :catch_4c

    move-result-object v3

    .line 506
    .local v3, "effectConstructor":Ljava/lang/reflect/Constructor;
    const/4 v2, 0x0

    .line 508
    .local v2, "effect":Landroid/media/effect/Effect;
    const/4 v5, 0x2

    :try_start_19
    new-array v5, v5, [Ljava/lang/Object;

    iget-object v6, p0, Landroid/media/effect/EffectFactory;->mEffectContext:Landroid/media/effect/EffectContext;

    const/4 v7, 0x0

    aput-object v6, v5, v7

    const/4 v6, 0x1

    aput-object p2, v5, v6

    invoke-virtual {v3, v5}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    .end local v2    # "effect":Landroid/media/effect/Effect;
    check-cast v2, Landroid/media/effect/Effect;
    :try_end_29
    .catch Ljava/lang/Throwable; {:try_start_19 .. :try_end_29} :catch_75

    .line 514
    .local v2, "effect":Landroid/media/effect/Effect;
    return-object v2

    .line 491
    .end local v2    # "effect":Landroid/media/effect/Effect;
    .end local v3    # "effectConstructor":Ljava/lang/reflect/Constructor;
    :catch_2a
    move-exception v0

    .line 492
    .local v0, "e":Ljava/lang/ClassCastException;
    new-instance v5, Ljava/lang/IllegalArgumentException;

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v7, "Attempting to allocate effect \'"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    .line 493
    const-string/jumbo v7, "\' which is not a subclass of Effect!"

    .line 492
    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v5

    .line 500
    .end local v0    # "e":Ljava/lang/ClassCastException;
    .local v3, "effectConstructor":Ljava/lang/reflect/Constructor;
    :catch_4c
    move-exception v1

    .line 501
    .local v1, "e":Ljava/lang/NoSuchMethodException;
    new-instance v5, Ljava/lang/RuntimeException;

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v7, "The effect class \'"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string/jumbo v7, "\' does not have "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    .line 502
    const-string/jumbo v7, "the required constructor."

    .line 501
    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v5

    .line 509
    .end local v1    # "e":Ljava/lang/NoSuchMethodException;
    .local v3, "effectConstructor":Ljava/lang/reflect/Constructor;
    :catch_75
    move-exception v4

    .line 510
    .local v4, "t":Ljava/lang/Throwable;
    new-instance v5, Ljava/lang/RuntimeException;

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v7, "There was an error constructing the effect \'"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    .line 511
    const-string/jumbo v7, "\'!"

    .line 510
    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6, v4}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v5
.end method

.method public static isEffectSupported(Ljava/lang/String;)Z
    .registers 2
    .param p0, "effectName"    # Ljava/lang/String;

    .prologue
    .line 463
    invoke-static {p0}, Landroid/media/effect/EffectFactory;->getEffectClassByName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    if-eqz v0, :cond_8

    const/4 v0, 0x1

    :goto_7
    return v0

    :cond_8
    const/4 v0, 0x0

    goto :goto_7
.end method

# virtual methods
.method public createEffect(Ljava/lang/String;)Landroid/media/effect/Effect;
    .registers 6
    .param p1, "effectName"    # Ljava/lang/String;

    .prologue
    .line 444
    invoke-static {p1}, Landroid/media/effect/EffectFactory;->getEffectClassByName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    .line 445
    .local v0, "effectClass":Ljava/lang/Class;
    if-nez v0, :cond_27

    .line 446
    new-instance v1, Ljava/lang/IllegalArgumentException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "Cannot instantiate unknown effect \'"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 447
    const-string/jumbo v3, "\'!"

    .line 446
    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 449
    :cond_27
    invoke-direct {p0, v0, p1}, Landroid/media/effect/EffectFactory;->instantiateEffect(Ljava/lang/Class;Ljava/lang/String;)Landroid/media/effect/Effect;

    move-result-object v1

    return-object v1
.end method