text:
package logalert

import (
	"fmt"
	"io"
	"log"
	"sync"
	"time"
)

// Logger is the logalert logger
type Logger struct {
	*sync.Mutex
	infoLogger    *log.Logger
	errLogger     *log.Logger
	alertSenders  []AlertSender
	gracePeriod   time.Duration
	lastAlertSent time.Time
}

// NewLogger init a new logalert
func NewLogger(infoWriter, errWritter io.Writer, alertSenders []AlertSender, gracePeriodSeconds int) *Logger {
	logger := Logger{
		&sync.Mutex{},
		log.New(infoWriter, "INFO: ", log.Ldate|log.Ltime),
		log.New(errWritter, "ERROR: ", log.Ldate|log.Ltime),
		alertSenders,
		time.Duration(gracePeriodSeconds) * time.Second,
		time.Unix(0, 0),
	}
	return &logger
}

// SetAlertSenders set alert senders
func (l *Logger) SetAlertSenders(as []AlertSender) {
	l.Lock()
	defer l.Unlock()
	l.alertSenders = as
}

// SendAlert send alerts via alertSenders
func (l *Logger) SendAlert(v ...interface{}) {
	l.Lock()
	defer l.Unlock()
	if time.Since(l.lastAlertSent) > l.gracePeriod {
		for _, sender := range l.alertSenders {
			sender.Send(fmt.Sprint(formatMsg(v...)))
		}
		l.lastAlertSent = time.Now()
	}
}

// Info log at INFO level
func (l *Logger) Info(v ...interface{}) {
	l.infoLogger.Println(formatMsg(v...))
	return
}

// InfoAlert log at info level and send alert
func (l *Logger) InfoAlert(v ...interface{}) {
	l.Info(v...)
	l.SendAlert(v...)
	return
}

// Error write error log
func (l *Logger) Error(v ...interface{}) {
	l.errLogger.Println(formatMsg(v...))
	return
}

// ErrorAlert write error log and send alert
func (l *Logger) ErrorAlert(v ...interface{}) {
	l.Error(v...)
	l.SendAlert(v...)
	return
}

// formatErrorMsg format error output
func formatMsg(v ...interface{}) string {
	m := ""
	for _, part := range v {
		m = m + fmt.Sprintf("%v", part)
	}
	return m
}


text:
package com.intellij.xml.util;

import com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor;
import com.intellij.lang.Language;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.UserDataCache;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.resolve.reference.impl.providers.IdReferenceProvider;
import com.intellij.psi.impl.source.xml.SchemaPrefix;
import com.intellij.psi.impl.source.xml.SchemaPrefixReference;
import com.intellij.psi.templateLanguages.OuterLanguageElement;
import com.intellij.psi.util.CachedValue;
import com.intellij.psi.util.CachedValueProvider;
import com.intellij.psi.util.CachedValuesManager;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.*;
import com.intellij.util.NullableFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.xml.XmlAttributeDescriptor;
import com.intellij.xml.XmlElementDescriptor;
import com.intellij.xml.XmlExtension;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

/**
 * @author spleaner
 */
public class XmlRefCountHolder {
  private static final Key<CachedValue<XmlRefCountHolder>> xmlRefCountHolderKey = Key.create("xml ref count holder");

  private final static UserDataCache<CachedValue<XmlRefCountHolder>, XmlFile, Object> CACHE =
    new UserDataCache<CachedValue<XmlRefCountHolder>, XmlFile, Object>() {
      protected CachedValue<XmlRefCountHolder> compute(final XmlFile file, final Object p) {
        return CachedValuesManager.getManager(file.getProject()).createCachedValue(new CachedValueProvider<XmlRefCountHolder>() {
          public Result<XmlRefCountHolder> compute() {
            final XmlRefCountHolder holder = new XmlRefCountHolder();
            final Language language = file.getViewProvider().getBaseLanguage();
            final PsiFile psiFile = file.getViewProvider().getPsi(language);
            assert psiFile != null;
            psiFile.accept(new IdGatheringRecursiveVisitor(holder));
            return new Result<XmlRefCountHolder>(holder, file);
          }
        }, false);
      }
    };

  private final Map<String, List<Pair<XmlAttributeValue, Boolean>>> myId2AttributeListMap = new HashMap<String, List<Pair<XmlAttributeValue, Boolean>>>();
  private final Set<XmlAttributeValue> myPossiblyDuplicateIds = new HashSet<XmlAttributeValue>();
  private final List<XmlAttributeValue> myIdReferences = new ArrayList<XmlAttributeValue>();
  private final Set<String> myAdditionallyDeclaredIds = new HashSet<String>();
  private final Set<PsiElement> myDoNotValidateParentsList = new HashSet<PsiElement>();
  private final Set<String> myUsedPrefixes = new HashSet<String>();

  @Nullable
  public static XmlRefCountHolder getRefCountHolder(final XmlElement element) {
    PsiFile file = element.getContainingFile();
    return file instanceof XmlFile ? CACHE.get(xmlRefCountHolderKey, (XmlFile)file, null).getValue() : null;
  }

  private XmlRefCountHolder() {
  }

  public boolean isDuplicateIdAttributeValue(@NotNull final XmlAttributeValue value) {
    return myPossiblyDuplicateIds.contains(value);
  }

  public boolean isValidatable(@Nullable final PsiElement element) {
    return !myDoNotValidateParentsList.contains(element);
  }

  public boolean hasIdDeclaration(@NotNull final String idRef) {
    return myId2AttributeListMap.get(idRef) != null || myAdditionallyDeclaredIds.contains(idRef);
  }

  public boolean isIdReferenceValue(@NotNull final XmlAttributeValue value) {
    return myIdReferences.contains(value);
  }

  private void registerId(@NotNull final String id, @NotNull final XmlAttributeValue attributeValue, final boolean soft) {
    List<Pair<XmlAttributeValue, Boolean>> list = myId2AttributeListMap.get(id);
    if (list == null) {
      list = new ArrayList<Pair<XmlAttributeValue, Boolean>>();
      myId2AttributeListMap.put(id, list);
    }
    else if (!soft) {
      // mark as duplicate
      List<XmlAttributeValue> notSoft = ContainerUtil.mapNotNull(list, new NullableFunction<Pair<XmlAttributeValue, Boolean>, XmlAttributeValue>() {
        @Override
        public XmlAttributeValue fun(Pair<XmlAttributeValue, Boolean> pair) {
          return pair.second ? null : pair.first;
        }
      });
      if (!notSoft.isEmpty()) {
        myPossiblyDuplicateIds.addAll(notSoft);
        myPossiblyDuplicateIds.add(attributeValue);
      }
    }

    list.add(new Pair<XmlAttributeValue, Boolean>(attributeValue, soft));
  }

  private void registerAdditionalId(@NotNull final String id) {
    myAdditionallyDeclaredIds.add(id);
  }

  private void registerIdReference(@NotNull final XmlAttributeValue value) {
    myIdReferences.add(value);
  }

  private void registerOuterLanguageElement(@NotNull final PsiElement element) {
    PsiElement parent = element.getParent();

    if (parent instanceof XmlText) {
      parent = parent.getParent();
    }

    myDoNotValidateParentsList.add(parent);
  }

  public boolean isInUse(String prefix) {
    return myUsedPrefixes.contains(prefix);
  }

  private static class IdGatheringRecursiveVisitor extends XmlRecursiveElementVisitor {
    private final XmlRefCountHolder myHolder;

    private IdGatheringRecursiveVisitor(@NotNull XmlRefCountHolder holder) {
      super(true);
      myHolder = holder;
    }

    @Override
    public void visitElement(final PsiElement element) {
      if (element instanceof OuterLanguageElement) {
        visitOuterLanguageElement(element);
      }

      super.visitElement(element);
    }

    private void visitOuterLanguageElement(@NotNull final PsiElement element) {
      myHolder.registerOuterLanguageElement(element);
    }

    @Override
    public void visitComment(final PsiComment comment) {
      doVisitAnyComment(comment);
      super.visitComment(comment);
    }

    @Override
    public void visitXmlComment(final XmlComment comment) {
      doVisitAnyComment(comment);
      super.visitXmlComment(comment);
    }

    private void doVisitAnyComment(final PsiComment comment) {
      final String id = XmlDeclareIdInCommentAction.getImplicitlyDeclaredId(comment);
      if (id != null) {
        myHolder.registerAdditionalId(id);
      }
    }

    @Override
    public void visitXmlTag(XmlTag tag) {
      myHolder.addUsedPrefix(tag.getNamespacePrefix());
      super.visitXmlTag(tag);
    }

    @Override
    public void visitXmlAttribute(XmlAttribute attribute) {
      if (!attribute.isNamespaceDeclaration()) {
        myHolder.addUsedPrefix(attribute.getNamespacePrefix());
      }
      super.visitXmlAttribute(attribute);
    }

    @Override
    public void visitXmlAttributeValue(final XmlAttributeValue value) {
      final PsiElement element = value.getParent();
      if (!(element instanceof XmlAttribute)) return;

      final XmlAttribute attribute = (XmlAttribute)element;

      final XmlTag tag = attribute.getParent();
      if (tag == null) return;

      final XmlElementDescriptor descriptor = tag.getDescriptor();
      if (descriptor == null) return;

      final XmlAttributeDescriptor attributeDescriptor = descriptor.getAttributeDescriptor(attribute);
      if (attributeDescriptor == null) return;

      if (attributeDescriptor.hasIdType()) {
        updateMap(attribute, value, false);
      }
      else {
        final PsiReference[] references = value.getReferences();
        for (PsiReference r : references) {
          if (r instanceof IdReferenceProvider.GlobalAttributeValueSelfReference /*&& !r.isSoft()*/) {
            updateMap(attribute, value, r.isSoft());
          }
          else if (r instanceof SchemaPrefixReference) {
            SchemaPrefix prefix = ((SchemaPrefixReference)r).resolve();
            if (prefix != null) {
              myHolder.addUsedPrefix(prefix.getName());
            }
          }
        }
        String[] prefixes = XmlExtension.getExtension(tag.getContainingFile()).getUsedPrefixes(value);
        if (prefixes != null) {
          for (String prefix : prefixes) {
            myHolder.addUsedPrefix(prefix);
          }
        }
      }

      if (attributeDescriptor.hasIdRefType() && PsiTreeUtil.getChildOfType(value, OuterLanguageElement.class) == null) {
        myHolder.registerIdReference(value);
      }

      super.visitXmlAttributeValue(value);
    }

    private void updateMap(@NotNull final XmlAttribute attribute, @NotNull final XmlAttributeValue value, final boolean soft) {
      final String id = XmlHighlightVisitor.getUnquotedValue(value, attribute.getParent());
      if (XmlUtil.isSimpleXmlAttributeValue(id, value) &&
          PsiTreeUtil.getChildOfType(value, OuterLanguageElement.class) == null) {
        myHolder.registerId(id, value, soft);
      }
    }
  }

  private void addUsedPrefix(String prefix) {
    myUsedPrefixes.add(prefix);
  }
}

redpajama_set_name: RedPajamaGithub


text:
// Copyright 2015 Andrea McIntosh, Dylan Ashley, Anju Eappen, Jenna Hatchard, Kirsten Svidal, Raghav Vamaraju
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ca.ualberta.trinkettrader.Friends;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.TextView;

import java.util.Observable;
import java.util.Observer;

import ca.ualberta.trinkettrader.ApplicationState;
import ca.ualberta.trinkettrader.R;
import ca.ualberta.trinkettrader.User.User;

/**
 * Android activity for displaying a user's friends profile. Displays the friends details,
 * such as their username, name, etc. It also displays whether the friend is currently tracked,
 */

public class FriendsProfileActivity extends Activity implements Observer {

    private User friend;
    private Button removeFriendButton;
    private Button backButton;
    private RadioButton trackedRadioButton;
    private TextView usernameTextView;
    private TextView nameTextView;
    private FriendsProfileController controller;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_friends_profile);
        friend = ApplicationState.getInstance().getClickedFriend().getActualFriend();
        removeFriendButton = (Button) findViewById(R.id.removeFriendButton);
        backButton = (Button) findViewById(R.id.backToFriendsListFromProfile);
        trackedRadioButton = (RadioButton) findViewById(R.id.trackedRadioButton);
        controller = new FriendsProfileController(this);

        usernameTextView = (TextView) findViewById(R.id.usernameText);
        nameTextView = (TextView) findViewById(R.id.nameText);

        updateFields();
    }

    private void updateFields() {
        this.getUsernameTextView().setText(friend.getProfile().getUsername());
        trackedRadioButton.setChecked(ApplicationState.getInstance().getClickedFriend().isTracked());
    }

    /**
     * Gets textView for displaying friend's username.
     *
     * @return TextView
     */
    public TextView getUsernameTextView() {
        return usernameTextView;
    }

    /**
     * Gets textView for displaying friend's name.
     *
     * @return TextView
     */
    public TextView getNameTextView() {
        return nameTextView;
    }

    /**
     * Gets button for removing friends.
     *
     * @return Button
     */
    public Button getRemoveFriendButton() {
        return removeFriendButton;
    }

    /**
     * Returns RadioButton that indicates if a friend is tracked or not.
     *
     * @return RadioButton
     */
    public RadioButton getTrackedRadioButton() {
        return trackedRadioButton;
    }

    /**
     * Directs controller to handle Remove Friends button click.
     *
     * @param v remove friends button
     */
    public void removeFriendButtonOnClick(View v) {
        controller.removeFriendButtonOnClick();
    }

    /**
     * On-click method for the View Inventory button on the Friend's Profile page.
     * Directs controller to handle the View Inventory button click.
     *
     * @param v the View Inventory button in the FriendsProfileActivity
     */
    public void viewInventoryButtonOnClick(View v) {
        controller.viewInventoryButtonOnClick();
    }

    /**
     * Directs controller to handle track friends radio button click.
     *
     * @param v track friends radio button
     */
    public void trackedRadioButtonOnClick(View v) {
        controller.trackedRadioButtonOnClick();
    }

    /**
     * Directs controller to handle click to return to Friends List activity.
     *
     * @param v back to friends list button
     */
    public void backToFriendsListButtonFromProfileOnClick(View v) {
        controller.backToFriendsListButtonFromProfileOnClick();
    }

    /**
     * Gets button that directs back to friends list activity.
     *
     * @return Button
     */
    public Button getBackButton() {
        return backButton;
    }

    /**
     * This method is called if the specified {@code Observable} object's
     * {@code notifyObservers} method is called (because the {@code Observable}
     * object has been updated.
     *
     * @param observable the {@link Observable} object.
     * @param data       the data passed to {@link Observable#notifyObservers(Object)}.
     */
    @Override
    public void update(Observable observable, Object data) {

    }
}


text:
package org.elasticsearch.test.common.network;

import org.elasticsearch.common.network.NetworkAddress;
import org.elasticsearch.testframework.ESTestCase;

import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.Random;

/**
 * Tests for network address formatting. Please avoid using any methods that cause DNS lookups!
 */
public class NetworkAddressTests extends ESTestCase {

    public void testFormatV4() throws Exception {
        assertEquals("127.0.0.1", NetworkAddress.format(forge("localhost", "127.0.0.1")));
        assertEquals("127.0.0.1", NetworkAddress.format(forge(null, "127.0.0.1")));
    }

    public void testFormatV6() throws Exception {
        assertEquals("::1", NetworkAddress.format(forge("localhost", "::1")));
        assertEquals("::1", NetworkAddress.format(forge(null, "::1")));
    }

    public void testFormatPortV4() throws Exception {
        assertEquals("127.0.0.1:1234", NetworkAddress.format(new InetSocketAddress(forge("localhost", "127.0.0.1"), 1234)));
        assertEquals("127.0.0.1:1234", NetworkAddress.format(new InetSocketAddress(forge(null, "127.0.0.1"), 1234)));
    }

    public void testFormatPortV6() throws Exception {
        assertEquals("[::1]:1234", NetworkAddress.format(new InetSocketAddress(forge("localhost", "::1"), 1234)));
        assertEquals("[::1]:1234", NetworkAddress.format(new InetSocketAddress(forge(null, "::1"), 1234)));
    }

    public void testNoScopeID() throws Exception {
        assertEquals("::1", NetworkAddress.format(forgeScoped(null, "::1", 5)));
        assertEquals("::1", NetworkAddress.format(forgeScoped("localhost", "::1", 5)));

        assertEquals("[::1]:1234", NetworkAddress.format(new InetSocketAddress(forgeScoped(null, "::1", 5), 1234)));
        assertEquals("[::1]:1234", NetworkAddress.format(new InetSocketAddress(forgeScoped("localhost", "::1", 5), 1234)));
    }

    /** Test that ipv4 address formatting round trips */
    public void testRoundTripV4() throws Exception {
        roundTrip(new byte[4]);
    }

    /** Test that ipv6 address formatting round trips */
    public void testRoundTripV6() throws Exception {
        roundTrip(new byte[16]);
    }

    /**
     * Round trip test code for both IPv4 and IPv6. {@link InetAddress} contains the {@code getByAddress} and
     * {@code getbyName} methods for both IPv4 and IPv6, unless you also specify a {@code scopeid}, which this does not
     * test.
     *
     * @param bytes 4 (32-bit for IPv4) or 16 bytes (128-bit for IPv6)
     * @throws Exception if any error occurs while interacting with the network address
     */
    private void roundTrip(byte[] bytes) throws Exception {
        Random random = random();
        for (int i = 0; i < 10000; i++) {
            random.nextBytes(bytes);
            InetAddress expected = InetAddress.getByAddress(bytes);
            String formatted = NetworkAddress.format(expected);
            InetAddress actual = InetAddress.getByName(formatted);
            assertEquals(expected, actual);
        }
    }

    /** creates address without any lookups. hostname can be null, for missing */
    private InetAddress forge(String hostname, String address) throws IOException {
        byte bytes[] = InetAddress.getByName(address).getAddress();
        return InetAddress.getByAddress(hostname, bytes);
    }

    /** creates scoped ipv6 address without any lookups. hostname can be null, for missing */
    private InetAddress forgeScoped(String hostname, String address, int scopeid) throws IOException {
        byte bytes[] = InetAddress.getByName(address).getAddress();
        return Inet6Address.getByAddress(hostname, bytes, scopeid);
    }

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Sphaeria stilbostoma Fr., 1817

### Remarks
null


text:
package jp.ats.liverwort.sql;

import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;

import jp.ats.liverwort.jdbc.LiPreparedStatement;
import jp.ats.liverwort.jdbc.PreparedStatementComplementer;

/**
 * SQL 文に含まれる条件句を表すクラスです。条件句とは、具体的には WHERE 句と HAVING 句をさしています。
 *
 * @author 千葉 哲嗣
 * @see ConditionFactory
 * @see QueryBuilder#setWhereClause(Condition)
 * @see QueryBuilder#setHavingClause(Condition)
 */
public class Condition extends QueryClause {

	//!! このクラスに新たにメソッドを追加する場合は、 ProxyCondition にも追加すること !!

	/**
	 * 論理演算子の列挙型です。
	 *
	 * @author 千葉 哲嗣
	 * @version $Name: v0_4_20090119a $
	 */
	private enum LogicalOperator {

		/**
		 * 論理演算子 'AND'
		 */
		AND("AND", false),

		/**
		 * 論理演算子 'OR'
		 */
		OR("OR", true);

		private final String operator;

		private final boolean weak;

		private LogicalOperator(String operator, boolean weak) {
			this.operator = " " + operator + " ";
			this.weak = weak;
		}

		@Override
		public String toString() {
			return operator;
		}

		private String process(LogicalOperator operator, String clause) {
			if (operator == null || this == operator || weak) return clause;
			return "(" + clause + ")";
		}
	}

	private String clause;

	private final List<Column> columns = new LinkedList<>();

	private final List<Binder> binders = new LinkedList<>();

	private LogicalOperator current;

	private String keyword = "";

	Condition(String clause, Column[] columns, Binder[] binders) {
		this.clause = clause;
		this.columns.addAll(Arrays.asList(columns));
		this.binders.addAll(Arrays.asList(binders));
	}

	private Condition() {
		clause = null;
	}

	/**
	 * このインスタンスが表す条件に、新たな条件を AND 追加します。
	 *
	 * @param target 追加する条件
	 */
	public void and(Condition target) {
		//append が ProxyCondition でオーバーライドされているので、
		//このメソッドは ProxyCondition でオーバーライドしなくても OK
		append(LogicalOperator.AND, target);
	}

	/**
	 * このインスタンスが表す条件に、新たな条件を OR 追加します。
	 *
	 * @param target 追加する条件
	 */
	public void or(Condition target) {
		//append が ProxyCondition でオーバーライドされているので、
		//このメソッドは ProxyCondition でオーバーライドしなくても OK
		append(LogicalOperator.OR, target);
	}

	/**
	 * この条件を反転させます。
	 *

	 * 具体的には、条件の先頭に NOT を付加します。
	 */
	public void reverse() {
		clearCache();
		clause = "NOT (" + clause + ")";
		current = null;
	}

	/**
	 * このインスタンスに条件が含まれるかどうかを検査します。
	 *
	 * @return 条件が含まれる場合 true
	 */
	public boolean isAvailable() {
		return true;
	}

	/**
	 * プレースホルダにセットする予定の値を返します。
	 *
	 * @return 値
	 */
	public Binder[] getBinders() {
		return binders.toArray(new Binder[binders.size()]);
	}

	/**
	 * プレースホルダにセットする予定の値を {@link PreparedStatementComplementer} として返します。
	 *
	 * @return {@link PreparedStatementComplementer}
	 */
	public PreparedStatementComplementer getComplementer() {
		return new InnerComplementer(0);
	}

	/**
	 * プレースホルダにセットする予定の値を {@link PreparedStatementComplementer} として返します。
	 *

	 * 返される PreparedStatementComplementer は、パラメータの skipCount 分だけプレースホルダ位置をスキップして値をセットします。
	 *
	 * @param skipCount 飛ばすプレースホルダ数
	 * @return {@link PreparedStatementComplementer}
	 */
	public PreparedStatementComplementer getComplementer(int skipCount) {
		return new InnerComplementer(skipCount);
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof Condition)) return false;
		Condition target = strip((Condition) o);
		if (target == null) return false;
		if (!equalsWithoutBinders(target) || !binders.equals(target.binders)) return false;
		return true;
	}

	@Override
	public int hashCode() {
		List<Object> members = new LinkedList<>();
		members.add(clause);
		members.add(current);
		members.addAll(columns);
		members.addAll(binders);
		return Objects.hash(members);
	}

	@Override
	public int getColumnsSize() {
		return columns.size();
	}

	@Override
	public Condition replicate() {
		Binder[] replicateBinders = new Binder[binders.size()];
		int counter = 0;
		for (Iterator<Binder> i = binders.iterator(); i.hasNext(); counter++) {
			replicateBinders[counter] = i.next().replicate();
		}
		Condition clone = new Condition(clause, columns.toArray(new Column[columns.size()]), replicateBinders);
		clone.current = current;
		clone.keyword = keyword;
		return clone;
	}

	/**
	 * このインスタンスの持つ {@link Column} が属する {@link Relationship} をパラメータのものに変更します。
	 *
	 * @param another 新しい {@link Relationship}
	 * @throws NotFoundException このインスタンスが持つカラムの属する {@link Relationship} の参照先に another が含まれない場合
	 */
	public void changeColumnsRelationshipTo(Relationship another) {
		int size = columns.size();
		for (int i = 0; i < size; i++) {
			columns.set(i, columns.get(i).findAnotherRootColumn(another));
		}
	}

	/**
	 * このインスタンスが表す条件に、新たな条件を追加します。
	 *
	 * @param operator 論理演算子 AND OR
	 * @param target 追加する条件
	 */
	void append(LogicalOperator operator, Condition target) {
		target = strip(target);
		if (target == null) return;
		clearCache();
		clause = target.delegateProcess(operator, current, clause, columns.size());
		columns.addAll(target.columns);
		binders.addAll(target.binders);
		current = operator;
	}

	boolean equalsWithoutBinders(Condition target) {
		if (this == target) return true;
		target = strip(target);
		if (target == null) return false;
		if (!clause.equals(target.clause)
			|| !columns.equals(target.columns)
			|| binders.size() != target.binders.size()
			|| current != target.current) return false;
		return true;
	}

	void changeBinders(Binder[] newBinders) {
		binders.clear();
		binders.addAll(Arrays.asList(newBinders));
	}

	void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	@Override
	String getKeyword() {
		return keyword;
	}

	@Override
	String getTemplate() {
		return clause;
	}

	@Override
	List<Column> getColumnsInternal() {
		return columns;
	}

	String delegateProcess(
		LogicalOperator newOperator,
		LogicalOperator baseCurrentOperator,
		String baseClause,
		int skipCount) {
		int columnsSize = columns.size();
		String[] replace = new String[columnsSize];
		for (int i = 0; i < columnsSize; i++) {
			replace[i] = "{" + (i + skipCount) + "}";
		}
		return newOperator.process(baseCurrentOperator, baseClause)
			+ newOperator
			+ newOperator.process(current, SQLFragmentFormat.execute(getTemplate(), replace));
	}

	private static Condition strip(Condition condition) {
		if (condition instanceof ProxyCondition) return strip(((ProxyCondition) condition).inclusion);
		return condition;
	}

	private class InnerComplementer implements PreparedStatementComplementer {

		private final int skipCount;

		private InnerComplementer(int skipCount) {
			this.skipCount = skipCount;
		}

		@Override
		public int complement(LiPreparedStatement statement) {
			int counter = skipCount;
			for (Iterator<Binder> i = binders.iterator(); i.hasNext(); counter++) {
				i.next().bind(counter + 1, statement);
			}
			return counter;
		}
	}

	static class ProxyCondition extends Condition {

		private Condition inclusion;

		ProxyCondition() {}

		@Override
		public String toString() {
			if (inclusion == null) return "";
			return inclusion.toString();
		}

		@Override
		public void reverse() {
			if (inclusion == null) return;
			inclusion.reverse();
		}

		@Override
		public boolean isAvailable() {
			if (inclusion == null) return false;
			return inclusion.isAvailable();
		}

		@Override
		public Binder[] getBinders() {
			if (inclusion == null) return Binder.EMPTY_ARRAY;
			return inclusion.getBinders();
		}

		@Override
		public PreparedStatementComplementer getComplementer() {
			if (inclusion == null) return new ProxyInnerComplementer();
			return inclusion.getComplementer();
		}

		@Override
		public PreparedStatementComplementer getComplementer(int skipCount) {
			if (inclusion == null) return new ProxyInnerComplementer();
			return inclusion.getComplementer(skipCount);

		}

		@Override
		public boolean equals(Object o) {
			if (!(o instanceof Condition)) return false;
			if (inclusion == null) return !((Condition) o).isAvailable();
			return inclusion.equals(o);
		}

		@Override
		public int hashCode() {
			if (inclusion == null) return 0;
			return inclusion.hashCode();
		}

		@Override
		public int getColumnsSize() {
			if (inclusion == null) return 0;
			return inclusion.getColumnsSize();
		}

		@Override
		public Condition replicate() {
			if (inclusion == null) return new ProxyCondition();
			return inclusion.replicate();
		}

		@Override
		public void changeColumnsRelationshipTo(Relationship relationship) {
			if (inclusion == null) return;
			inclusion.changeColumnsRelationshipTo(relationship);
		}

		@Override
		void append(LogicalOperator operator, Condition clause) {
			if (inclusion == null) {
				inclusion = clause.replicate();
			} else {
				inclusion.append(operator, clause);
			}
		}

		@Override
		boolean equalsWithoutBinders(Condition target) {
			if (inclusion == null) return !target.isAvailable();
			return inclusion.equalsWithoutBinders(target);
		}

		@Override
		void changeBinders(Binder[] newBinders) {
			if (inclusion == null) return;
			inclusion.changeBinders(newBinders);
		}

		@Override
		void setKeyword(String keyword) {
			if (inclusion == null) return;
			inclusion.setKeyword(keyword);
		}

		@Override
		String getKeyword() {
			if (inclusion == null) return "";
			return inclusion.getKeyword();
		}

		@Override
		String getTemplate() {
			if (inclusion == null) return "";
			return inclusion.getTemplate();
		}

		@Override
		List<Column> getColumnsInternal() {
			if (inclusion == null) return super.columns;
			return inclusion.getColumnsInternal();
		}

		@Override
		void join(FromClause fromClause) {
			if (inclusion == null) return;
			inclusion.join(fromClause);
		}
	}

	private static class ProxyInnerComplementer implements PreparedStatementComplementer {

		@Override
		public int complement(LiPreparedStatement statement) {
			return 0;
		}
	}
}


text:
#include <config.h>
#include <phys2bus.h>

unsigned long phys_to_bus(unsigned long phys)
{
#ifdef CONFIG_BCM2836
	return 0xc0000000 | phys;
#else
	return 0x40000000 | phys;
#endif
}

unsigned long bus_to_phys(unsigned long bus)
{
	return bus & ~0xc0000000;
}


text:
function constrArgs = parseTemplates( varargin )
%PARSETEMPLATES Construct property name-value pairs for the nlsaModel_ent class
%   constructor from templates.
%
%   The arguments of parseTemplates are passed as property name-property value
%   pairs using the syntax:
%
%   propNameVals  = parseTemplates( propName1, propVal1, propName2, propVal2, ... ).
%
%   The following properties can be specified in addition to those available in the
%   parseTemplates method of the nlsaModel_ose superclass:
%
%   'sclPartition': An [ 1 nRO ]-sized vector of nlsaPartition objects
%      specifying how each realization in the OSE dataset is to be partitioned.
%      The number of samples in partition( iR ) must be equal to nSE( iR ),
%      where nSE( iR ) is the number of samples in the iR-th realization
%      after time lagged embedding.
%
%   'sclOutPairwiseDistanceTemplate': An nlsaPairwiseDistance_scl object specifying
%      the method and parameters (e.g., number of nearest neighbors) used
%      to compute the graph edge weights for the dataset. If
%      'sclOutPairwiseDistanceTemplate' is not specified, it is set to the
%      (Euclidean) norm, and the number of nearest neighnors nN to 1/100 of
%      standard L2 number of samples in lagged embedding space.
%
%   'sclOutSymmetricDistanceTemplate':
%
%   'sclOutDiffusionOperatorTemplate': An nlsaDiffusionOperator object specifying
%       the diffusion operator for the entropy-weighted distances

%   See also MAKEEMBEDDING, COMPUTEPAIRWISEDISTANCES, SYMMETRIZEDISTANCES,
%      COMPUTETEMPORALOPERATOR, MAKETARGETEMBEDDING, COMPUTESVD,
%      COMPUTETEMPORALPATTERNS, COMPUTESPECTRALENTROPY, RECONSTRUCTMODES
%
%   References
%   [1] D. Giannakis and A. J. Majda (2012), "Nonlinear Laplacian spectral
%      analysis for time series with intermittency and low-frequency
%      variability", Proc. Natl. Acad. Sci., 109(7), 2222,
%      doi:10.1073/pnas.1118984109
%   [2] D. Giannakis and A. J. Majda (2012), "Nonlinear Laplacian spectral
%      analysis: Capturing intermittent and low-frequency spatiotemporal
%      patterns in high-dimensional data", Stat. Anal. and Data Min.,
%      doi:10.1002/sam.11171
%
%   Contact: dimitris@cims.nyu.edu
%
%   Modified 2014/10/13

%% CONSTRUCTOR PROPERTY LIST
propName = nlsaModel_scl.listConstructorProperties;
propVal  = cell( size( propName ) );
ifProp   = false( size( propName ) );
idxProp  = zeros( size( propName ) );
nProp    = numel( idxProp );

%% SUPERCLASS CONSTRUCTOR ARGUMENTS
parentConstrArgs = nlsaModel_err.parseTemplates( varargin{ : } );
for iProp = 1 : 2 : numel( parentConstrArgs )
    switch parentConstrArgs{ iProp }
        case 'embComponent'
            iEmbComponent = iProp + 1;
        case 'trgEmbComponent'
            iTrgEmbComponent = iProp + 1;
        case 'prjComponent'
            iPrjComponent = iProp + 1;
        case 'oseEmbComponent'
            iOseEmbComponent = iProp + 1;
        case 'outEmbComponent'
            iOutEmbComponent = iProp + 1;
        case 'outTrgEmbComponent'
            iOutTrgEmbComponent = iProp + 1;
        case 'osePairwiseDistance'
            iOsePDist = iProp + 1;
        case 'diffusionOperator'
            iDiffOp = iProp + 1;
        case 'oseDiffusionOperator'
            iOseDiffOp = iProp + 1;
        case 'outPairwiseDistance'
            iOutPDist = iProp + 1;
        case 'oseRefComponent'
            iOseRefComponent = iProp + 1;
        case 'isrEmbComponent'
            iIsrEmbComponent = iProp + 1;
        case 'isrRefComponent'
            iIsrRefComponent = iProp + 1;
    end
end
partition = getPartition( parentConstrArgs{ iEmbComponent } );
[ nCT, nR ] = size( parentConstrArgs{ iTrgEmbComponent } );
[ ~, nRO ]  = size( parentConstrArgs{ iOseEmbComponent } );

%% SCALED PAIRWISE DISTANCE
% Parse scaled distance template and set distance partition
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclOutPairwiseDistance' )
        iSclOutPDist = iProp;
        break
    end
end
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclOutPairwiseDistanceTemplate' )
        if ~isempty( propVal{ iSclOutPDist } )
            error( 'A scaled pairwise distance template has been already specified' )
        end
        if isa( varargin{ i + 1 }, 'nlsaPairwiseDistance_scl' ) ...
           && isscalar( varargin{ i + 1 } )
            propVal{ iSclOutPDist } = varargin{ i + 1 };
            ifProp( iSclOutPDist )  = true;
        else
            error( 'The scaled pairwise distance template must be specified as a scalar nlsaPairwiseDistance_scl object' )
        end
    end
end
if isempty( propVal{ iSclOutPDist } )
    propVal{ iSclOutPDist } = parentConstrArgs{ iOutPDist };
    ifProp( iSclOutPDist )  = true;
end

propVal{ iSclOutPDist } = setPartition( propVal{ iSclOutPDist }, ...
                                     getPartition( parentConstrArgs{ iOutPDist } ) );
propVal{ iSclOutPDist } = setPartitionTest( propVal{ iSclOutPDist }, ...
                                         getPartition( parentConstrArgs{ iOutPDist } ) );
tag = getTag( propVal{ iSclOutPDist } );
if ~isempty( tag )
    tag = [ tag '_' ];
end
propVal{ iSclOutPDist } = setTag( propVal{ iSclOutPDist }, ...
        [ tag getDefaultTag( propVal{ iSclOutPDist } ) ] );

% Determine distance-specific directories
% Ose components
pthO = concatenateTags( parentConstrArgs{ iOseEmbComponent } );
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseComponentName' )
        if ~isSet
            pthO{ 1 } = varargin{ i + 1 };
            break
        else
            error( 'oseComponentName has been already set' )
        end
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseRealizationName' )
        if ~isSet
            pthO{ 2 } = varargin{ i + 1 };
            break
        else
            error( 'oseRealizationName has been already set' )
        end
    end
end
pthO = strjoin_e( pthO, '_' );
% Reference components
pthOR = concatenateTags( parentConstrArgs{ iOseRefComponent } );
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseReferenceComponentName' )
        if ~isSet
            pthOR{ 1 } = varargin{ i + 1 };
            break
        else
            error( 'oseReferenceComponentName has been already set' )
        end
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseReferenceRealizationName' )
        if ~isSet
            pthOR{ 2 } = varargin{ i + 1 };
        end
    end
end
pthOR = strjoin_e( pthOR, '_' );
if isa( parentConstrArgs{ iOseRefComponent }, 'nlsaEmbeddedComponent_rec' );
    pthOR = concatenateTags( parentConstrArgs{ iOseEmbComponent } );
    isSet = false;
    for i = 1 : 2 : nargin
        if strcmp( varargin{ i }, 'outSourceComponentName' )
            if ~isSet
                pthOR{ 1 } = varargin{ i + 1 };
                break
            else
                error( 'outSourceComponentName has been already set' )
            end
        end
    end
    isSet = false;
    for i = 1 : 2 : nargin
        if strcmp( varargin{ i }, 'outSourceRealizationName' )
            if ~isSet
                pthOR{ 2 } = varargin{ i + 1 };
                break
            else
                error( 'outSourceRealizationName has been already set' )
            end
        end
    end
    pthOR = strjoin_e( pthOR, '_' );
    pthOR = strjoin_e( pthOR, ...
                   getTag( parentConstrArgs{ iOutPDistance } ) , ...
                   getTag( parentConstrArgs{ iOytSDistance } ), ...
                   getTag( parentConstrArgs{ iOutDiffOp } ), '_' );
end
modelPathDE = fullfile( getPath( parentConstrArgs{ iOseDiffOp } ), ...
                        pthO, ...
                        pthOR, ...
                        getTag( propVal{ iSclOutPDist } ) );
propVal{ iSclOutPDist } = setPath( propVal{ iSclOutPDist }, modelPathDE );
propVal{ iSclOutPDist } = setDefaultSubpath( propVal{ iSclOutPDist } );
propVal{ iSclOutPDist } = setDefaultFile( propVal{ iSclOutPDist } );
mkdir( propVal{ iSclOutPDist } )
nN   = getNNeighbors( propVal{ iSclOutPDist } );

%% SCALED SYMMETRIC DISTANCE
% Parse symmetric distance template
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclOutSymmetricDistance' )
        iSclOutSDist = iProp;
        break
    end
end
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclOutSymmetricDistanceTemplate' )
        if ~isempty( propVal{ iSclOutSDist } )
            error( 'A scaled symmetric distance template has been already specified' )
        end
        if isa( varargin{ i + 1 }, 'nlsaSymmetricDistance' ) ...
           && isscalar( varargin{ i + 1 } )
            propVal{ iSclOutSDist } = varargin{ i + 1 };
            ifProp( iSclOutSDist ) = true;
        else
            error( 'The symmetric distance template must be specified as a scalar nlsaSymmetricDistance object' )
        end
    end
end

if isempty( propVal{ iSclOutSDist } )
    propVal{ iSclOutSDist } = nlsaSymmetricDistance_gl( 'nearestNeighbors', nN );
    ifProp( iSclOutSDist ) = true;
end
if getNNeighbors( propVal{ iSclOutSDist } ) > nN
    error( 'The number of nearest neighbors in the symmetric distance matrix cannot exceed the number of neareast neighbors in the pairwise (non-symmetric) distance matrix' )
end
propVal{ iSclOutSDist } = setPartition( propVal{ iSclOutSDist }, getPartition( propVal{ iSclOutPDist } ) );
tag = getTag( propVal{ iSclOutSDist } );
if ~isempty( tag )
    tag = [ tag '_' ];
end
propVal{ iSclOutSDist } = setTag( propVal{ iSclOutSDist }, ...
        [ tag getDefaultTag( propVal{ iSclOutSDist } ) ] );

% Assign symmetric distance paths and filenames
modelPathSE          = fullfile( modelPathDE, getTag( propVal{ iSclOutSDist } ) );
propVal{ iSclOutSDist } = setPath( propVal{ iSclOutSDist }, modelPathSE  );
propVal{ iSclOutSDist } = setDefaultSubpath( propVal{ iSclOutSDist } );
propVal{ iSclOutSDist } = setDefaultFile( propVal{ iSclOutSDist } );
mkdir( propVal{ iSclOutSDist } )

%% SCALED DIFFUSION OPERATOR
% Parse scaled diffusion operator template
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclOutDiffusionOperator' )
        iSclOutDiffOp = iProp;
        break
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclOutDiffusionOperatorTemplate' )
        if ~isSet
            if isa( varargin{ i + 1 }, 'nlsaDiffusionOperator' ) ...
               && isscalar( varargin{ i + 1 } )
                propVal{ iSclOutDiffOp } = varargin{ i + 1 };
                isSet = true;
            else
                error( 'The scaled diffusion operator template must be specified as a scalar nlsaDiffusionOperator object' )
            end
        else
            error( 'A scaled diffusion operator template has been already specified' )
        end
    end
end
if ~isSet
    propVal{ iSclOutDiffOp } = parentConstrArgs{ iOutDiffOp };
end
ifProp( iSclOutDiffOp )  = true;
propVal{ iSclOutDiffOp } = setPartition( propVal{ iSclOutDiffOp }, ...
                        getPartition( propVal{ iSclOutSDist } ) );
propVal{ iSclOutDiffOp } = setPartitionTest( propVal{ iSclOutDiffOp }, ...
                        getPartition( propVal{ iSclOutSDist } ) );
propVal{ iSclOutDiffOp } = setNNeighbors( propVal{ iSclOutDiffOp }, ...
                                       getNNeighborsMax( propVal{ iSclOutSDist } ) );
tag = getTag( propVal{ iSclOutDiffOp } );
if ~isempty( tag )
    tag = [ tag '_' ];
end
propVal{ iSclOutDiffOp } = setTag( propVal{ iSclOutDiffOp }, ...
        [ tag getDefaultTag( propVal{ iSclOutDiffOp } ) ] );

% Assign diffusion operator paths and filenames
modelPathL           = fullfile( getPath( propVal{ iSclOutSDist } ), ...
                                  getTag( propVal{ iSclOutDiffOp } ) );
propVal{ iSclOutDiffOp } = setDefaultSubpath( propVal{ iSclOutDiffOp } );
propVal{ iSclOutDiffOp } = setPath( propVal{ iSclOutDiffOp }, modelPathL );
mkdir( propVal{ iSclOutDiffOp } )
propVal{ iSclOutDiffOp } = setDefaultFile( propVal{ iSclOutDiffOp } );

%% SCALED OS PROJECTED DATA
% Parse projection templates
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclOutPrjComponent' )
        iSclOutPrjComponent = iProp;
        break
    end
end
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclProjectionTemplate' )
        if ~isempty( propVal{ iSclOutPrjComponent } )
            error( 'A projection template for the model data has been already specified' )
        end
        if isa( varargin{ i + 1 }, 'nlsaProjectedComponent' ) ...
            && isscalar( varargin{ i + 1 } )
            propVal{ iSclOutPrjComponent } = repmat( varargin{ i + 1 }, [ nCT 1 ] );
        elseif isa( varargin{ i + 1 }, 'nlsaProjectedComponent' ) ...
           && isvector( varargin{ i + 1 } ) ...
           && numel( varargin{ i + 1 } ) == nCT
            propVal{ iSclOutPrjComponent } = varargin{ i + 1 };
            if isrow( propVal{ iSclOutPrjComponent } )
                propVal{ iSclOutPrjComponent } = propVal{ iSclOutPrjComponent }';
            end
        else
            error( 'The projection template must be specified as a scalar nlsaProjectedComponent object, or vector of nlsaProjectedComponent objects of size equal to the number of target components' )
        end
        ifProp( iSclOutPrjComponent ) = true;
    end
end
if isempty( propVal{ iSclOutPrjComponent } )
    for iC = nCT : -1 : 1
        propVal{ iSclOutPrjComponent }( iC ) = nlsaProjectedComponent( 'nBasisFunction', ...
          getNEigenfunction( propVal{ iSclOutDiffOp } ) );
    end
    ifProp( iSclOutPrjComponent ) = true;
end
for iC = 1 : nCT
    % Setup collective tags for projected data
    isSet = false;
    for i = 1 : 2 : nargin
        if strcmp( varargin{ i }, 'projectionComponentName' )
            if ~isSet
                pth = varargin{ i + 1 };
                break
            else
                error( 'Projection component name has been already specified' )
            end
        end
    end
    if ~isSet
        pth = concatenateTags( parentConstrArgs{ iTrgEmbComponent }( iC, : ) );
        pth = strjoin_e( pth, '_' );
    end

    propVal{ iSclOutPrjComponent }( iC ) = setPartition( propVal{ iSclOutPrjComponent }( iC ), partition );
    propVal{ iSclOutPrjComponent }( iC ) = setPath( propVal{ iSclOutPrjComponent }( iC ), ...
    fullfile( modelPathL, pth ) );
    propVal{ iSclOutPrjComponent }( iC ) = setEmbeddingSpaceDimension( propVal{ iSclOutPrjComponent }( iC ), ...
      getEmbeddingSpaceDimension( parentConstrArgs{ iOutTrgEmbComponent }( iC ) ) );
    propVal{ iSclOutPrjComponent }( iC ) = setDefaultSubpath( propVal{ iSclOutPrjComponent }( iC ) );
    propVal{ iSclOutPrjComponent }( iC ) = setDefaultFile( propVal{ iSclOutPrjComponent }( iC ) );
end
mkdir( propVal{ iSclOutPrjComponent } )

%% SCALED PAIRWISE DISTANCES FOR ISR
% Parse distance template and set partition
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclIsrPairwiseDistance' )
        iSclIsrPDist = iProp;
        break
    end
end
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclIsrPairwiseDistanceTemplate' )
        if ~isempty( propVal{ iSclIsrPDist } )
            error( 'A pairwise distance template has been already specified' )
        end
        if isa( varargin{ i + 1 }, 'nlsaPairwiseDistance' ) ...
           && isscalar( varargin{ i + 1 } )
            propVal{ iSclIsrPDist } = varargin{ i + 1 };
            ifProp( iSclIsrPDist )  = true;
            ifRetainTag          = true;
        else
            error( 'The OSE pairwise distance template must be specified as a scalar nlsaPairwiseDistance object' )
        end
    end
end
if isempty( propVal{ iSclIsrPDist } )
    propVal{ iSclIsrPDist } = parentConstrArgs{ iOsePDist };
    ifProp( iSclIsrPDist )  = true;
    ifRetainTag          = false;
end

% Partition for query (in-sample) data
propVal{ iSclIsrPDist } = setPartition( propVal{ iSclIsrPDist }, ...
                        getPartitionTest( parentConstrArgs{ iOsePDist } ) );

% partition for test (out-of-sample) data
propVal{ iSclIsrPDist } = setPartitionTest( propVal{ iSclIsrPDist }, ...
                         getPartition( parentConstrArgs{ iOsePDist } ) );

if ifRetainTag
    tag = getTag( propVal{ iSclIsrPDist } );
    if ~isempty( tag )
        tag = [ tag '_' ];
    end
else
    tag = [];
end
propVal{ iSclIsrPDist } = setTag( propVal{ iSclIsrPDist }, ...
        [ tag getDefaultTag( propVal{ iSclIsrPDist } ) ] );

% Determine distance-specific directories
% Isr components
pthI = concatenateTags( parentConstrArgs{ iIsrEmbComponent } );
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'isrComponentName' )
        if ~isSet
            pthI{ 1 } = varargin{ i + 1 };
            break
        else
            error( 'isrComponentName has been already set' )
        end
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'isrRealizationName' )
        if ~isSet
            pthI{ 2 } = varargin{ i + 1 };
            break
        else
            error( 'isrRealizationName has been already set' )
        end
    end
end
pthI = strjoin_e( pthI, '_' );
% Reference components
pthIR = concatenateTags( parentConstrArgs{ iIsrRefComponent } );
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseReferenceComponentName' )
        if ~isSet
            pthIR{ 1 } = varargin{ i + 1 };
            break
        else
            error( 'oseReferenceComponentName has been already set' )
        end
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'oseReferenceRealizationName' )
        if ~isSet
            pthIR{ 2 } = varargin{ i + 1 };
        end
    end
end
pthIR = strjoin_e( pthIR, '_' );
if isa( parentConstrArgs{ iOseRefComponent }, 'nlsaEmbeddedComponent_rec' );
    pthIR = concatenateTags( parentConstrArgs{ iOseEmbComponent } );
    isSet = false;
    for i = 1 : 2 : nargin
        if strcmp( varargin{ i }, 'outSourceComponentName' )
            if ~isSet
                pthIR{ 1 } = varargin{ i + 1 };
                break
            else
                error( 'outSourceComponentName has been already set' )
            end
        end
    end
    isSet = false;
    for i = 1 : 2 : nargin
        if strcmp( varargin{ i }, 'outSourceRealizationName' )
            if ~isSet
                pthIR{ 2 } = varargin{ i + 1 };
                break
            else
                error( 'outSourceRealizationName has been already set' )
            end
        end
    end
    pthIR = strjoin_e( pthIR, '_' );
    pthIR = strjoin_e( pthIR, ...
                   getTag( parentConstrArgs{ iPDistance } ) , ...
                   getTag( parentConstrArgs{ iSDistance } ), ...
                   getTag( parentConstrArgs{ iDiffOp } ), '_' );
end

% Assign pairwise distance paths and filenames
modelPathDE = fullfile( getPath( parentConstrArgs{ iOseDiffOp } ), ...
                        pthO, ...
                        pthOR, ...
                        pthI, ...
                        pthIR, ...
                        getTag( propVal{ iSclIsrPDist } ) );
propVal{ iSclIsrPDist } = setPath( propVal{ iSclIsrPDist }, modelPathDE );
propVal{ iSclIsrPDist } = setDefaultSubpath( propVal{ iSclIsrPDist } );
propVal{ iSclIsrPDist } = setDefaultFile( propVal{ iSclIsrPDist } );
mkdir( propVal{ iSclIsrPDist } )

%% SCALED ISR DIFFUSION OPERATOR
for iProp = 1 : nProp
    if strcmp( propName{ iProp }, 'sclIsrDiffusionOperator' )
        iSclIsrDiffOp = iProp;
        break
    end
end
isSet = false;
for i = 1 : 2 : nargin
    if strcmp( varargin{ i }, 'sclIsrDiffusionOperatorTemplate' )
        if ~isSet
            if isa( varargin{ i + 1 }, 'nlsaDiffusionOperator_ose' ) ...
               && isscalar( varargin{ i + 1 } )
                propVal{ iSclIsrDiffOp } = varargin{ i + 1 };
                isSet = true;
            else
                error( 'The OSE diffusion operator template must be specified as a scalar nlsaDiffusionOperator_ose object' )
            end
        else
            error( 'An OSE diffusion operator template has been already specified' )
        end
    end
end
if ~isSet
    propVal{ iSclIsrDiffOp } = nlsaDiffusionOperator_ose( parentConstrArgs{ iDiffOp } );
end
ifProp( iSclIsrDiffOp )  = true;
propVal{ iSclIsrDiffOp } = setPartition( propVal{ iSclIsrDiffOp }, ...
                                    getPartition( propVal{ iSclIsrPDist } ) );
propVal{ iSclIsrDiffOp } = setPartitionTest( propVal{ iSclIsrDiffOp }, ...
                                    getPartitionTest( propVal{ iSclIsrPDist } ) );
tag = getTag( propVal{ iSclIsrDiffOp } );
if ~isempty( tag )
    tag = [ tag '_' ];
end
propVal{ iSclIsrDiffOp } = setTag( propVal{ iSclIsrDiffOp }, ...
        [ tag getDefaultTag( propVal{ iSclIsrDiffOp } ) ] );

% Assign diffusion operator paths and filenames
modelPathLO           = fullfile( getPath( propVal{ iSclIsrPDist } ), ...
                                  getTag( propVal{ iSclIsrDiffOp } ) );
propVal{ iSclIsrDiffOp } = setDefaultSubpath( propVal{ iSclIsrDiffOp } );
propVal{ iSclIsrDiffOp } = setPath( propVal{ iSclIsrDiffOp }, modelPathLO );
mkdir( propVal{ iSclIsrDiffOp } )
propVal{ iSclIsrDiffOp } = setDefaultFile( propVal{ iSclIsrDiffOp } );

% COLLECT CONSTRUCTOR ARGUMENTS
constrArgs                = cell( 1, 2 * nnz( ifProp ) );
constrArgs( 1 : 2 : end ) = propName( ifProp );
constrArgs( 2 : 2 : end ) = propVal( ifProp );
constrArgs = [ constrArgs parentConstrArgs ];


text:
package org.apache.maven.xml.sax.filter;

import java.util.Objects;

/**
 *
 * @author Robert Scholte
 * @since 3.7.0
 */
public class DependencyKey
{
    private final String groupId;

    private final String artifactId;

    private final int hashCode;

    public DependencyKey( String groupId, String artifactId )
    {
        this.groupId = groupId;
        this.artifactId = artifactId;

        this.hashCode = Objects.hash( artifactId, groupId );
    }

    public String getGroupId()
    {
        return groupId;
    }

    public String getArtifactId()
    {
        return artifactId;
    }

    @Override
    public int hashCode()
    {
        return hashCode;
    }

    @Override
    public boolean equals( Object obj )
    {
        if ( this == obj )
        {
            return true;
        }
        if ( obj == null )
        {
            return false;
        }
        if ( getClass() != obj.getClass() )
        {
            return false;
        }

        DependencyKey other = (DependencyKey) obj;

        if ( !Objects.equals( artifactId, other.artifactId ) )
        {
            return false;
        }
        if ( !Objects.equals( groupId, other.groupId ) )
        {
            return false;
        }

        return true;
    }

}


text:
$(document).ready(function () {
	$('.favorite').live('click', function()
	{
		//alert($(this).closest('.bt-tweetbody').attr('id'));
		var data = {
                "id": $(this).closest('.bt-tweetbody').attr('id')
            };
            favTweet(data,$(this).closest('.bt-tweetbody').attr('id'))
	});
});

function favTweet(param,id) {
    $.ajax({
        type: "POST",
        url: "ajax/favorite.php",
        data: param
    }).done(function (res) {
        if (res != null) {
            var result = jQuery.parseJSON(res);
            if (result != null) {
                if (result.favorite['status'] == "ok") {
					$('#'+id).find('.favorite').html("Unfavorite");
                }
                else if (result.favorite['status'] == "unok") {
                    $('#'+id).find('.favorite').html("Favorite");
                } else if (result.favorite['login'] == "error") {
                    $('#errors').html('
<button type="button" class="close" data-dismiss="alert">×</button>Please login!
')
                } else if (result.favorite['token'] == "error") {
                    $('#errors').html('
<button type="button" class="close" data-dismiss="alert">×</button>Your Twitter account does not connect or is disconnected.please refresh the page.
')
                } else if (result.favorite['error'] != "") {
                    $('#errors').html('
<button type="button" class="close" data-dismiss="alert">×</button>' + result.favorite['error'] + '
')
                }
            }
        } else {
            $('#errors').html('
<button type="button" class="close" data-dismiss="alert">×</button>Unknown error! please contact admin.
')
        }
        $('#send-tweet').removeClass('disabled')
    }).fail(function (jqXHR, textStatus) {
        $('#errors').html('
<button type="button" class="close" data-dismiss="alert">×</button>There is some errors.Please check your internet connection.If its going on,please contact admin.
');
        $('#send-tweet').removeClass('disabled')
    })
}


text:
package org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.parts;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.StackLayout;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.graphics.Color;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.custom.EastPointerShape;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.policies.CloudConnectorInputConnectorItemSemanticEditPolicy;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.providers.EsbElementTypes;

/**
 * @generated
 */
public class CloudConnectorInputConnectorEditPart extends AbstractBorderItemEditPart {

    /**
     * @generated
     */
    public static final int VISUAL_ID = 3720;

    /**
     * @generated
     */
    protected IFigure contentPane;

    /**
     * @generated
     */
    protected IFigure primaryShape;

    /**
     * @generated
     */
    public CloudConnectorInputConnectorEditPart(View view) {
        super(view);
    }

    /**
     * @generated
     */
    protected void createDefaultEditPolicies() {
        super.createDefaultEditPolicies();
        installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
        installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CloudConnectorInputConnectorItemSemanticEditPolicy());
        installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
        // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
        // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
    }

    /**
     * @generated
     */
    protected LayoutEditPolicy createLayoutEditPolicy() {
        org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {

            protected EditPolicy createChildEditPolicy(EditPart child) {
                EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
                if (result == null) {
                    result = new NonResizableEditPolicy();
                }
                return result;
            }

            protected Command getMoveChildrenCommand(Request request) {
                return null;
            }

            protected Command getCreateCommand(CreateRequest request) {
                return null;
            }
        };
        return lep;
    }

    /**
     * @generated
     */
    protected IFigure createNodeShape() {
        return primaryShape = new EastPointerFigure();
    }

    /**
     * @generated
     */
    public EastPointerFigure getPrimaryShape() {
        return (EastPointerFigure) primaryShape;
    }

    /**
     * @generated
     */
    protected NodeFigure createNodePlate() {
        DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(12, 10);

        //FIXME: workaround for #154536
        result.getBounds().setSize(result.getPreferredSize());
        return result;
    }

    /**
     * Creates figure for this edit part.
     *
     * Body of this method does not depend on settings in generation model
     * so you may safely remove <i>generated</i> tag and modify it.
     *
     * @generated
     */
    protected NodeFigure createNodeFigure() {
        NodeFigure figure = createNodePlate();
        figure.setLayoutManager(new StackLayout());
        IFigure shape = createNodeShape();
        figure.add(shape);
        contentPane = setupContentPane(shape);
        return figure;
    }

    /**
     * Default implementation treats passed figure as content pane.
     * Respects layout one may have set for generated figure.
     *
     * @param nodeShape instance of generated figure class
     * @generated
     */
    protected IFigure setupContentPane(IFigure nodeShape) {
        return nodeShape; // use nodeShape itself as contentPane
    }

    /**
     * @generated
     */
    public IFigure getContentPane() {
        if (contentPane != null) {
            return contentPane;
        }
        return super.getContentPane();
    }

    /**
     * @generated
     */
    protected void setForegroundColor(Color color) {
        if (primaryShape != null) {
            primaryShape.setForegroundColor(color);
        }
    }

    /**
     * @generated
     */
    protected void setBackgroundColor(Color color) {
        if (primaryShape != null) {
            primaryShape.setBackgroundColor(color);
        }
    }

    /**
     * @generated
     */
    protected void setLineWidth(int width) {
        if (primaryShape instanceof Shape) {
            ((Shape) primaryShape).setLineWidth(width);
        }
    }

    /**
     * @generated
     */
    protected void setLineType(int style) {
        if (primaryShape instanceof Shape) {
            ((Shape) primaryShape).setLineStyle(style);
        }
    }

    /**
     * @generated
     */
    public class EastPointerFigure extends EastPointerShape {

        /**
         * @generated
         */
        public EastPointerFigure() {
            this.setBackgroundColor(THIS_BACK);
            this.setPreferredSize(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(10)));
        }

    }

    /**
     * @generated
     */
    static final Color THIS_BACK = new Color(null, 50, 50, 50);

}


text:
package org.junit;

import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert;
import org.junit.internal.ArrayComparisonFailure;
import org.junit.internal.ExactComparisonCriteria;
import org.junit.internal.InexactComparisonCriteria;

/**
 * TODO replace with 4.12 when it is released with a simple bug fix.
 *

 * A set of assertion methods useful for writing tests. Only failed assertions
 * are recorded. These methods can be used directly:
 * Assert.assertEquals(...), however, they read better if they
 * are referenced through static import:

 *

 *

 * import static org.junit.Assert.*;
 *    ...
 *    assertEquals(...);
 *

 *
 * @see AssertionError
 * @since 4.0
 */
public class Assert {
    /**
     * Protect constructor since it is a static only class
     */
    protected Assert() {
    }

    /**
     * Asserts that a condition is true. If it isn't it throws an
     * {@link AssertionError} with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param condition condition to be checked
     */
    static public void assertTrue(String message, boolean condition) {
        if (!condition) {
            fail(message);
        }
    }

    /**
     * Asserts that a condition is true. If it isn't it throws an
     * {@link AssertionError} without a message.
     *
     * @param condition condition to be checked
     */
    static public void assertTrue(boolean condition) {
        assertTrue(null, condition);
    }

    /**
     * Asserts that a condition is false. If it isn't it throws an
     * {@link AssertionError} with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param condition condition to be checked
     */
    static public void assertFalse(String message, boolean condition) {
        assertTrue(message, !condition);
    }

    /**
     * Asserts that a condition is false. If it isn't it throws an
     * {@link AssertionError} without a message.
     *
     * @param condition condition to be checked
     */
    static public void assertFalse(boolean condition) {
        assertFalse(null, condition);
    }

    /**
     * Fails a test with the given message.
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @see AssertionError
     */
    static public void fail(String message) {
        if (message == null) {
            throw new AssertionError();
        }
        throw new AssertionError(message);
    }

    /**
     * Fails a test with no message.
     */
    static public void fail() {
        fail(null);
    }

    /**
     * Asserts that two objects are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message. If
     * expected and actual are null,
     * they are considered equal.
     *
     * @param message  the identifying message for the {@link AssertionError} (null
     *                 okay)
     * @param expected expected value
     * @param actual   actual value
     */
    static public void assertEquals(String message, Object expected,
                                    Object actual) {
        if (equalsRegardingNull(expected, actual)) {
            return;
        } else if (expected instanceof String && actual instanceof String) {
            String cleanMessage = message == null ? "" : message;
            throw new ComparisonFailure(cleanMessage, (String) expected,
                    (String) actual);
        } else {
            failNotEquals(message, expected, actual);
        }
    }

    private static boolean equalsRegardingNull(Object expected, Object actual) {
        if (expected == null) {
            return actual == null;
        }

        return isEquals(expected, actual);
    }

    private static boolean isEquals(Object expected, Object actual) {
        return expected.equals(actual);
    }

    /**
     * Asserts that two objects are equal. If they are not, an
     * {@link AssertionError} without a message is thrown. If
     * expected and actual are null,
     * they are considered equal.
     *
     * @param expected expected value
     * @param actual   the value to check against expected
     */
    static public void assertEquals(Object expected, Object actual) {
        assertEquals(null, expected, actual);
    }

    /**
     * Asserts that two objects are not equals. If they are, an
     * {@link AssertionError} is thrown with the given message. If
     * first and second are null,
     * they are considered equal.
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @param first   first value to check
     * @param second  the value to check against first
     */
    static public void assertNotEquals(String message, Object first,
                                       Object second) {
        if (equalsRegardingNull(first, second)) {
            failEquals(message, first);
        }
    }

    /**
     * Asserts that two objects are not equals. If they are, an
     * {@link AssertionError} without a message is thrown. If
     * first and second are null,
     * they are considered equal.
     *
     * @param first  first value to check
     * @param second the value to check against first
     */
    static public void assertNotEquals(Object first, Object second) {
        assertNotEquals(null, first, second);
    }

    private static void failEquals(String message, Object actual) {
        String formatted = "Values should be different. ";
        if (message != null) {
            formatted = message + ". ";
        }

        formatted += "Actual: " + actual;
        fail(formatted);
    }

    /**
     * Asserts that two longs are not equals. If they are, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @param first   first value to check
     * @param second  the value to check against first
     */
    static public void assertNotEquals(String message, long first, long second) {
        assertNotEquals(message, (Long) first, (Long) second);
    }

    /**
     * Asserts that two longs are not equals. If they are, an
     * {@link AssertionError} without a message is thrown.
     *
     * @param first  first value to check
     * @param second the value to check against first
     */
    static public void assertNotEquals(long first, long second) {
        assertNotEquals(null, first, second);
    }

    /**
     * Asserts that two doubles or floats are not equal to within a positive delta.
     * If they are, an {@link AssertionError} is thrown with the given
     * message. If the expected value is infinity then the delta value is
     * ignored. NaNs are considered equal:
     * assertNotEquals(Double.NaN, Double.NaN, *) fails
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @param first   first value to check
     * @param second  the value to check against first
     * @param delta   the maximum delta between expected and
     *                actual for which both numbers are still
     *                considered equal.
     */
    static public void assertNotEquals(String message, double first,
                                       double second, double delta) {
        if (!doubleIsDifferent(first, second, delta)) {
            failEquals(message, new Double(first));
        }
    }

    /**
     * Asserts that two doubles or floats are not equal to within a positive delta.
     * If they are, an {@link AssertionError} is thrown. If the expected
     * value is infinity then the delta value is ignored.NaNs are considered
     * equal: assertNotEquals(Double.NaN, Double.NaN, *) fails
     *
     * @param first  first value to check
     * @param second the value to check against first
     * @param delta  the maximum delta between expected and
     *               actual for which both numbers are still
     *               considered equal.
     */
    static public void assertNotEquals(double first, double second, double delta) {
        assertNotEquals(null, first, second, delta);
    }

    /**
     * Asserts that two object arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message. If
     * expecteds and actuals are null,
     * they are considered equal.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds Object array or array of arrays (multi-dimensional array) with
     *                  expected values.
     * @param actuals   Object array or array of arrays (multi-dimensional array) with
     *                  actual values
     */
    public static void assertArrayEquals(String message, Object[] expecteds,
                                         Object[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two object arrays are equal. If they are not, an
     * {@link AssertionError} is thrown. If expected and
     * actual are null, they are considered
     * equal.
     *
     * @param expecteds Object array or array of arrays (multi-dimensional array) with
     *                  expected values
     * @param actuals   Object array or array of arrays (multi-dimensional array) with
     *                  actual values
     */
    public static void assertArrayEquals(Object[] expecteds, Object[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two byte arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds byte array with expected values.
     * @param actuals   byte array with actual values
     */
    public static void assertArrayEquals(String message, byte[] expecteds,
                                         byte[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two byte arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds byte array with expected values.
     * @param actuals   byte array with actual values
     */
    public static void assertArrayEquals(byte[] expecteds, byte[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two char arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds char array with expected values.
     * @param actuals   char array with actual values
     */
    public static void assertArrayEquals(String message, char[] expecteds,
                                         char[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two char arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds char array with expected values.
     * @param actuals   char array with actual values
     */
    public static void assertArrayEquals(char[] expecteds, char[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two short arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds short array with expected values.
     * @param actuals   short array with actual values
     */
    public static void assertArrayEquals(String message, short[] expecteds,
                                         short[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two short arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds short array with expected values.
     * @param actuals   short array with actual values
     */
    public static void assertArrayEquals(short[] expecteds, short[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two int arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds int array with expected values.
     * @param actuals   int array with actual values
     */
    public static void assertArrayEquals(String message, int[] expecteds,
                                         int[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two int arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds int array with expected values.
     * @param actuals   int array with actual values
     */
    public static void assertArrayEquals(int[] expecteds, int[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two long arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds long array with expected values.
     * @param actuals   long array with actual values
     */
    public static void assertArrayEquals(String message, long[] expecteds,
                                         long[] actuals) throws ArrayComparisonFailure {
        internalArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two long arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds long array with expected values.
     * @param actuals   long array with actual values
     */
    public static void assertArrayEquals(long[] expecteds, long[] actuals) {
        assertArrayEquals(null, expecteds, actuals);
    }

    /**
     * Asserts that two double arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds double array with expected values.
     * @param actuals   double array with actual values
     */
    public static void assertArrayEquals(String message, double[] expecteds,
                                         double[] actuals, double delta) throws ArrayComparisonFailure {
        new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two double arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds double array with expected values.
     * @param actuals   double array with actual values
     */
    public static void assertArrayEquals(double[] expecteds, double[] actuals, double delta) {
        assertArrayEquals(null, expecteds, actuals, delta);
    }

    /**
     * Asserts that two float arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds float array with expected values.
     * @param actuals   float array with actual values
     */
    public static void assertArrayEquals(String message, float[] expecteds,
                                         float[] actuals, float delta) throws ArrayComparisonFailure {
        new InexactComparisonCriteria(delta).arrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two float arrays are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expecteds float array with expected values.
     * @param actuals   float array with actual values
     */
    public static void assertArrayEquals(float[] expecteds, float[] actuals, float delta) {
        assertArrayEquals(null, expecteds, actuals, delta);
    }

    /**
     * Asserts that two object arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message. If
     * expecteds and actuals are null,
     * they are considered equal.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds Object array or array of arrays (multi-dimensional array) with
     *                  expected values.
     * @param actuals   Object array or array of arrays (multi-dimensional array) with
     *                  actual values
     */
    private static void internalArrayEquals(String message, Object expecteds,
                                            Object actuals) throws ArrayComparisonFailure {
        new ExactComparisonCriteria().arrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two doubles are equal to within a positive delta.
     * If they are not, an {@link AssertionError} is thrown with the given
     * message. If the expected value is infinity then the delta value is
     * ignored. NaNs are considered equal:
     * assertEquals(Double.NaN, Double.NaN, *) passes
     *
     * @param message  the identifying message for the {@link AssertionError} (null
     *                 okay)
     * @param expected expected value
     * @param actual   the value to check against expected
     * @param delta    the maximum delta between expected and
     *                 actual for which both numbers are still
     *                 considered equal.
     */
    static public void assertEquals(String message, double expected,
                                    double actual, double delta) {
        if (doubleIsDifferent(expected, actual, delta)) {
            failNotEquals(message, new Double(expected), new Double(actual));
        }
    }

    /**
     * Asserts that two floats are equal to within a positive delta.
     * If they are not, an {@link AssertionError} is thrown with the given
     * message. If the expected value is infinity then the delta value is
     * ignored. NaNs are considered equal:
     * assertEquals(Float.NaN, Float.NaN, *) passes
     *
     * @param message  the identifying message for the {@link AssertionError} (null
     *                 okay)
     * @param expected expected value
     * @param actual   the value to check against expected
     * @param delta    the maximum delta between expected and
     *                 actual for which both numbers are still
     *                 considered equal.
     */
    static public void assertEquals(String message, float expected,
                                    float actual, float delta) {
        if (Float.compare(expected, actual) == 0) {
            return;
        }
        if (!(Math.abs(expected - actual) <= delta)) {
            failNotEquals(message, new Float(expected), new Float(actual));
        }
    }

    static private boolean doubleIsDifferent(double d1, double d2, double delta) {
        if (Double.compare(d1, d2) == 0) {
            return false;
        }
        if ((Math.abs(d1 - d2) <= delta)) {
            return false;
        }

        return true;
    }

    /**
     * Asserts that two longs are equal. If they are not, an
     * {@link AssertionError} is thrown.
     *
     * @param expected expected long value.
     * @param actual   actual long value
     */
    static public void assertEquals(long expected, long actual) {
        if (expected != actual)
            assertEquals(null, expected, actual);
    }

    /**
     * Asserts that two longs are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message  the identifying message for the {@link AssertionError} (null
     *                 okay)
     * @param expected long expected value.
     * @param actual   long actual value
     */
    static public void assertEquals(String message, long expected, long actual) {
        assertEquals(message, (Long) expected, (Long) actual);
    }

    /**
     * @deprecated Use
     * assertEquals(double expected, double actual, double delta)
     * instead
     */
    @Deprecated
    static public void assertEquals(double expected, double actual) {
        assertEquals(null, expected, actual);
    }

    /**
     * @deprecated Use
     * assertEquals(String message, double expected, double actual, double delta)
     * instead
     */
    @Deprecated
    static public void assertEquals(String message, double expected,
                                    double actual) {
        fail("Use assertEquals(expected, actual, delta) to compare floating-point numbers");
    }

    /**
     * Asserts that two doubles are equal to within a positive delta.
     * If they are not, an {@link AssertionError} is thrown. If the expected
     * value is infinity then the delta value is ignored.NaNs are considered
     * equal: assertEquals(Double.NaN, Double.NaN, *) passes
     *
     * @param expected expected value
     * @param actual   the value to check against expected
     * @param delta    the maximum delta between expected and
     *                 actual for which both numbers are still
     *                 considered equal.
     */
    static public void assertEquals(double expected, double actual, double delta) {
        assertEquals(null, expected, actual, delta);
    }

    /**
     * Asserts that two floats are equal to within a positive delta.
     * If they are not, an {@link AssertionError} is thrown. If the expected
     * value is infinity then the delta value is ignored. NaNs are considered
     * equal: assertEquals(Float.NaN, Float.NaN, *) passes
     *
     * @param expected expected value
     * @param actual   the value to check against expected
     * @param delta    the maximum delta between expected and
     *                 actual for which both numbers are still
     *                 considered equal.
     */

    static public void assertEquals(float expected, float actual, float delta) {
        assertEquals(null, expected, actual, delta);
    }

    /**
     * Asserts that an object isn't null. If it is an {@link AssertionError} is
     * thrown with the given message.
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @param object  Object to check or null
     */
    static public void assertNotNull(String message, Object object) {
        assertTrue(message, object != null);
    }

    /**
     * Asserts that an object isn't null. If it is an {@link AssertionError} is
     * thrown.
     *
     * @param object Object to check or null
     */
    static public void assertNotNull(Object object) {
        assertNotNull(null, object);
    }

    /**
     * Asserts that an object is null. If it is not, an {@link AssertionError}
     * is thrown with the given message.
     *
     * @param message the identifying message for the {@link AssertionError} (null
     *                okay)
     * @param object  Object to check or null
     */
    static public void assertNull(String message, Object object) {
        if (object == null) {
            return;
        }
        failNotNull(message, object);
    }

    /**
     * Asserts that an object is null. If it isn't an {@link AssertionError} is
     * thrown.
     *
     * @param object Object to check or null
     */
    static public void assertNull(Object object) {
        assertNull(null, object);
    }

    static private void failNotNull(String message, Object actual) {
        String formatted = "";
        if (message != null) {
            formatted = message + " ";
        }
        fail(formatted + "expected null, but was:<" + actual + ">");
    }

    /**
     * Asserts that two objects refer to the same object. If they are not, an
     * {@link AssertionError} is thrown with the given message.
     *
     * @param message  the identifying message for the {@link AssertionError} (null
     *                 okay)
     * @param expected the expected object
     * @param actual   the object to compare to expected
     */
    static public void assertSame(String message, Object expected, Object actual) {
        if (expected == actual) {
            return;
        }
        failNotSame(message, expected, actual);
    }

    /**
     * Asserts that two objects refer to the same object. If they are not the
     * same, an {@link AssertionError} without a message is thrown.
     *
     * @param expected the expected object
     * @param actual   the object to compare to expected
     */
    static public void assertSame(Object expected, Object actual) {
        assertSame(null, expected, actual);
    }

    /**
     * Asserts that two objects do not refer to the same object. If they do
     * refer to the same object, an {@link AssertionError} is thrown with the
     * given message.
     *
     * @param message    the identifying message for the {@link AssertionError} (null
     *                   okay)
     * @param unexpected the object you don't expect
     * @param actual     the object to compare to unexpected
     */
    static public void assertNotSame(String message, Object unexpected,
                                     Object actual) {
        if (unexpected == actual) {
            failSame(message);
        }
    }

    /**
     * Asserts that two objects do not refer to the same object. If they do
     * refer to the same object, an {@link AssertionError} without a message is
     * thrown.
     *
     * @param unexpected the object you don't expect
     * @param actual     the object to compare to unexpected
     */
    static public void assertNotSame(Object unexpected, Object actual) {
        assertNotSame(null, unexpected, actual);
    }

    static private void failSame(String message) {
        String formatted = "";
        if (message != null) {
            formatted = message + " ";
        }
        fail(formatted + "expected not same");
    }

    static private void failNotSame(String message, Object expected,
                                    Object actual) {
        String formatted = "";
        if (message != null) {
            formatted = message + " ";
        }
        fail(formatted + "expected same:<" + expected + "> was not:<" + actual
                + ">");
    }

    static private void failNotEquals(String message, Object expected,
                                      Object actual) {
        fail(format(message, expected, actual));
    }

    static String format(String message, Object expected, Object actual) {
        String formatted = "";
        if (message != null && !message.equals("")) {
            formatted = message + " ";
        }
        String expectedString = String.valueOf(expected);
        String actualString = String.valueOf(actual);
        if (expectedString.equals(actualString)) {
            return formatted + "expected: "
                    + formatClassAndValue(expected, expectedString)
                    + " but was: " + formatClassAndValue(actual, actualString);
        } else {
            return formatted + "expected:<" + expectedString + "> but was:<"
                    + actualString + ">";
        }
    }

    private static String formatClassAndValue(Object value, String valueString) {
        String className = value == null ? "null" : value.getClass().getName();
        return className + "<" + valueString + ">";
    }

    /**
     * Asserts that two object arrays are equal. If they are not, an
     * {@link AssertionError} is thrown with the given message. If
     * expecteds and actuals are null,
     * they are considered equal.
     *
     * @param message   the identifying message for the {@link AssertionError} (null
     *                  okay)
     * @param expecteds Object array or array of arrays (multi-dimensional array) with
     *                  expected values.
     * @param actuals   Object array or array of arrays (multi-dimensional array) with
     *                  actual values
     * @deprecated use assertArrayEquals
     */
    @Deprecated
    public static void assertEquals(String message, Object[] expecteds,
                                    Object[] actuals) {
        assertArrayEquals(message, expecteds, actuals);
    }

    /**
     * Asserts that two object arrays are equal. If they are not, an
     * {@link AssertionError} is thrown. If expected and
     * actual are null, they are considered
     * equal.
     *
     * @param expecteds Object array or array of arrays (multi-dimensional array) with
     *                  expected values
     * @param actuals   Object array or array of arrays (multi-dimensional array) with
     *                  actual values
     * @deprecated use assertArrayEquals
     */
    @Deprecated
    public static void assertEquals(Object[] expecteds, Object[] actuals) {
        assertArrayEquals(expecteds, actuals);
    }

    /**
     * Asserts that actual satisfies the condition specified by
     * matcher. If not, an {@link AssertionError} is thrown with
     * information about the matcher and failing value. Example:
     *

     *

     *   assertThat(0, is(1)); // fails:
     *     // failure message:
     *     // expected: is <1>
     *     // got value: <0>
     *   assertThat(0, is(not(1))) // passes
     *

     *

     * org.hamcrest.Matcher does not currently document the meaning
     * of its type parameter T.  This method assumes that a matcher
     * typed as Matcher<T> can be meaningfully applied only
     * to values that could be assigned to a variable of type T.
     *
     * @param <T>     the static type accepted by the matcher (this can flag obvious
     *                compile-time problems such as {@code assertThat(1, is("a"))}
     * @param actual  the computed value being compared
     * @param matcher an expression, built of {@link Matcher}s, specifying allowed
     *                values
     * @see org.hamcrest.CoreMatchers
     * @see org.hamcrest.MatcherAssert
     */
    public static <T> void assertThat(T actual, Matcher<? super T> matcher) {
        assertThat("", actual, matcher);
    }

    /**
     * Asserts that actual satisfies the condition specified by
     * matcher. If not, an {@link AssertionError} is thrown with
     * the reason and information about the matcher and failing value. Example:
     *

     *

     *   assertThat("Help! Integers don't work", 0, is(1)); // fails:
     *     // failure message:
     *     // Help! Integers don't work
     *     // expected: is <1>
     *     // got value: <0>
     *   assertThat("Zero is one", 0, is(not(1))) // passes
     *

     *

     * org.hamcrest.Matcher does not currently document the meaning
     * of its type parameter T.  This method assumes that a matcher
     * typed as Matcher<T> can be meaningfully applied only
     * to values that could be assigned to a variable of type T.
     *
     * @param reason  additional information about the error
     * @param <T>     the static type accepted by the matcher (this can flag obvious
     *                compile-time problems such as {@code assertThat(1, is("a"))}
     * @param actual  the computed value being compared
     * @param matcher an expression, built of {@link Matcher}s, specifying allowed
     *                values
     * @see org.hamcrest.CoreMatchers
     * @see org.hamcrest.MatcherAssert
     */
    public static <T> void assertThat(String reason, T actual,
                                      Matcher<? super T> matcher) {
        MatcherAssert.assertThat(reason, actual, matcher);
    }
}


text:
@interface Scene : NSObject <InstantiableProtocol>
{
    long scene_id;
    NSString *name;
}

@property (nonatomic, assign) long scene_id;
@property (nonatomic, strong) NSString *name;

- (id) initWithDictionary:(NSDictionary *)dict;
- (NSString *) serialize;

@end


text:
    {% include article-header.html %}

        {% assign wordCount = post.content | number_of_words %}
        {% assign oneMinuteToRead = site.wpm %}
        {% if wordCount <= oneMinuteToRead %}
            {{ post.content | markdownify }}
        {% else %}
            {{ post.excerpt | markdownify }}
        {% endif %}

    {% if wordCount > oneMinuteToRead %}

        Read More...

    {% endif %}
    {% include end-graphic.html %}


text:
Canvas2D

<canvas id="canvas-default"></canvas>

Webgl-2d

<canvas id="canvas-webgl"></canvas>