text:
<?php

namespace Victoire\Bundle\AnalyticsBundle\Helper;

use Doctrine\ORM\EntityManager;
use Victoire\Bundle\BlogBundle\Entity\Article;
use Victoire\Bundle\PageBundle\Helper\PageHelper;
use Victoire\Bundle\ViewReferenceBundle\Connector\ViewReferenceRepository;

/**
 * Analytics View helper
 * ref: victoire_analytics.view_helper.
 */
class AnalyticsViewHelper
{
    protected $viewReferenceRepository;
    protected $entityManager;
    protected $pageHelper;

    /**
     * AnalyticsViewHelper constructor.
     *
     * @param ViewReferenceRepository $viewReferenceRepository
     * @param EntityManager           $entityManager
     * @param PageHelper              $pageHelper
     */
    public function __construct(ViewReferenceRepository $viewReferenceRepository, EntityManager $entityManager, PageHelper $pageHelper)
    {
        $this->entityManager = $entityManager;
        $this->viewReferenceRepository = $viewReferenceRepository;
        $this->pageHelper = $pageHelper;
    }

    /**
     * Get the most read views by type.
     *
     * @return View[]
     **/
    public function getMostReadByViewType($viewNamespace, $number)
    {
        $views = [];

        switch ($viewNamespace) {
            case 'Victoire\Bundle\PageBundle\Entity\Page':

                $viewReferences = [];
                $repo = $this->entityManager->getRepository($viewNamespace);
                //get pages and viewReferenceIds
                foreach ($repo->getAll()->run() as $key => $page) {
                    $viewReference = $this->viewReferenceRepository->getOneReferenceByParameters(
                        [
                            'viewNamespace' => $viewNamespace,
                            'viewId'        => $page->getId(),
                        ]
                    );
                    $viewReferences[$viewReference->getId()] = $viewReference;
                }
                //get pager
                $browseEvents = $this->entityManager->getRepository('Victoire\Bundle\AnalyticsBundle\Entity\BrowseEvent')
                    ->getMostVisitedFromReferences(array_keys($viewReferences), $number)
                    ->getQuery()
                    ->getResult();
                //Now we get the most visited references, we'll get views with PageHelper
                foreach ($browseEvents as $browseEvent) {
                    $views[] = $this->pageHelper->findPageByReference(
                        $viewReferences[$browseEvent->getViewReferenceId()]
                    );
                }

                break;

            default:
                // code...
                break;
        }

        return $views;
    }

    /**
     * Get the most read articles by blog.
     *
     * @return Article[]
     **/
    public function getMostReadArticlesByBlog($blog, $number, $excludeUnpublished = true)
    {
        $viewReferences = [];
        //get articles and viewReferenceIds
        $articles = $this->entityManager->getRepository('Victoire\Bundle\BlogBundle\Entity\Article')
                    ->getAll($excludeUnpublished)
                    ->filterByBlog($blog)
                    ->run();

        foreach ($articles as $key => $article) {
            if ($viewReference = $this->viewReferenceRepository->getOneReferenceByParameters(
                [
                    'entityNamespace' => 'Victoire\Bundle\BlogBundle\Entity\Article',
                    'entityId' => $article->getId(),
                ]
            )) {
                $viewReferences[$viewReference->getId()] = $viewReference;
            }
        }
        //get pager
        $browseEvents = $this->entityManager->getRepository('Victoire\Bundle\AnalyticsBundle\Entity\BrowseEvent')
            ->getMostVisitedFromReferences(array_keys($viewReferences), $number)
            ->getQuery()
            ->getResult();

        $views = [];
        //Now we get the most visited references, we'll get views with PageHelper
        foreach ($browseEvents as $browseEvent) {
            $views[] = $this->pageHelper->findPageByReference(
                $viewReferences[$browseEvent->getViewReferenceId()]
            );
        }

        return $views;
    }

    /**
     * Get number of unique visitor for a viewReference.
     *
     * @param string $viewReferenceId
     */
    public function getVisitorCountForViewReference($viewReferenceId)
    {
        $viewCount = $this->entityManager->getRepository('Victoire\Bundle\AnalyticsBundle\Entity\BrowseEvent')
            ->getNumberOfEventForViewReferenceId($viewReferenceId)
            ->getQuery()
            ->getSingleScalarResult();

        return $viewCount;
    }
}


text:
using System;

namespace Mono.Data.SybaseClient {

	/// <summary>
	///   The TODO attribute is used to flag all incomplete bits in our class libraries
	/// </summary>
	///
	/// <remarks>
	///   Use this to decorate any element which you think is not complete
	/// </remarks>
	[AttributeUsage (AttributeTargets.All)]
	internal class MonoTODOAttribute : Attribute {

		string comment;

		public MonoTODOAttribute ()
		{}

		public MonoTODOAttribute (string comment)
		{
			this.comment = comment;
		}

		public string Comment {
			get { return comment; }
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
<?php

use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkAwareContext;
use Behat\Mink\Mink;

use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\ORM\EntityManager;
use Behat\Behat\Tester\Exception\PendingException;
use Behat\Symfony2Extension\Driver\KernelDriver;
use \PHPUnit_Framework_Assert as Assert;

/**
 * Behat context class.
 */
class SignupContext implements SnippetAcceptingContext, MinkAwareContext
{
    private $mink;
    private $minkParameters;
    private $entityManager;

    /**
     * Initializes context.
     *
     * Every scenario gets its own context object.
     * You can also pass arbitrary arguments to the context constructor through behat.yml.
     */
    public function __construct(EntityManager $entityManager)
    {
        $this->entityManager = $entityManager;
    }

    public function setMink(Mink $mink)
    {
        $this->mink = $mink;
    }

    public function setMinkParameters(array $parameters)
    {
        $this->minkParameters = $parameters;
    }

    /**
     * @BeforeScenario
     */
    public function clearDatabase()
    {
        $purger = new ORMPurger($this->entityManager);
        $purger->purge();
    }

    /**
     * @Given I am an interested user with email :arg1
     */
    public function anInterestedUserWithEmail($email)
    {
        // shared in the feature context
        $this->email = $email;

        // Check that is an interested user and not an existing one
        Assert::assertNull(
            $this->entityManager->getRepository("CorleyBaseBundle:User")->findOneByEmail($email)
        );
    }

    /**
     * @When I fill all personal fields
     */
    public function heFillsAllPersonalFields()
    {
        $this->mink->getSession()->getPage()->find("css", "#corley_bundle_basebundle_user_email")->setValue($this->email);
        $this->mink->getSession()->getPage()->find("css", "#corley_bundle_basebundle_user_name")->setValue(rand(0,100000));
    }

    /**
     * @When I confirm my registration
     */
    public function heConfirmsTheRegistration()
    {
        $client = $this->mink->getSession()->getDriver()->getClient();
        $client->followRedirects(false);

        $this->mink->getSession()->getPage()->find("css", "#corley_bundle_basebundle_user_submit")->click();
    }

    /**
     * @Then I should be registered as an unconfirmed user
     */
    public function heShouldBeRegisteredAsAnUnconfirmedUser()
    {
        $this->entityManager->clear();
        $entity = $this->entityManager->getRepository("CorleyBaseBundle:User")->findOneByEmail($this->email);

        Assert::assertNotNull($entity);
        Assert::assertEquals($this->email, $entity->getEmail());
        Assert::assertFalse($entity->isConfirmed());
    }

    /**
     * @Then I should receive the registration email
     */
    public function heShouldReceiveTheRegistrationEmail()
    {
        $driver = $this->mink->getSession()->getDriver();
        if (!$driver instanceof KernelDriver) {
            throw new \RuntimeException("Only kernel drivers");
        }

        $profile = $driver->getClient()->getProfile();
        if (false === $profile) {
            throw new \RuntimeException("Profiler is disabled");
        }

        $collector = $profile->getCollector('swiftmailer');
        Assert::assertCount(1, $collector->getMessages());
    }

    /**
     * @Then I should be in the reserved area
     */
    public function heShouldBeInTheReservedArea()
    {
        $client = $this->mink->getSession()->getDriver()->getClient();
        $client->followRedirects(true);
        $client->followRedirect();

        $this->mink->assertSession()->pageTextContains("Hello reserved area!");
    }

}


text:
package org.acaro.crowdgenerator;

import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;

import org.acaro.crowdgenerator.visualizer.OpenGLVisualizer;

public class Grid {

	public static void main(String[] args) {
		LaneVertex grid[][] = new LaneVertex[50][50];
		LaneVertex vertices[] = new LaneVertex[2500];
		for (int i = 0, k = 0; i < 50; i++) {
			for (int j = 0; j < 50; j++) {
				LaneVertex v = new LaneVertex(k, i*10, j*10);
				grid[i][j] = v;
				vertices[k++] = v;
			}
		}

		SortedMap<LaneVertex, SortedSet<LaneVertex>> edges = new TreeMap<LaneVertex, SortedSet<LaneVertex>>();
		for (int i = 0; i < 50; i++) {
			for (int j = 0; j < 50; j++) {
				LaneVertex v = grid[i][j];
				SortedSet<LaneVertex> internal = new TreeSet<LaneVertex>();
				edges.put(v, internal);
				if (i > 0) {
					internal.add(grid[i-1][j]);
				}
				if (j > 0) {
					internal.add(grid[i][j-1]);
				}
			}
		}

		OpenGLVisualizer vis = new OpenGLVisualizer(500, 500, 10);
		vis.draw(vertices, edges);
//		VerticesVisualizer vis = new VerticesVisualizer(500, 500);
//		vis.draw(vertices);
	}
}


text:
def smallest_integer(list_of_nums)
  list_of_nums.sort!
  return list_of_nums[0]
end

#I am going to come back on my own to this challenge if I have time, but it is sunday and two hours in, I looked for methods.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

Syntax highlighting definition for C++

xslthl - XSLT Syntax Highlighting
http://sourceforge.net/projects/xslthl/
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks

This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Michal Molhanec <mol1111 at users.sourceforge.net>
Jirka Kosek <kosek at users.sourceforge.net>
Michiel Hendriks <elmuerte at users.sourceforge.net>

-->
<highlighters>
    <highlighter type="multiline-comment">
        <start>/**</start>
        <end>*/</end>
        <style>doccomment</style>
    </highlighter>
    <highlighter type="oneline-comment">
        <start><![CDATA[/// ]]></start>
        <style>doccomment</style>
    </highlighter>
    <highlighter type="multiline-comment">
        <start>/*</start>
        <end>*/</end>
    </highlighter>
    <highlighter type="oneline-comment">//</highlighter>
    <highlighter type="oneline-comment">
        <!-- use the online-comment highlighter to detect directives -->
        <start>#</start>
        <lineBreakEscape>\</lineBreakEscape>
        <style>directive</style>
        <solitary/>
    </highlighter>
    <highlighter type="string">
        <string>"</string>
        <escape>\</escape>
    </highlighter>
    <highlighter type="string">
        <string>'</string>
        <escape>\</escape>
    </highlighter>
    <highlighter type="hexnumber">
        <prefix>0x</prefix>
        <suffix>ul</suffix>
        <suffix>lu</suffix>
        <suffix>u</suffix>
        <suffix>l</suffix>
        <ignoreCase/>
    </highlighter>
    <highlighter type="number">
        <point>.</point>
        <pointStarts/>
        <exponent>e</exponent>
        <suffix>ul</suffix>
        <suffix>lu</suffix>
        <suffix>u</suffix>
        <suffix>f</suffix>
        <suffix>l</suffix>
        <ignoreCase/>
    </highlighter>
    <highlighter type="keywords">
        <!-- C keywords -->
        <keyword>auto</keyword>
        <keyword>_Bool</keyword>
        <keyword>break</keyword>
        <keyword>case</keyword>
        <keyword>char</keyword>
        <keyword>_Complex</keyword>
        <keyword>const</keyword>
        <keyword>continue</keyword>
        <keyword>default</keyword>
        <keyword>do</keyword>
        <keyword>double</keyword>
        <keyword>else</keyword>
        <keyword>enum</keyword>
        <keyword>extern</keyword>
        <keyword>float</keyword>
        <keyword>for</keyword>
        <keyword>goto</keyword>
        <keyword>if</keyword>
        <keyword>_Imaginary</keyword>
        <keyword>inline</keyword>
        <keyword>int</keyword>
        <keyword>long</keyword>
        <keyword>register</keyword>
        <keyword>restrict</keyword>
        <keyword>return</keyword>
        <keyword>short</keyword>
        <keyword>signed</keyword>
        <keyword>sizeof</keyword>
        <keyword>static</keyword>
        <keyword>struct</keyword>
        <keyword>switch</keyword>
        <keyword>typedef</keyword>
        <keyword>union</keyword>
        <keyword>unsigned</keyword>
        <keyword>void</keyword>
        <keyword>volatile</keyword>
        <keyword>while</keyword>
        <!-- C++ keywords -->
        <keyword>asm</keyword>
        <keyword>dynamic_cast</keyword>
        <keyword>namespace</keyword>
        <keyword>reinterpret_cast</keyword>
        <keyword>try</keyword>
        <keyword>bool</keyword>
        <keyword>explicit</keyword>
        <keyword>new</keyword>
        <keyword>static_cast</keyword>
        <keyword>typeid</keyword>
        <keyword>catch</keyword>
        <keyword>false</keyword>
        <keyword>operator</keyword>
        <keyword>template</keyword>
        <keyword>typename</keyword>
        <keyword>class</keyword>
        <keyword>friend</keyword>
        <keyword>private</keyword>
        <keyword>this</keyword>
        <keyword>using</keyword>
        <keyword>const_cast</keyword>
        <keyword>inline</keyword>
        <keyword>public</keyword>
        <keyword>throw</keyword>
        <keyword>virtual</keyword>
        <keyword>delete</keyword>
        <keyword>mutable</keyword>
        <keyword>protected</keyword>
        <keyword>true</keyword>
        <keyword>wchar_t</keyword>
    </highlighter>
</highlighters>


text:
// --------------------------------------------------
// 3DS Theme Editor - Extensions.cs
// --------------------------------------------------

using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ThemeEditor.Common.Graphics;
using ThemeEditor.WPF.Themes;
using Color = System.Windows.Media.Color;
using PixelFormat = System.Drawing.Imaging.PixelFormat;

namespace ThemeEditor.WPF
{
    internal static class Extensions
    {
        public static Bitmap ScrCap(Rectangle area)
        {
            IntPtr desktopHandle = NativeMethods.GetDesktopWindow();
            IntPtr desktopDC = NativeMethods.GetWindowDC(desktopHandle);
            IntPtr destinationDC = NativeMethods.CreateCompatibleDC(desktopDC);
            IntPtr bitmapHandle = NativeMethods.CreateCompatibleBitmap(desktopDC, area.Width, area.Height);
            IntPtr oldBitmapHandle = NativeMethods.SelectObject(destinationDC, bitmapHandle);

            const CopyPixelOperation operation = CopyPixelOperation.SourceCopy | CopyPixelOperation.CaptureBlt;
            NativeMethods.BitBlt(destinationDC, 0, 0, area.Width, area.Height, desktopDC, area.X, area.Y, operation);

            Bitmap desktopCapture = Image.FromHbitmap(bitmapHandle);
            NativeMethods.SelectObject(destinationDC, oldBitmapHandle);
            NativeMethods.DeleteObject(bitmapHandle);
            NativeMethods.DeleteDC(destinationDC);
            NativeMethods.ReleaseDC(desktopHandle, desktopDC);

            return desktopCapture;
        }

        public static BitmapSource ScrCapW(Rectangle area)
        {
            var bitmap = ScrCap(area);

            var bitmapData = bitmap.LockBits(
                new Rectangle(0, 0, bitmap.Width, bitmap.Height),
                System.Drawing.Imaging.ImageLockMode.ReadOnly,
                PixelFormat.Format32bppArgb);

            var bitmapSource = BitmapSource.Create(
                bitmapData.Width,
                bitmapData.Height,
                96,
                96,
                PixelFormats.Bgra32,
                null,
                bitmapData.Scan0,
                bitmapData.Stride * bitmapData.Height,
                bitmapData.Stride);

            bitmap.UnlockBits(bitmapData);
            return bitmapSource;
        }

        public static uint NextPowerOfTwo(this uint x)
        {
            x--;
            x |= (x >> 1);
            x |= (x >> 2);
            x |= (x >> 4);
            x |= (x >> 8);
            x |= (x >> 16);
            return (x + 1);
        }

        public static BitmapSource CreateResizedImage(this BitmapSource source, int width, int height, int margin = 0)
        {
            var rect = new Rect(margin, margin, width - margin * 2, height - margin * 2);

            var group = new DrawingGroup();
            RenderOptions.SetBitmapScalingMode(group, BitmapScalingMode.HighQuality);
            group.Children.Add(new ImageDrawing(source, rect));

            var drawingVisual = new DrawingVisual();
            using (var drawingContext = drawingVisual.RenderOpen())
                drawingContext.DrawDrawing(group);

            var resizedImage = new RenderTargetBitmap(
                width,
                height,
                // Resized dimensions
                96,
                96,
                // Default DPI values
                PixelFormats.Default); // Default pixel format
            resizedImage.Render(drawingVisual);

            return BitmapFrame.Create(resizedImage);
        }

        public static BitmapSource CreateResizedNextPot(this BitmapSource source)
        {
            int potW = (int)((uint)source.PixelWidth).NextPowerOfTwo();
            int potH = (int)((uint)source.PixelHeight).NextPowerOfTwo();

            if (source.PixelWidth == potW && source.PixelHeight == potH)
                return source;

            var bmpPot = source.CreateResizedImageNoScale(0, 0, potW, potH);

            return bmpPot;
        }

        public static BitmapSource CreateResizedImageNoScale(this BitmapSource source, int x, int y, int width, int height)
        {
            var minH = Math.Min(source.PixelHeight, height);
            var minW = Math.Min(source.PixelWidth, width);
            var rect = new Rect(x, y, minW, minH);

            var drawingVisual = new DrawingVisual();
            using (var drawingContext = drawingVisual.RenderOpen())
                drawingContext.DrawImage(source, rect);

            var resizedImage = new RenderTargetBitmap(
                width,
                height,
                // Resized dimensions
                96,
                96,
                // Default DPI values
                PixelFormats.Default); // Default pixel format
            resizedImage.Render(drawingVisual);

            return BitmapFrame.Create(resizedImage);
        }

        public static Color Blend(this Color bg, Color fg, float factor)
        {
            float alphaFg = fg.A / 255.0f * factor;
            float alphaBg = bg.A / 255.0f;

            float preRfg = fg.R * alphaFg;
            float preGfg = fg.G * alphaFg;
            float preBfg = fg.B * alphaFg;

            float preRbg = bg.R * alphaBg;
            float preGbg = bg.G * alphaBg;
            float preBbg = bg.B * alphaBg;

            float newAlpha = alphaFg + alphaBg * (1 - alphaFg);

            byte newR = (byte)((preRfg + preRbg * (1 - alphaFg)) / newAlpha).Clamp(0, 255);
            byte newG = (byte)((preGfg + preGbg * (1 - alphaFg)) / newAlpha).Clamp(0, 255);
            byte newB = (byte)((preBfg + preBbg * (1 - alphaFg)) / newAlpha).Clamp(0, 255);
            byte newA = (byte)(newAlpha * 255).Clamp(0, 255);

            return Color.FromArgb(newA, newR, newG, newB);
        }

        public static T Clamp<T>(this T value, T min, T max) where T : IComparable
        {
            if (value.CompareTo(max) > 0)
                return max;
            if (value.CompareTo(min) < 0)
                return min;
            return value;
        }

        public static byte[] GetBgr24Data(this BitmapSource bmp)
        {
            int w = bmp.PixelWidth;
            int h = bmp.PixelHeight;
            int s = w * 3;
            var bgr24Data = new byte[h * s];

            var pbgr32Bmp = new FormatConvertedBitmap(bmp, PixelFormats.Pbgra32, null, 0);
            var bgr24Bmp = new FormatConvertedBitmap(pbgr32Bmp, PixelFormats.Bgr24, null, 0);

            bgr24Bmp.CopyPixels(bgr24Data, s, 0);

            return bgr24Data;
        }

        public static IDictionary<string, object> GetResources(string pattern)
        {
            pattern = pattern.ToLowerInvariant();
            var asm = Assembly.GetEntryAssembly();
            var resName = asm.GetName().Name + ".g.resources";
            var stream = asm.GetManifestResourceStream(resName);
            var reader = new ResourceReader(stream);

            var dict = new Dictionary<string, object>();
            foreach (DictionaryEntry res in reader)
            {
                var path = (string)res.Key;
                if (Regex.IsMatch(path, pattern))
                    dict.Add(path, res.Value);
            }
            return dict;
        }

        public static ColorRgb888 ToColorRgb888(this Color c)
        {
            return new ColorRgb888(c.R, c.G, c.B);
        }

        public static ColorArgb8888 ToColorArgb8888(this Color c)
        {
            return new ColorArgb8888(c.A, c.R, c.G, c.B);
        }

        public static Color ToMediaColor(this ColorRgb888 c)
        {
            return Color.FromArgb(255, c.R, c.G, c.B);
        }

        public static Color ToMediaColor(this ColorArgb8888 c)
        {
            return Color.FromArgb(c.A, c.R, c.G, c.B);
        }

        public static Dictionary<string, string> GetMetadata(this ViewModelBase arg, params string[] basePath)
        {
            Dictionary<string, string> meta = new Dictionary<string, string>();
            Stack<string> pathStack = new Stack<string>(basePath);
            void GetMetadataInner(ViewModelBase ivm)
            {
                var props = ivm.GetType().GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);
                foreach (var p in props)
                {
                    object value = p.GetValue(ivm);
                    if (value is ViewModelBase)
                    {
                        pathStack.Push(p.Name);
                        GetMetadataInner((ViewModelBase)value);
                        pathStack.Pop();
                    }
                    else if(p.CanRead && p.CanWrite)
                    {
                        var pathStr = string.Join(".", pathStack.Reverse()) + "." + p.Name;
                        if (value is Color || value is Boolean || value is Enum || value is double)
                        {
                            meta.Add(pathStr, Convert.ToString(value, CultureInfo.InvariantCulture));

                        }
                    }
                }
            }

            foreach (string p in basePath)
            {
                var type = arg.GetType();
                var info = type.GetProperty(p);
                if (!typeof(ViewModelBase).IsAssignableFrom(info.PropertyType))
                    return meta;
                arg = (ViewModelBase)info.GetValue(arg);
            }
            GetMetadataInner(arg);
            return meta;
        }

        public static void SetMetadata(this ViewModelBase arg, Dictionary<string, string> metadata, params string[] basePath)
        {

            void SetMetadataInner(string path, string value)
            {
                object cur = arg;
                var parts = path.Split('.');
                for (var i = 0; i < parts.Length; i++)
                {
                    var part = parts[i];
                    var type = cur.GetType();
                    var info = type.GetProperty(part, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);
                    if (info == null)
                        return;
                    if (i == parts.Length - 1)
                    {
                        try
                        {
                            if (info.PropertyType == typeof(Color))
                            {

                                var col = System.Windows.Media.ColorConverter.ConvertFromString(value);
                                info.SetValue(cur, col);

                            }
                            else if (info.PropertyType == typeof(double))
                            {
                                if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var res))
                                    info.SetValue(cur, res);
                            }
                            else if (info.PropertyType == typeof(bool))
                            {
                                if (bool.TryParse(value, out var res))
                                    info.SetValue(cur, res);
                            }
                            else if (info.PropertyType.IsEnum)
                            {
                                if (!Enum.IsDefined(info.PropertyType, value))
                                    return;
                                info.SetValue(cur, Enum.Parse(info.PropertyType, value));
                            }
                        }
                        catch (Exception ex)
                        {
                            if (!(ex is FormatException) &&
                                !(ex is ArgumentException))
                                throw;
                        }

                    }
                    else
                    {
                        cur = info.GetValue(cur);
                    }
                }
            }

            var append = string.Join(".", basePath);
            if (append.Length > 0)
                append += ".";

            foreach (var pair in metadata)
            {
                SetMetadataInner(append + pair.Key, pair.Value);
            }
        }

    }
}


text:
.class Lcom/android/server/wifi/WifiServiceImpl$9;
.super Landroid/content/BroadcastReceiver;
.source "WifiServiceImpl.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/android/server/wifi/WifiServiceImpl;->registerDockModeReceiver()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/server/wifi/WifiServiceImpl;

# direct methods
.method constructor <init>(Lcom/android/server/wifi/WifiServiceImpl;)V
    .locals 0

    .prologue
    .line 3761
    iput-object p1, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method

# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 6
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "intent"    # Landroid/content/Intent;

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x1

    .line 3764
    const-string v1, "android.intent.extra.DOCK_STATE"

    invoke-virtual {p2, v1, v5}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    .line 3765
    .local v0, "dockState":I
    const-string v1, "WifiService"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "DockWifi - dockState "

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

    move-result-object v2

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

    move-result-object v2

    const-string v3, "  mAutoEnableWifiApInDockMode="

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

    move-result-object v2

    iget-object v3, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    # getter for: Lcom/android/server/wifi/WifiServiceImpl;->mAutoEnableWifiApInDockMode:Z
    invoke-static {v3}, Lcom/android/server/wifi/WifiServiceImpl;->access$3600(Lcom/android/server/wifi/WifiServiceImpl;)Z

    move-result v3

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

    move-result-object v2

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

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 3766
    if-nez v0, :cond_1

    .line 3767
    iget-object v1, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    # setter for: Lcom/android/server/wifi/WifiServiceImpl;->mInDockMode:Z
    invoke-static {v1, v5}, Lcom/android/server/wifi/WifiServiceImpl;->access$3402(Lcom/android/server/wifi/WifiServiceImpl;Z)Z

    .line 3774
    :cond_0
    :goto_0
    return-void

    .line 3768
    :cond_1
    if-ne v0, v4, :cond_0

    .line 3769
    iget-object v1, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    # setter for: Lcom/android/server/wifi/WifiServiceImpl;->mInDockMode:Z
    invoke-static {v1, v4}, Lcom/android/server/wifi/WifiServiceImpl;->access$3402(Lcom/android/server/wifi/WifiServiceImpl;Z)Z

    .line 3770
    iget-object v1, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    # getter for: Lcom/android/server/wifi/WifiServiceImpl;->mAutoEnableWifiApInDockMode:Z
    invoke-static {v1}, Lcom/android/server/wifi/WifiServiceImpl;->access$3600(Lcom/android/server/wifi/WifiServiceImpl;)Z

    move-result v1

    if-ne v1, v4, :cond_0

    .line 3771
    iget-object v1, p0, Lcom/android/server/wifi/WifiServiceImpl$9;->this$0:Lcom/android/server/wifi/WifiServiceImpl;

    # invokes: Lcom/android/server/wifi/WifiServiceImpl;->setWifiApEnableInDockMode(Z)V
    invoke-static {v1, v4}, Lcom/android/server/wifi/WifiServiceImpl;->access$3700(Lcom/android/server/wifi/WifiServiceImpl;Z)V

    goto :goto_0
.end method


text:
angular.module('Aggie')

.factory('User', function($resource) {
  return $resource('/api/v1/user/:_id', null, {
    'create': { method: 'POST' },
    'update': { method: 'PUT' }
  });
});


text:
package com.puyixiaowo.fblog.bean.admin.afu;

import com.alibaba.fastjson.annotation.JSONField;
import com.puyixiaowo.core.entity.Validatable;
import com.puyixiaowo.fblog.annotation.NotNull;
import com.puyixiaowo.fblog.annotation.Table;
import com.puyixiaowo.fblog.annotation.Transient;
import com.puyixiaowo.generator.utils.CustomDateTimeSerializer;

import java.io.Serializable;

@Table("afu")
public class AfuBean extends Validatable implements Serializable {
	private static final long serialVersionUID = 1L;

	private Long id;
	private String name;
	private Long type;
	@JSONField(serializeUsing = CustomDateTimeSerializer.class)
	private Long createTime;
	private String content;

	//
	@Transient
	private String typeName;

	public Long getId (){
		return id;
	}

	public void setId (Long id){
		this.id = id;
	}

	public String getName (){
		return name;
	}

	public void setName (String name){
		this.name = name;
	}

	public Long getType (){
		return type;
	}

	public void setType (Long type){
		this.type = type;
	}

	public Long getCreateTime (){
		return createTime;
	}

	public void setCreateTime (Long createTime){
		this.createTime = createTime;
	}

	public String getContent (){
		return content;
	}

	public void setContent (String content){
		this.content = content;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cubes.network;

import java.io.IOException;

/**
 *
 * @author Carl
 */
public interface BitSerializable{

    public abstract void write(BitOutputStream outputStream);

    public abstract void read(BitInputStream inputStream) throws IOException;
}


text:
"use strict";

const conversions = require("webidl-conversions");
const utils = require("./utils.js");

module.exports = {
  convertInherit(obj, ret) {
    let key, value;

    key = "bubbles";
    value = obj === undefined || obj === null ? undefined : obj[key];
    if (value !== undefined) {
      ret[key] = conversions["boolean"](value);
    } else {
      ret[key] = false;
    }

    key = "cancelable";
    value = obj === undefined || obj === null ? undefined : obj[key];
    if (value !== undefined) {
      ret[key] = conversions["boolean"](value);
    } else {
      ret[key] = false;
    }
  },

  convert(obj) {
    if (obj !== undefined && typeof obj !== "object") {
      throw new TypeError("Dictionary has to be an object");
    }
    if (obj instanceof Date || obj instanceof RegExp) {
      throw new TypeError("Dictionary may not be a Date or RegExp object");
    }

    const ret = Object.create(null);
    module.exports.convertInherit(obj, ret);
    return ret;
  }
};


text:
import argparse, sys, datetime
from menagerie.formatting import tsv

from . import database

def read_wikis(f):
	if not f.isatty():
		return list(row.wiki_db for row in tsv.Reader(f))

def main():

	parser = argparse.ArgumentParser(
		description = """
			Gathers a set of daily edit counts for a tag across a set of wikis.
		""",
		conflict_handler = "resolve"
	)
	parser.add_argument(
		'wikis',
		help="A file containing the list of wikis to process.",
		type=lambda path: read_wikis(open(path))
	)
	parser.add_argument(
		"tag",
		help="The tag to look for"
	)
	parser.add_argument(
		'--start-day',
		help="A day to start querying.  ",
		type=lambda string: datetime.datetime.strptime(string, "%Y%m%d"),
		default=datetime.datetime.strptime("20130110", "%Y%m%d")
	)
	parser.add_argument(
		'--end-day',
		help="A day to stop querying.  Defaults to today (UTC).",
		type=lambda string: datetime.datetime.strptime(string, "%Y%m%d"),
		default=datetime.datetime.utcnow()
	)

	args = parser.parse_args()

	run(
		args.wikis,
		args.tag,
		args.start_day,
		args.end_day
	)

def run(wikis, tag, start_day, end_day):

	writer = tsv.Writer(
		sys.stdout,
		headers=['date'] + wikis
	)

	daily_edits = {}
	for wiki in wikis:
		for date, edits in get_daily_tagged_edits(wiki, tag):
			daily_edits[(wiki, date)] = edits

	for date in dates_between(start_day, end_day):
		values = [date]
		for wiki in wikis:
			values.append(daily_edits.get((wiki, date), 0))

		writer.write(values)

def dates_between(start_day, end_day):

	current_day = start_day
	while current_day < end_day:
		yield current_day.strftime("%Y-%m-%d")
		current_day += datetime.timedelta(1)

def get_daily_tagged_edits(wiki, tag):

	conn = database.connection(wiki)
	cursor = conn.cursor()
	cursor.execute(
		"""
		SELECT
			DATE_FORMAT(LEFT(rev_timestamp, 8), "%Y-%m-%d") AS date,
			COUNT(rev_id) AS edits
		FROM revision
		INNER JOIN change_tag ON
			ct_rev_id = rev_id AND
			ct_tag = ?
		GROUP BY 1
		""",
		[tag]
	)

	dialy_edits = {}
	for row in cursor:
		yield row['date'], row['edits']


text:
/**
 */
package tosca.util;

import java.math.BigInteger;

import java.util.Map;

import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.EObjectValidator;

import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil;
import org.eclipse.emf.ecore.xml.type.util.XMLTypeValidator;

import tosca.*;

/**
 *
 * The Validator for the model.
 *
 * @see tosca.ToscaPackage
 * @generated
 */
public class ToscaValidator extends EObjectValidator {
	/**
	 * The cached model package
	 *
	 *
	 * @generated
	 */
	public static final ToscaValidator INSTANCE = new ToscaValidator();

	/**
	 * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
	 *
	 *
	 * @see org.eclipse.emf.common.util.Diagnostic#getSource()
	 * @see org.eclipse.emf.common.util.Diagnostic#getCode()
	 * @generated
	 */
	public static final String DIAGNOSTIC_SOURCE = "tosca";

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants.
	 *
	 *
	 * @generated
	 */
	private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;

	/**
	 * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
	 *
	 *
	 * @generated
	 */
	protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;

	/**
	 * The cached base package validator.
	 *
	 *
	 * @generated
	 */
	protected XMLTypeValidator xmlTypeValidator;

	/**
	 * Creates an instance of the switch.
	 *
	 *
	 * @generated
	 */
	public ToscaValidator() {
		super();
		xmlTypeValidator = XMLTypeValidator.INSTANCE;
	}

	/**
	 * Returns the package of this validator switch.
	 *
	 *
	 * @generated
	 */
	@Override
	protected EPackage getEPackage() {
	  return ToscaPackage.eINSTANCE;
	}

	/**
	 * Calls validateXXX for the corresponding classifier of the model.
	 *
	 *
	 * @generated
	 */
	@Override
	protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
		switch (classifierID) {
			case ToscaPackage.ARTIFACT_REFERENCES_TYPE:
				return validateArtifactReferencesType((ArtifactReferencesType)value, diagnostics, context);
			case ToscaPackage.CAPABILITIES_TYPE_TCAPABILITY:
				return validateCapabilitiesType_TCapability((CapabilitiesType_TCapability)value, diagnostics, context);
			case ToscaPackage.CAPABILITIES_TYPE_CAPABILITY_REF:
				return validateCapabilitiesType_CapabilityRef((CapabilitiesType_CapabilityRef)value, diagnostics, context);
			case ToscaPackage.CAPABILITY_DEFINITIONS_TYPE:
				return validateCapabilityDefinitionsType((CapabilityDefinitionsType)value, diagnostics, context);
			case ToscaPackage.CONSTRAINTS_TYPE:
				return validateConstraintsType((ConstraintsType)value, diagnostics, context);
			case ToscaPackage.DEFINITIONS_TYPE:
				return validateDefinitionsType((DefinitionsType)value, diagnostics, context);
			case ToscaPackage.DERIVED_FROM_TYPE:
				return validateDerivedFromType((DerivedFromType)value, diagnostics, context);
			case ToscaPackage.DOCUMENT_ROOT:
				return validateDocumentRoot((DocumentRoot)value, diagnostics, context);
			case ToscaPackage.EXCLUDE_TYPE:
				return validateExcludeType((ExcludeType)value, diagnostics, context);
			case ToscaPackage.EXTENSIONS_TYPE:
				return validateExtensionsType((ExtensionsType)value, diagnostics, context);
			case ToscaPackage.IMPLEMENTATION_ARTIFACT_TYPE:
				return validateImplementationArtifactType((ImplementationArtifactType)value, diagnostics, context);
			case ToscaPackage.INCLUDE_TYPE:
				return validateIncludeType((IncludeType)value, diagnostics, context);
			case ToscaPackage.INPUT_PARAMETERS_TYPE:
				return validateInputParametersType((InputParametersType)value, diagnostics, context);
			case ToscaPackage.INSTANCE_STATE_TYPE:
				return validateInstanceStateType((InstanceStateType)value, diagnostics, context);
			case ToscaPackage.INTERFACES_TYPE_TINTERFACE:
				return validateInterfacesType_TInterface((InterfacesType_TInterface)value, diagnostics, context);
			case ToscaPackage.INTERFACES_TYPE_TEXPORTED_INTERFACE:
				return validateInterfacesType_TExportedInterface((InterfacesType_TExportedInterface)value, diagnostics, context);
			case ToscaPackage.NODE_OPERATION_TYPE:
				return validateNodeOperationType((NodeOperationType)value, diagnostics, context);
			case ToscaPackage.NODE_TYPE_REFERENCE_TYPE:
				return validateNodeTypeReferenceType((NodeTypeReferenceType)value, diagnostics, context);
			case ToscaPackage.OUTPUT_PARAMETERS_TYPE:
				return validateOutputParametersType((OutputParametersType)value, diagnostics, context);
			case ToscaPackage.PLAN_MODEL_REFERENCE_TYPE:
				return validatePlanModelReferenceType((PlanModelReferenceType)value, diagnostics, context);
			case ToscaPackage.PLAN_MODEL_TYPE:
				return validatePlanModelType((PlanModelType)value, diagnostics, context);
			case ToscaPackage.PLAN_TYPE:
				return validatePlanType((PlanType)value, diagnostics, context);
			case ToscaPackage.POLICIES_TYPE:
				return validatePoliciesType((PoliciesType)value, diagnostics, context);
			case ToscaPackage.PROPERTIES_DEFINITION_TYPE:
				return validatePropertiesDefinitionType((PropertiesDefinitionType)value, diagnostics, context);
			case ToscaPackage.PROPERTIES_TYPE:
				return validatePropertiesType((PropertiesType)value, diagnostics, context);
			case ToscaPackage.PROPERTIES_TYPE_WITH_PROPERTY_MAPPINGS:
				return validatePropertiesTypeWithPropertyMappings((PropertiesTypeWithPropertyMappings)value, diagnostics, context);
			case ToscaPackage.PROPERTY_CONSTRAINTS_TYPE:
				return validatePropertyConstraintsType((PropertyConstraintsType)value, diagnostics, context);
			case ToscaPackage.PROPERTY_MAPPINGS_TYPE:
				return validatePropertyMappingsType((PropertyMappingsType)value, diagnostics, context);
			case ToscaPackage.RELATIONSHIP_CONSTRAINTS_TYPE:
				return validateRelationshipConstraintsType((RelationshipConstraintsType)value, diagnostics, context);
			case ToscaPackage.RELATIONSHIP_CONSTRAINT_TYPE:
				return validateRelationshipConstraintType((RelationshipConstraintType)value, diagnostics, context);
			case ToscaPackage.RELATIONSHIP_OPERATION_TYPE:
				return validateRelationshipOperationType((RelationshipOperationType)value, diagnostics, context);
			case ToscaPackage.REQUIREMENT_DEFINITIONS_TYPE:
				return validateRequirementDefinitionsType((RequirementDefinitionsType)value, diagnostics, context);
			case ToscaPackage.REQUIREMENTS_TYPE_TREQUIREMENT:
				return validateRequirementsType_TRequirement((RequirementsType_TRequirement)value, diagnostics, context);
			case ToscaPackage.REQUIREMENTS_TYPE_TREQUIREMENT_REF:
				return validateRequirementsType_TRequirementRef((RequirementsType_TRequirementRef)value, diagnostics, context);
			case ToscaPackage.SOURCE_ELEMENT_TYPE:
				return validateSourceElementType((SourceElementType)value, diagnostics, context);
			case ToscaPackage.SOURCE_INTERFACES_TYPE:
				return validateSourceInterfacesType((SourceInterfacesType)value, diagnostics, context);
			case ToscaPackage.TAPPLIES_TO:
				return validateTAppliesTo((TAppliesTo)value, diagnostics, context);
			case ToscaPackage.TARGET_ELEMENT_TYPE:
				return validateTargetElementType((TargetElementType)value, diagnostics, context);
			case ToscaPackage.TARGET_INTERFACES_TYPE:
				return validateTargetInterfacesType((TargetInterfacesType)value, diagnostics, context);
			case ToscaPackage.TARTIFACT_REFERENCE:
				return validateTArtifactReference((TArtifactReference)value, diagnostics, context);
			case ToscaPackage.TARTIFACT_TEMPLATE:
				return validateTArtifactTemplate((TArtifactTemplate)value, diagnostics, context);
			case ToscaPackage.TARTIFACT_TYPE:
				return validateTArtifactType((TArtifactType)value, diagnostics, context);
			case ToscaPackage.TBOUNDARY_DEFINITIONS:
				return validateTBoundaryDefinitions((TBoundaryDefinitions)value, diagnostics, context);
			case ToscaPackage.TCAPABILITY:
				return validateTCapability((TCapability)value, diagnostics, context);
			case ToscaPackage.TCAPABILITY_DEFINITION:
				return validateTCapabilityDefinition((TCapabilityDefinition)value, diagnostics, context);
			case ToscaPackage.TCAPABILITY_REF:
				return validateTCapabilityRef((TCapabilityRef)value, diagnostics, context);
			case ToscaPackage.TCAPABILITY_TYPE:
				return validateTCapabilityType((TCapabilityType)value, diagnostics, context);
			case ToscaPackage.TCONDITION:
				return validateTCondition((TCondition)value, diagnostics, context);
			case ToscaPackage.TCONSTRAINT:
				return validateTConstraint((TConstraint)value, diagnostics, context);
			case ToscaPackage.TDEFINITIONS:
				return validateTDefinitions((TDefinitions)value, diagnostics, context);
			case ToscaPackage.TDEPLOYMENT_ARTIFACT:
				return validateTDeploymentArtifact((TDeploymentArtifact)value, diagnostics, context);
			case ToscaPackage.TDEPLOYMENT_ARTIFACTS:
				return validateTDeploymentArtifacts((TDeploymentArtifacts)value, diagnostics, context);
			case ToscaPackage.TDOCUMENTATION:
				return validateTDocumentation((TDocumentation)value, diagnostics, context);
			case ToscaPackage.TENTITY_TEMPLATE:
				return validateTEntityTemplate((TEntityTemplate)value, diagnostics, context);
			case ToscaPackage.TENTITY_TYPE:
				return validateTEntityType((TEntityType)value, diagnostics, context);
			case ToscaPackage.TEXPORTED_INTERFACE:
				return validateTExportedInterface((TExportedInterface)value, diagnostics, context);
			case ToscaPackage.TEXPORTED_OPERATION:
				return validateTExportedOperation((TExportedOperation)value, diagnostics, context);
			case ToscaPackage.TEXTENSIBLE_ELEMENTS:
				return validateTExtensibleElements((TExtensibleElements)value, diagnostics, context);
			case ToscaPackage.TEXTENSION:
				return validateTExtension((TExtension)value, diagnostics, context);
			case ToscaPackage.TEXTENSIONS:
				return validateTExtensions((TExtensions)value, diagnostics, context);
			case ToscaPackage.TIMPLEMENTATION_ARTIFACT:
				return validateTImplementationArtifact((TImplementationArtifact)value, diagnostics, context);
			case ToscaPackage.TIMPLEMENTATION_ARTIFACTS:
				return validateTImplementationArtifacts((TImplementationArtifacts)value, diagnostics, context);
			case ToscaPackage.TIMPORT:
				return validateTImport((TImport)value, diagnostics, context);
			case ToscaPackage.TINTERFACE:
				return validateTInterface((TInterface)value, diagnostics, context);
			case ToscaPackage.TNODE_TEMPLATE:
				return validateTNodeTemplate((TNodeTemplate)value, diagnostics, context);
			case ToscaPackage.TNODE_TYPE:
				return validateTNodeType((TNodeType)value, diagnostics, context);
			case ToscaPackage.TNODE_TYPE_IMPLEMENTATION:
				return validateTNodeTypeImplementation((TNodeTypeImplementation)value, diagnostics, context);
			case ToscaPackage.TOPERATION:
				return validateTOperation((TOperation)value, diagnostics, context);
			case ToscaPackage.TPARAMETER:
				return validateTParameter((TParameter)value, diagnostics, context);
			case ToscaPackage.TPLAN:
				return validateTPlan((TPlan)value, diagnostics, context);
			case ToscaPackage.TPLANS:
				return validateTPlans((TPlans)value, diagnostics, context);
			case ToscaPackage.TPOLICY:
				return validateTPolicy((TPolicy)value, diagnostics, context);
			case ToscaPackage.TPOLICY_TEMPLATE:
				return validateTPolicyTemplate((TPolicyTemplate)value, diagnostics, context);
			case ToscaPackage.TPOLICY_TYPE:
				return validateTPolicyType((TPolicyType)value, diagnostics, context);
			case ToscaPackage.TPROPERTY_CONSTRAINT:
				return validateTPropertyConstraint((TPropertyConstraint)value, diagnostics, context);
			case ToscaPackage.TPROPERTY_MAPPING:
				return validateTPropertyMapping((TPropertyMapping)value, diagnostics, context);
			case ToscaPackage.TRELATIONSHIP_TEMPLATE:
				return validateTRelationshipTemplate((TRelationshipTemplate)value, diagnostics, context);
			case ToscaPackage.TRELATIONSHIP_TYPE:
				return validateTRelationshipType((TRelationshipType)value, diagnostics, context);
			case ToscaPackage.TRELATIONSHIP_TYPE_IMPLEMENTATION:
				return validateTRelationshipTypeImplementation((TRelationshipTypeImplementation)value, diagnostics, context);
			case ToscaPackage.TREQUIRED_CONTAINER_FEATURE:
				return validateTRequiredContainerFeature((TRequiredContainerFeature)value, diagnostics, context);
			case ToscaPackage.TREQUIRED_CONTAINER_FEATURES:
				return validateTRequiredContainerFeatures((TRequiredContainerFeatures)value, diagnostics, context);
			case ToscaPackage.TREQUIREMENT:
				return validateTRequirement((TRequirement)value, diagnostics, context);
			case ToscaPackage.TREQUIREMENT_DEFINITION:
				return validateTRequirementDefinition((TRequirementDefinition)value, diagnostics, context);
			case ToscaPackage.TREQUIREMENT_REF:
				return validateTRequirementRef((TRequirementRef)value, diagnostics, context);
			case ToscaPackage.TREQUIREMENT_TYPE:
				return validateTRequirementType((TRequirementType)value, diagnostics, context);
			case ToscaPackage.TSERVICE_TEMPLATE:
				return validateTServiceTemplate((TServiceTemplate)value, diagnostics, context);
			case ToscaPackage.TTAG:
				return validateTTag((TTag)value, diagnostics, context);
			case ToscaPackage.TTAGS:
				return validateTTags((TTags)value, diagnostics, context);
			case ToscaPackage.TTOPOLOGY_ELEMENT_INSTANCE_STATES:
				return validateTTopologyElementInstanceStates((TTopologyElementInstanceStates)value, diagnostics, context);
			case ToscaPackage.TTOPOLOGY_TEMPLATE:
				return validateTTopologyTemplate((TTopologyTemplate)value, diagnostics, context);
			case ToscaPackage.TYPES_TYPE:
				return validateTypesType((TypesType)value, diagnostics, context);
			case ToscaPackage.VALID_SOURCE_TYPE:
				return validateValidSourceType((ValidSourceType)value, diagnostics, context);
			case ToscaPackage.VALID_TARGET_TYPE:
				return validateValidTargetType((ValidTargetType)value, diagnostics, context);
			case ToscaPackage.MAX_INSTANCES_TYPE_MEMBER1:
				return validateMaxInstancesTypeMember1((MaxInstancesTypeMember1)value, diagnostics, context);
			case ToscaPackage.TBOOLEAN:
				return validateTBoolean((TBoolean)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER1:
				return validateUpperBoundTypeMember1((UpperBoundTypeMember1)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER11:
				return validateUpperBoundTypeMember11((UpperBoundTypeMember11)value, diagnostics, context);
			case ToscaPackage.IMPORTED_URI:
				return validateImportedURI((String)value, diagnostics, context);
			case ToscaPackage.MAX_INSTANCES_TYPE:
				return validateMaxInstancesType(value, diagnostics, context);
			case ToscaPackage.MAX_INSTANCES_TYPE_MEMBER0:
				return validateMaxInstancesTypeMember0((BigInteger)value, diagnostics, context);
			case ToscaPackage.MAX_INSTANCES_TYPE_MEMBER1_OBJECT:
				return validateMaxInstancesTypeMember1Object((MaxInstancesTypeMember1)value, diagnostics, context);
			case ToscaPackage.TBOOLEAN_OBJECT:
				return validateTBooleanObject((TBoolean)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE:
				return validateUpperBoundType(value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE1:
				return validateUpperBoundType1(value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER0:
				return validateUpperBoundTypeMember0((BigInteger)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER01:
				return validateUpperBoundTypeMember01((BigInteger)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER1_OBJECT:
				return validateUpperBoundTypeMember1Object((UpperBoundTypeMember1)value, diagnostics, context);
			case ToscaPackage.UPPER_BOUND_TYPE_MEMBER1_OBJECT1:
				return validateUpperBoundTypeMember1Object1((UpperBoundTypeMember11)value, diagnostics, context);
			default:
				return true;
		}
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateArtifactReferencesType(ArtifactReferencesType artifactReferencesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(artifactReferencesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateCapabilitiesType_TCapability(CapabilitiesType_TCapability capabilitiesType_TCapability, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(capabilitiesType_TCapability, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateCapabilitiesType_CapabilityRef(CapabilitiesType_CapabilityRef capabilitiesType_CapabilityRef, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(capabilitiesType_CapabilityRef, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateCapabilityDefinitionsType(CapabilityDefinitionsType capabilityDefinitionsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(capabilityDefinitionsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateConstraintsType(ConstraintsType constraintsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(constraintsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateDefinitionsType(DefinitionsType definitionsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(definitionsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateDerivedFromType(DerivedFromType derivedFromType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(derivedFromType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateDocumentRoot(DocumentRoot documentRoot, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(documentRoot, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateExcludeType(ExcludeType excludeType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(excludeType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateExtensionsType(ExtensionsType extensionsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(extensionsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateImplementationArtifactType(ImplementationArtifactType implementationArtifactType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(implementationArtifactType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateIncludeType(IncludeType includeType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(includeType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateInputParametersType(InputParametersType inputParametersType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(inputParametersType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateInstanceStateType(InstanceStateType instanceStateType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(instanceStateType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateInterfacesType_TInterface(InterfacesType_TInterface interfacesType_TInterface, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(interfacesType_TInterface, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateInterfacesType_TExportedInterface(InterfacesType_TExportedInterface interfacesType_TExportedInterface, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(interfacesType_TExportedInterface, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateNodeOperationType(NodeOperationType nodeOperationType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(nodeOperationType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateNodeTypeReferenceType(NodeTypeReferenceType nodeTypeReferenceType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(nodeTypeReferenceType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateOutputParametersType(OutputParametersType outputParametersType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(outputParametersType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePlanModelReferenceType(PlanModelReferenceType planModelReferenceType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(planModelReferenceType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePlanModelType(PlanModelType planModelType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(planModelType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePlanType(PlanType planType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(planType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePoliciesType(PoliciesType policiesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(policiesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePropertiesDefinitionType(PropertiesDefinitionType propertiesDefinitionType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(propertiesDefinitionType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePropertiesType(PropertiesType propertiesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(propertiesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePropertiesTypeWithPropertyMappings(PropertiesTypeWithPropertyMappings propertiesTypeWithPropertyMappings, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(propertiesTypeWithPropertyMappings, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePropertyConstraintsType(PropertyConstraintsType propertyConstraintsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(propertyConstraintsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validatePropertyMappingsType(PropertyMappingsType propertyMappingsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(propertyMappingsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRelationshipConstraintsType(RelationshipConstraintsType relationshipConstraintsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(relationshipConstraintsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRelationshipConstraintType(RelationshipConstraintType relationshipConstraintType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(relationshipConstraintType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRelationshipOperationType(RelationshipOperationType relationshipOperationType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(relationshipOperationType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRequirementDefinitionsType(RequirementDefinitionsType requirementDefinitionsType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(requirementDefinitionsType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRequirementsType_TRequirement(RequirementsType_TRequirement requirementsType_TRequirement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(requirementsType_TRequirement, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateRequirementsType_TRequirementRef(RequirementsType_TRequirementRef requirementsType_TRequirementRef, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(requirementsType_TRequirementRef, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateSourceElementType(SourceElementType sourceElementType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(sourceElementType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateSourceInterfacesType(SourceInterfacesType sourceInterfacesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(sourceInterfacesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTAppliesTo(TAppliesTo tAppliesTo, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tAppliesTo, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTargetElementType(TargetElementType targetElementType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(targetElementType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTargetInterfacesType(TargetInterfacesType targetInterfacesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(targetInterfacesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTArtifactReference(TArtifactReference tArtifactReference, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tArtifactReference, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTArtifactTemplate(TArtifactTemplate tArtifactTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tArtifactTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTArtifactType(TArtifactType tArtifactType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tArtifactType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTBoundaryDefinitions(TBoundaryDefinitions tBoundaryDefinitions, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tBoundaryDefinitions, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTCapability(TCapability tCapability, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tCapability, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTCapabilityDefinition(TCapabilityDefinition tCapabilityDefinition, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tCapabilityDefinition, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTCapabilityRef(TCapabilityRef tCapabilityRef, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tCapabilityRef, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTCapabilityType(TCapabilityType tCapabilityType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tCapabilityType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTCondition(TCondition tCondition, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tCondition, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTConstraint(TConstraint tConstraint, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tConstraint, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTDefinitions(TDefinitions tDefinitions, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tDefinitions, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTDeploymentArtifact(TDeploymentArtifact tDeploymentArtifact, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tDeploymentArtifact, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTDeploymentArtifacts(TDeploymentArtifacts tDeploymentArtifacts, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tDeploymentArtifacts, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTDocumentation(TDocumentation tDocumentation, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tDocumentation, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTEntityTemplate(TEntityTemplate tEntityTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tEntityTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTEntityType(TEntityType tEntityType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tEntityType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTExportedInterface(TExportedInterface tExportedInterface, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tExportedInterface, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTExportedOperation(TExportedOperation tExportedOperation, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tExportedOperation, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTExtensibleElements(TExtensibleElements tExtensibleElements, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tExtensibleElements, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTExtension(TExtension tExtension, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tExtension, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTExtensions(TExtensions tExtensions, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tExtensions, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTImplementationArtifact(TImplementationArtifact tImplementationArtifact, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tImplementationArtifact, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTImplementationArtifacts(TImplementationArtifacts tImplementationArtifacts, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tImplementationArtifacts, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTImport(TImport tImport, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tImport, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTInterface(TInterface tInterface, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tInterface, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTNodeTemplate(TNodeTemplate tNodeTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tNodeTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTNodeType(TNodeType tNodeType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tNodeType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTNodeTypeImplementation(TNodeTypeImplementation tNodeTypeImplementation, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tNodeTypeImplementation, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTOperation(TOperation tOperation, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tOperation, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTParameter(TParameter tParameter, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tParameter, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPlan(TPlan tPlan, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPlan, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPlans(TPlans tPlans, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPlans, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPolicy(TPolicy tPolicy, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPolicy, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPolicyTemplate(TPolicyTemplate tPolicyTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPolicyTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPolicyType(TPolicyType tPolicyType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPolicyType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPropertyConstraint(TPropertyConstraint tPropertyConstraint, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPropertyConstraint, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTPropertyMapping(TPropertyMapping tPropertyMapping, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tPropertyMapping, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRelationshipTemplate(TRelationshipTemplate tRelationshipTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRelationshipTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRelationshipType(TRelationshipType tRelationshipType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRelationshipType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRelationshipTypeImplementation(TRelationshipTypeImplementation tRelationshipTypeImplementation, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRelationshipTypeImplementation, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequiredContainerFeature(TRequiredContainerFeature tRequiredContainerFeature, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequiredContainerFeature, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequiredContainerFeatures(TRequiredContainerFeatures tRequiredContainerFeatures, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequiredContainerFeatures, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequirement(TRequirement tRequirement, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequirement, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequirementDefinition(TRequirementDefinition tRequirementDefinition, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequirementDefinition, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequirementRef(TRequirementRef tRequirementRef, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequirementRef, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTRequirementType(TRequirementType tRequirementType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tRequirementType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTServiceTemplate(TServiceTemplate tServiceTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tServiceTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTTag(TTag tTag, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tTag, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTTags(TTags tTags, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tTags, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTTopologyElementInstanceStates(TTopologyElementInstanceStates tTopologyElementInstanceStates, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tTopologyElementInstanceStates, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTTopologyTemplate(TTopologyTemplate tTopologyTemplate, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(tTopologyTemplate, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTypesType(TypesType typesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(typesType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateValidSourceType(ValidSourceType validSourceType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(validSourceType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateValidTargetType(ValidTargetType validTargetType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validate_EveryDefaultConstraint(validTargetType, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesTypeMember1(MaxInstancesTypeMember1 maxInstancesTypeMember1, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTBoolean(TBoolean tBoolean, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember1(UpperBoundTypeMember1 upperBoundTypeMember1, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember11(UpperBoundTypeMember11 upperBoundTypeMember11, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateImportedURI(String importedURI, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesType(Object maxInstancesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validateMaxInstancesType_MemberTypes(maxInstancesType, diagnostics, context);
		return result;
	}

	/**
	 * Validates the MemberTypes constraint of 'Max Instances Type'.
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesType_MemberTypes(Object maxInstancesType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (diagnostics != null) {
			BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
			if (ToscaPackage.Literals.MAX_INSTANCES_TYPE_MEMBER0.isInstance(maxInstancesType)) {
				if (validateMaxInstancesTypeMember0((BigInteger)maxInstancesType, tempDiagnostics, context)) return true;
			}
			if (ToscaPackage.Literals.MAX_INSTANCES_TYPE_MEMBER1.isInstance(maxInstancesType)) {
				if (validateMaxInstancesTypeMember1((MaxInstancesTypeMember1)maxInstancesType, tempDiagnostics, context)) return true;
			}
			for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
				diagnostics.add(diagnostic);
			}
		}
		else {
			if (ToscaPackage.Literals.MAX_INSTANCES_TYPE_MEMBER0.isInstance(maxInstancesType)) {
				if (validateMaxInstancesTypeMember0((BigInteger)maxInstancesType, null, context)) return true;
			}
			if (ToscaPackage.Literals.MAX_INSTANCES_TYPE_MEMBER1.isInstance(maxInstancesType)) {
				if (validateMaxInstancesTypeMember1((MaxInstancesTypeMember1)maxInstancesType, null, context)) return true;
			}
		}
		return false;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesTypeMember0(BigInteger maxInstancesTypeMember0, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = xmlTypeValidator.validateNonNegativeInteger_Min(maxInstancesTypeMember0, diagnostics, context);
		if (result || diagnostics != null) result &= validateMaxInstancesTypeMember0_Pattern(maxInstancesTypeMember0, diagnostics, context);
		return result;
	}

	/**
	 *
	 *
	 * @generated
	 * @see #validateMaxInstancesTypeMember0_Pattern
	 */
	public static final  PatternMatcher [][] MAX_INSTANCES_TYPE_MEMBER0__PATTERN__VALUES =
		new PatternMatcher [][] {
			new PatternMatcher [] {
				XMLTypeUtil.createPatternMatcher("([1-9]+[0-9]*)")
			}
		};

	/**
	 * Validates the Pattern constraint of 'Max Instances Type Member0'.
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesTypeMember0_Pattern(BigInteger maxInstancesTypeMember0, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validatePattern(ToscaPackage.Literals.MAX_INSTANCES_TYPE_MEMBER0, maxInstancesTypeMember0, MAX_INSTANCES_TYPE_MEMBER0__PATTERN__VALUES, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateMaxInstancesTypeMember1Object(MaxInstancesTypeMember1 maxInstancesTypeMember1Object, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateTBooleanObject(TBoolean tBooleanObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundType(Object upperBoundType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validateUpperBoundType_MemberTypes(upperBoundType, diagnostics, context);
		return result;
	}

	/**
	 * Validates the MemberTypes constraint of 'Upper Bound Type'.
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundType_MemberTypes(Object upperBoundType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (diagnostics != null) {
			BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER0.isInstance(upperBoundType)) {
				if (validateUpperBoundTypeMember0((BigInteger)upperBoundType, tempDiagnostics, context)) return true;
			}
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER1.isInstance(upperBoundType)) {
				if (validateUpperBoundTypeMember1((UpperBoundTypeMember1)upperBoundType, tempDiagnostics, context)) return true;
			}
			for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
				diagnostics.add(diagnostic);
			}
		}
		else {
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER0.isInstance(upperBoundType)) {
				if (validateUpperBoundTypeMember0((BigInteger)upperBoundType, null, context)) return true;
			}
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER1.isInstance(upperBoundType)) {
				if (validateUpperBoundTypeMember1((UpperBoundTypeMember1)upperBoundType, null, context)) return true;
			}
		}
		return false;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundType1(Object upperBoundType1, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = validateUpperBoundType1_MemberTypes(upperBoundType1, diagnostics, context);
		return result;
	}

	/**
	 * Validates the MemberTypes constraint of 'Upper Bound Type1'.
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundType1_MemberTypes(Object upperBoundType1, DiagnosticChain diagnostics, Map<Object, Object> context) {
		if (diagnostics != null) {
			BasicDiagnostic tempDiagnostics = new BasicDiagnostic();
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER01.isInstance(upperBoundType1)) {
				if (validateUpperBoundTypeMember01((BigInteger)upperBoundType1, tempDiagnostics, context)) return true;
			}
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER11.isInstance(upperBoundType1)) {
				if (validateUpperBoundTypeMember11((UpperBoundTypeMember11)upperBoundType1, tempDiagnostics, context)) return true;
			}
			for (Diagnostic diagnostic : tempDiagnostics.getChildren()) {
				diagnostics.add(diagnostic);
			}
		}
		else {
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER01.isInstance(upperBoundType1)) {
				if (validateUpperBoundTypeMember01((BigInteger)upperBoundType1, null, context)) return true;
			}
			if (ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER11.isInstance(upperBoundType1)) {
				if (validateUpperBoundTypeMember11((UpperBoundTypeMember11)upperBoundType1, null, context)) return true;
			}
		}
		return false;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember0(BigInteger upperBoundTypeMember0, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = xmlTypeValidator.validateNonNegativeInteger_Min(upperBoundTypeMember0, diagnostics, context);
		if (result || diagnostics != null) result &= validateUpperBoundTypeMember0_Pattern(upperBoundTypeMember0, diagnostics, context);
		return result;
	}

	/**
	 *
	 *
	 * @generated
	 * @see #validateUpperBoundTypeMember0_Pattern
	 */
	public static final  PatternMatcher [][] UPPER_BOUND_TYPE_MEMBER0__PATTERN__VALUES =
		new PatternMatcher [][] {
			new PatternMatcher [] {
				XMLTypeUtil.createPatternMatcher("([1-9]+[0-9]*)")
			}
		};

	/**
	 * Validates the Pattern constraint of 'Upper Bound Type Member0'.
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember0_Pattern(BigInteger upperBoundTypeMember0, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validatePattern(ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER0, upperBoundTypeMember0, UPPER_BOUND_TYPE_MEMBER0__PATTERN__VALUES, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember01(BigInteger upperBoundTypeMember01, DiagnosticChain diagnostics, Map<Object, Object> context) {
		boolean result = xmlTypeValidator.validateNonNegativeInteger_Min(upperBoundTypeMember01, diagnostics, context);
		if (result || diagnostics != null) result &= validateUpperBoundTypeMember01_Pattern(upperBoundTypeMember01, diagnostics, context);
		return result;
	}

	/**
	 *
	 *
	 * @generated
	 * @see #validateUpperBoundTypeMember01_Pattern
	 */
	public static final  PatternMatcher [][] UPPER_BOUND_TYPE_MEMBER01__PATTERN__VALUES =
		new PatternMatcher [][] {
			new PatternMatcher [] {
				XMLTypeUtil.createPatternMatcher("([1-9]+[0-9]*)")
			}
		};

	/**
	 * Validates the Pattern constraint of 'Upper Bound Type Member01'.
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember01_Pattern(BigInteger upperBoundTypeMember01, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return validatePattern(ToscaPackage.Literals.UPPER_BOUND_TYPE_MEMBER01, upperBoundTypeMember01, UPPER_BOUND_TYPE_MEMBER01__PATTERN__VALUES, diagnostics, context);
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember1Object(UpperBoundTypeMember1 upperBoundTypeMember1Object, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public boolean validateUpperBoundTypeMember1Object1(UpperBoundTypeMember11 upperBoundTypeMember1Object1, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}

	/**
	 * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
	 *
	 *
	 * @generated
	 */
	@Override
	public ResourceLocator getResourceLocator() {
		// TODO
		// Specialize this to return a resource locator for messages specific to this validator.
		// Ensure that you remove @generated or mark it @generated NOT
		return super.getResourceLocator();
	}

} //ToscaValidator


text:
package io.orchestrate.client;

import lombok.EqualsAndHashCode;
import org.glassfish.grizzly.CompletionHandler;
import org.glassfish.grizzly.http.HttpContent;

import java.io.IOException;

/**
 * A listener that proxies the Grizzly NIO completion event to a
 * {@code ResponseListener}.
 *
 * @param <T> The type to deserialize the HTTP response into.
 */
@EqualsAndHashCode
final class ResponseCompletionHandler<T> implements CompletionHandler<T> {

    /** The listener to proxy the HTTP response to. */
    private final ResponseListener<T> listener;

    public ResponseCompletionHandler(final ResponseListener<T> listener) {
        assert (listener != null);

        this.listener = listener;
    }

    /** {@inheritDoc} */
    @Override
    public void cancelled() {
        // not used
    }

    /** {@inheritDoc} */
    @Override
    public void failed(final Throwable throwable) {
        listener.onFailure(throwable);
    }

    /** {@inheritDoc} */
    @Override
    public void completed(final T result) {
        listener.onSuccess(result);
    }

    /** {@inheritDoc} */
    @Override
    public void updated(final T result) {
        // not used
    }

}


text:
package io.sarl.lang.tests.bugs.to00699;

import com.google.inject.Inject;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.testing.CompilationTestHelper;
import org.junit.Test;

import io.sarl.lang.SARLVersion;
import io.sarl.lang.sarl.SarlPackage;
import io.sarl.lang.sarl.SarlScript;
import io.sarl.tests.api.AbstractSarlTest;

/** Testing class for issue: Invalid floating point value in inline expression.
 *
 * <p>https://github.com/sarl/sarl/issues/631
 *
 * @author $Author: sgalland$
 * @version $Name$ $Revision$ $Date$
 * @mavengroupid $GroupId$
 * @mavenartifactid $ArtifactId$
 */
@SuppressWarnings("all")
public class Bug631 extends AbstractSarlTest {

	private static final String SNIPSET1 = multilineString(
			"package io.sarl.lang.tests.bug631",
			"class XXX {",
			"  def fct : float {",
			"    0f",
			"  }",
			"  def fct2 : float[] {",
			"    #[ 0f, fct ]",
			"  }",
			"}");

	@Inject
	private CompilationTestHelper compiler;

	@Test
	public void parsing_01() throws Exception {
		SarlScript mas = file(SNIPSET1);
		final Validator validator = validate(mas);
		validator.assertNoErrors();
	}

	@Test
	public void compiling_01() throws Exception {
		this.compiler.assertCompilesTo(SNIPSET1, multilineString(
				"package io.sarl.lang.tests.bug631;",
				"",
				"import io.sarl.lang.annotation.SarlElementType;",
				"import io.sarl.lang.annotation.SarlSpecification;",
				"import io.sarl.lang.annotation.SyntheticMember;",
				"import org.eclipse.xtext.xbase.lib.Inline;",
				"",
				"@SarlSpecification(\"" + SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING + "\")",
				"@SarlElementType(" + SarlPackage.SARL_CLASS + ")",
				"@SuppressWarnings(\"all\")",
				"public class XXX {",
				"  @Inline(value = \"0.0f\", constantExpression = true)",
				"  public float fct() {",
				"    return 0f;",
				"  }",
				"  ",
				"  public float[] fct2() {",
				"    float _fct = 0.0f;",
				"    return new float[] { 0f, _fct };",
				"  }",
				"  ",
				"  @SyntheticMember",
				"  public XXX() {",
				"    super();",
				"  }",
				"}",
				""));
	}

}