text:
package japicmp.model;

import japicmp.util.Optional;
import japicmp.cmp.JarArchiveComparator;
import japicmp.cmp.JarArchiveComparatorOptions;
import japicmp.util.AnnotationHelper;
import japicmp.util.Constants;
import japicmp.util.ModifierHelper;
import japicmp.util.OptionalHelper;
import javassist.CtBehavior;
import javassist.CtConstructor;
import javassist.CtMethod;
import javassist.Modifier;
import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ExceptionsAttribute;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlTransient;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class JApiBehavior implements JApiHasModifiers, JApiHasChangeStatus, JApiHasAccessModifier, JApiHasStaticModifier,
	JApiHasFinalModifier, JApiHasAbstractModifier, JApiCompatibility, JApiHasAnnotations, JApiHasBridgeModifier,
	JApiCanBeSynthetic, JApiHasLineNumber {
	private final JApiClass jApiClass;
	private final String name;
	private final JarArchiveComparator jarArchiveComparator;
	private final List<JApiParameter> parameters = new LinkedList<>();
	private final List<JApiAnnotation> annotations = new LinkedList<>();
	private final JApiModifier<AccessModifier> accessModifier;
	private final JApiModifier<FinalModifier> finalModifier;
	private final JApiModifier<StaticModifier> staticModifier;
	private final JApiModifier<AbstractModifier> abstractModifier;
	private final JApiModifier<BridgeModifier> bridgeModifier;
	private final JApiModifier<SyntheticModifier> syntheticModifier;
	private final JApiAttribute<SyntheticAttribute> syntheticAttribute;
	private final List<JApiException> exceptions;
	protected JApiChangeStatus changeStatus;
	private final Optional<Integer> oldLineNumber;
	private final Optional<Integer> newLineNumber;
	private final List<JApiCompatibilityChange> compatibilityChanges = new ArrayList<>();

	public JApiBehavior(JApiClass jApiClass, String name, Optional<? extends CtBehavior> oldBehavior, Optional<? extends CtBehavior> newBehavior, JApiChangeStatus changeStatus, JarArchiveComparator jarArchiveComparator) {
		this.jApiClass = jApiClass;
		this.name = name;
		this.jarArchiveComparator = jarArchiveComparator;
		computeAnnotationChanges(annotations, oldBehavior, newBehavior, jarArchiveComparator.getJarArchiveComparatorOptions());
		this.accessModifier = extractAccessModifier(oldBehavior, newBehavior);
		this.finalModifier = extractFinalModifier(oldBehavior, newBehavior);
		this.staticModifier = extractStaticModifier(oldBehavior, newBehavior);
		this.abstractModifier = extractAbstractModifier(oldBehavior, newBehavior);
		this.bridgeModifier = extractBridgeModifier(oldBehavior, newBehavior);
		this.syntheticModifier = extractSyntheticModifier(oldBehavior, newBehavior);
		this.syntheticAttribute = extractSyntheticAttribute(oldBehavior, newBehavior);
		this.exceptions = computeExceptionChanges(oldBehavior, newBehavior);
		this.changeStatus = evaluateChangeStatus(changeStatus);
		this.oldLineNumber = getLineNumber(oldBehavior);
		this.newLineNumber = getLineNumber(newBehavior);
	}

	private List<JApiException> computeExceptionChanges(Optional<? extends CtBehavior> oldMethodOptional, Optional<? extends CtBehavior> newMethodOptional) {
		List<JApiException> exceptionList = new ArrayList<>();
		if (oldMethodOptional.isPresent() && newMethodOptional.isPresent()) {
			List<String> oldExceptions = extractExceptions(oldMethodOptional);
			List<String> newExceptions = extractExceptions(newMethodOptional);
			for (String oldException : oldExceptions) {
				if (newExceptions.contains(oldException)) {
					exceptionList.add(new JApiException(jarArchiveComparator, oldException, jarArchiveComparator.loadClass(JarArchiveComparator.ArchiveType.NEW, oldException), JApiChangeStatus.UNCHANGED));
					newExceptions.remove(oldException);
				} else {
					exceptionList.add(new JApiException(jarArchiveComparator, oldException, jarArchiveComparator.loadClass(JarArchiveComparator.ArchiveType.OLD, oldException), JApiChangeStatus.REMOVED));
				}
			}
			for (String newException : newExceptions) {
				exceptionList.add(new JApiException(jarArchiveComparator, newException, jarArchiveComparator.loadClass(JarArchiveComparator.ArchiveType.NEW, newException), JApiChangeStatus.NEW));
			}
		} else if (oldMethodOptional.isPresent()) {
			List<String> exceptions = extractExceptions(oldMethodOptional);
			for (String exception : exceptions) {
				exceptionList.add(new JApiException(jarArchiveComparator, exception, jarArchiveComparator.loadClass(JarArchiveComparator.ArchiveType.OLD, exception), JApiChangeStatus.REMOVED));
			}
		} else if (newMethodOptional.isPresent()) {
			List<String> exceptions = extractExceptions(newMethodOptional);
			for (String exception : exceptions) {
				exceptionList.add(new JApiException(jarArchiveComparator, exception, jarArchiveComparator.loadClass(JarArchiveComparator.ArchiveType.NEW, exception), JApiChangeStatus.NEW));
			}
		}
		return exceptionList;
	}

	private List<String> extractExceptions(Optional<? extends CtBehavior> methodOptional) {
		if (methodOptional.isPresent()) {
			ExceptionsAttribute exceptionsAttribute = methodOptional.get().getMethodInfo().getExceptionsAttribute();
			String[] exceptions;
			if (exceptionsAttribute != null) {
				exceptions = exceptionsAttribute.getExceptions();
			} else {
				exceptions = new String[0];
			}
			List<String> list = new ArrayList<>(exceptions.length);
			Collections.addAll(list, exceptions);
			return list;
		} else {
			return Collections.emptyList();
		}
	}

	private Optional<Integer> getLineNumber(Optional<? extends CtBehavior> methodOptional) {
		Optional<Integer> lineNumberOptional = Optional.absent();
		if (methodOptional.isPresent()) {
			CtBehavior ctMethod = methodOptional.get();
			int lineNumber = ctMethod.getMethodInfo().getLineNumber(0);
			if (lineNumber >= 0) {
				lineNumberOptional = Optional.of(lineNumber);
			}
		}
		return lineNumberOptional;
	}

	@SuppressWarnings("unchecked")
	private void computeAnnotationChanges(List<JApiAnnotation> annotations, Optional<? extends CtBehavior> oldBehavior, Optional<? extends CtBehavior> newBehavior, JarArchiveComparatorOptions options) {
		if (oldBehavior.isPresent()) {
			CtBehavior ctBehavior = oldBehavior.get();
			if (ctBehavior instanceof CtMethod) {
				computeAnnotationChangesMethod(annotations, (Optional<CtMethod>) oldBehavior, (Optional<CtMethod>) newBehavior, options);
			} else if (ctBehavior instanceof CtConstructor) {
				computeAnnotationChangesConstructor(annotations, (Optional<CtConstructor>) oldBehavior, (Optional<CtConstructor>) newBehavior, options);
			}
		} else if (newBehavior.isPresent()) {
			CtBehavior ctBehavior = newBehavior.get();
			if (ctBehavior instanceof CtMethod) {
				computeAnnotationChangesMethod(annotations, (Optional<CtMethod>) oldBehavior, (Optional<CtMethod>) newBehavior, options);
			} else if (ctBehavior instanceof CtConstructor) {
				computeAnnotationChangesConstructor(annotations, (Optional<CtConstructor>) oldBehavior, (Optional<CtConstructor>) newBehavior, options);
			}
		}
	}

	private void computeAnnotationChangesMethod(List<JApiAnnotation> annotations, Optional<CtMethod> oldBehavior, Optional<CtMethod> newBehavior, JarArchiveComparatorOptions options) {
		AnnotationHelper.computeAnnotationChanges(annotations, oldBehavior, newBehavior, options, new AnnotationHelper.AnnotationsAttributeCallback<CtMethod>() {
			@Override
			public AnnotationsAttribute getAnnotationsAttribute(CtMethod method) {
				return (AnnotationsAttribute) method.getMethodInfo().getAttribute(AnnotationsAttribute.visibleTag);
			}
		});
	}

	private void computeAnnotationChangesConstructor(List<JApiAnnotation> annotations, Optional<CtConstructor> oldBehavior, Optional<CtConstructor> newBehavior, JarArchiveComparatorOptions options) {
		AnnotationHelper.computeAnnotationChanges(annotations, oldBehavior, newBehavior, options, new AnnotationHelper.AnnotationsAttributeCallback<CtConstructor>() {
			@Override
			public AnnotationsAttribute getAnnotationsAttribute(CtConstructor method) {
				return (AnnotationsAttribute) method.getMethodInfo().getAttribute(AnnotationsAttribute.visibleTag);
			}
		});
	}

	private JApiChangeStatus evaluateChangeStatus(JApiChangeStatus changeStatus) {
		if (changeStatus == JApiChangeStatus.UNCHANGED) {
			if (this.staticModifier.getChangeStatus() != JApiChangeStatus.UNCHANGED) {
				changeStatus = JApiChangeStatus.MODIFIED;
			}
			if (this.finalModifier.getChangeStatus() != JApiChangeStatus.UNCHANGED) {
				changeStatus = JApiChangeStatus.MODIFIED;
			}
			if (this.accessModifier.getChangeStatus() != JApiChangeStatus.UNCHANGED) {
				changeStatus = JApiChangeStatus.MODIFIED;
			}
			if (this.abstractModifier.getChangeStatus() != JApiChangeStatus.UNCHANGED) {
				changeStatus = JApiChangeStatus.MODIFIED;
			}
			if (this.syntheticAttribute.getChangeStatus() != JApiChangeStatus.UNCHANGED) {
				changeStatus = JApiChangeStatus.MODIFIED;
			}
			for (JApiException jApiException : exceptions) {
				if (jApiException.getChangeStatus() == JApiChangeStatus.NEW || jApiException.getChangeStatus() == JApiChangeStatus.REMOVED) {
					changeStatus = JApiChangeStatus.MODIFIED;
				}
			}
		}
		return changeStatus;
	}

	protected JApiAttribute<SyntheticAttribute> extractSyntheticAttribute(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		JApiAttribute<SyntheticAttribute> jApiAttribute = new JApiAttribute<>(JApiChangeStatus.UNCHANGED, Optional.of(SyntheticAttribute.SYNTHETIC), Optional.of(SyntheticAttribute.SYNTHETIC));
		if (oldBehaviorOptional.isPresent() && newBehaviorOptional.isPresent()) {
			CtBehavior oldBehavior = oldBehaviorOptional.get();
			CtBehavior newBehavior = newBehaviorOptional.get();
			byte[] attributeOldBehavior = oldBehavior.getAttribute(Constants.JAVA_CONSTPOOL_ATTRIBUTE_SYNTHETIC);
			byte[] attributeNewBehavior = newBehavior.getAttribute(Constants.JAVA_CONSTPOOL_ATTRIBUTE_SYNTHETIC);
			if (attributeOldBehavior != null && attributeNewBehavior != null) {
				jApiAttribute = new JApiAttribute<>(JApiChangeStatus.UNCHANGED, Optional.of(SyntheticAttribute.SYNTHETIC), Optional.of(SyntheticAttribute.SYNTHETIC));
			} else if (attributeOldBehavior != null) {
				jApiAttribute = new JApiAttribute<>(JApiChangeStatus.MODIFIED, Optional.of(SyntheticAttribute.SYNTHETIC), Optional.of(SyntheticAttribute.NON_SYNTHETIC));
			} else if (attributeNewBehavior != null) {
				jApiAttribute = new JApiAttribute<>(JApiChangeStatus.MODIFIED, Optional.of(SyntheticAttribute.NON_SYNTHETIC), Optional.of(SyntheticAttribute.SYNTHETIC));
			} else {
				jApiAttribute = new JApiAttribute<>(JApiChangeStatus.UNCHANGED, Optional.of(SyntheticAttribute.NON_SYNTHETIC), Optional.of(SyntheticAttribute.NON_SYNTHETIC));
			}
		} else {
			if (oldBehaviorOptional.isPresent()) {
				CtBehavior ctBehavior = oldBehaviorOptional.get();
				byte[] attribute = ctBehavior.getAttribute(Constants.JAVA_CONSTPOOL_ATTRIBUTE_SYNTHETIC);
				if (attribute != null) {
					jApiAttribute = new JApiAttribute<>(JApiChangeStatus.REMOVED, Optional.of(SyntheticAttribute.SYNTHETIC), Optional.<SyntheticAttribute>absent());
				} else {
					jApiAttribute = new JApiAttribute<>(JApiChangeStatus.REMOVED, Optional.of(SyntheticAttribute.NON_SYNTHETIC), Optional.<SyntheticAttribute>absent());
				}
			}
			if (newBehaviorOptional.isPresent()) {
				CtBehavior ctBehavior = newBehaviorOptional.get();
				byte[] attribute = ctBehavior.getAttribute(Constants.JAVA_CONSTPOOL_ATTRIBUTE_SYNTHETIC);
				if (attribute != null) {
					jApiAttribute = new JApiAttribute<>(JApiChangeStatus.NEW, Optional.<SyntheticAttribute>absent(), Optional.of(SyntheticAttribute.SYNTHETIC));
				} else {
					jApiAttribute = new JApiAttribute<>(JApiChangeStatus.NEW, Optional.<SyntheticAttribute>absent(), Optional.of(SyntheticAttribute.NON_SYNTHETIC));
				}
			}
		}
		return jApiAttribute;
	}

	public boolean hasSameParameter(JApiMethod method) {
		boolean hasSameParameter = true;
		List<JApiParameter> parameters1 = getParameters();
		List<JApiParameter> parameters2 = method.getParameters();
		if (parameters1.size() != parameters2.size()) {
			hasSameParameter = false;
		}
		if (hasSameParameter) {
			for (int i = 0; i < parameters1.size(); i++) {
				if (!parameters1.get(i).getType().equals(parameters2.get(i).getType())) {
					hasSameParameter = false;
				}
			}
		}
		return hasSameParameter;
	}

	private JApiModifier<StaticModifier> extractStaticModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<StaticModifier>() {
			@Override
			public StaticModifier getModifierForOld(CtBehavior oldBehavior) {
				return Modifier.isStatic(oldBehavior.getModifiers()) ? StaticModifier.STATIC : StaticModifier.NON_STATIC;
			}

			@Override
			public StaticModifier getModifierForNew(CtBehavior newBehavior) {
				return Modifier.isStatic(newBehavior.getModifiers()) ? StaticModifier.STATIC : StaticModifier.NON_STATIC;
			}
		});
	}

	private JApiModifier<FinalModifier> extractFinalModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<FinalModifier>() {
			@Override
			public FinalModifier getModifierForOld(CtBehavior oldBehavior) {
				return Modifier.isFinal(oldBehavior.getModifiers()) ? FinalModifier.FINAL : FinalModifier.NON_FINAL;
			}

			@Override
			public FinalModifier getModifierForNew(CtBehavior newBehavior) {
				return Modifier.isFinal(newBehavior.getModifiers()) ? FinalModifier.FINAL : FinalModifier.NON_FINAL;
			}
		});
	}

	private JApiModifier<AccessModifier> extractAccessModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<AccessModifier>() {
			@Override
			public AccessModifier getModifierForOld(CtBehavior oldBehavior) {
				return ModifierHelper.translateToModifierLevel(oldBehavior.getModifiers());
			}

			@Override
			public AccessModifier getModifierForNew(CtBehavior newBehavior) {
				return ModifierHelper.translateToModifierLevel(newBehavior.getModifiers());
			}
		});
	}

	private JApiModifier<AbstractModifier> extractAbstractModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<AbstractModifier>() {
			@Override
			public AbstractModifier getModifierForOld(CtBehavior oldBehavior) {
				return Modifier.isAbstract(oldBehavior.getModifiers()) ? AbstractModifier.ABSTRACT : AbstractModifier.NON_ABSTRACT;
			}

			@Override
			public AbstractModifier getModifierForNew(CtBehavior newBehavior) {
				return Modifier.isAbstract(newBehavior.getModifiers()) ? AbstractModifier.ABSTRACT : AbstractModifier.NON_ABSTRACT;
			}
		});
	}

	private JApiModifier<BridgeModifier> extractBridgeModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<BridgeModifier>() {
			@Override
			public BridgeModifier getModifierForOld(CtBehavior oldBehavior) {
				return ModifierHelper.isBridge(oldBehavior.getModifiers()) ? BridgeModifier.BRIDGE : BridgeModifier.NON_BRIDGE;
			}

			@Override
			public BridgeModifier getModifierForNew(CtBehavior newBehavior) {
				return ModifierHelper.isBridge(newBehavior.getModifiers()) ? BridgeModifier.BRIDGE : BridgeModifier.NON_BRIDGE;
			}
		});
	}

	private JApiModifier<SyntheticModifier> extractSyntheticModifier(Optional<? extends CtBehavior> oldBehaviorOptional, Optional<? extends CtBehavior> newBehaviorOptional) {
		return ModifierHelper.extractModifierFromBehavior(oldBehaviorOptional, newBehaviorOptional, new ModifierHelper.ExtractModifierFromBehaviorCallback<SyntheticModifier>() {
			@Override
			public SyntheticModifier getModifierForOld(CtBehavior oldBehavior) {
				return ModifierHelper.isSynthetic(oldBehavior.getModifiers()) ? SyntheticModifier.SYNTHETIC : SyntheticModifier.NON_SYNTHETIC;
			}

			@Override
			public SyntheticModifier getModifierForNew(CtBehavior newBehavior) {
				return ModifierHelper.isSynthetic(newBehavior.getModifiers()) ? SyntheticModifier.SYNTHETIC : SyntheticModifier.NON_SYNTHETIC;
			}
		});
	}

	@XmlElementWrapper(name = "modifiers")
	@XmlElement(name = "modifier")
	public List<? extends JApiModifier<? extends Enum<? extends Enum<?>>>> getModifiers() {
		return Arrays.asList(this.finalModifier, this.staticModifier, this.accessModifier, this.abstractModifier, this.bridgeModifier, this.syntheticModifier);
	}

	@XmlAttribute
	public String getName() {
		return name;
	}

	@XmlAttribute
	public JApiChangeStatus getChangeStatus() {
		return changeStatus;
	}

	@XmlElementWrapper(name = "parameters")
	@XmlElement(name = "parameter")
	public List<JApiParameter> getParameters() {
		return parameters;
	}

	public void addParameter(JApiParameter jApiParameter) {
		parameters.add(jApiParameter);
	}

	@XmlTransient
	public JApiModifier<AccessModifier> getAccessModifier() {
		return accessModifier;
	}

	@XmlTransient
	public JApiModifier<FinalModifier> getFinalModifier() {
		return finalModifier;
	}

	@XmlTransient
	public JApiModifier<StaticModifier> getStaticModifier() {
		return staticModifier;
	}

	public JApiModifier<AbstractModifier> getAbstractModifier() {
		return this.abstractModifier;
	}

	@XmlElementWrapper(name = "attributes")
	@XmlElement(name = "attribute")
	public List<JApiAttribute<? extends Enum<?>>> getAttributes() {
		List<JApiAttribute<? extends Enum<?>>> list = new ArrayList<>();
		list.add(this.syntheticAttribute);
		return list;
	}

	@XmlTransient
	public JApiModifier<BridgeModifier> getBridgeModifier() {
		return this.bridgeModifier;
	}

	@XmlTransient
	public JApiModifier<SyntheticModifier> getSyntheticModifier() {
		return this.syntheticModifier;
	}

	@XmlTransient
	public JApiAttribute<SyntheticAttribute> getSyntheticAttribute() {
		return syntheticAttribute;
	}

	@Override
	@XmlAttribute
	public boolean isBinaryCompatible() {
		boolean binaryCompatible = true;
		for (JApiCompatibilityChange compatibilityChange : compatibilityChanges) {
			if (!compatibilityChange.isBinaryCompatible()) {
				binaryCompatible = false;
			}
		}
		return binaryCompatible;
	}

	@Override
	@XmlAttribute
	public boolean isSourceCompatible() {
		boolean sourceCompatible = true;
		for (JApiCompatibilityChange compatibilityChange : compatibilityChanges) {
			if (!compatibilityChange.isSourceCompatible()) {
				sourceCompatible = false;
			}
		}
		return sourceCompatible;
	}

	@XmlElementWrapper(name = "compatibilityChanges")
	@XmlElement(name = "compatibilityChange")
	public List<JApiCompatibilityChange> getCompatibilityChanges() {
		return compatibilityChanges;
	}

	@XmlElementWrapper(name = "annotations")
	@XmlElement(name = "annotation")
	public List<JApiAnnotation> getAnnotations() {
		return annotations;
	}

	@Override
	public Optional<Integer> getOldLineNumber() {
		return this.oldLineNumber;
	}

	@Override
	public Optional<Integer> geNewLineNumber() {
		return this.newLineNumber;
	}

	@XmlAttribute(name = "oldLineNumber")
	public String getOldLineNumberAsString() {
		return OptionalHelper.optionalToString(this.oldLineNumber);
	}

	@XmlAttribute(name = "newLineNumber")
	public String getNewLineNumberAsString() {
		return OptionalHelper.optionalToString(this.newLineNumber);
	}

	@XmlElementWrapper(name = "exceptions")
	@XmlElement(name = "exception")
	public List<JApiException> getExceptions() {
		return exceptions;
	}

	@XmlTransient
	public JApiClass getjApiClass() {
		return this.jApiClass;
	}
}


text:
<?php

/**
 * community actions.
 *
 * @package    OpenPNE
 * @subpackage community
 * @author     Kousuke Ebihara <ebihara@tejimaya.com>
 * @author     Eitarow Fukamachi <fukamachi@tejimaya.net>
 */
class communityActions extends opCommunityAction
{
  /**
   * Executes home action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeHome(sfWebRequest $request)
  {
    $this->membersSize = 5;

    return parent::executeHome($request);
  }

  /**
   * Executes joinlist action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeJoinlist(sfWebRequest $request)
  {
    $this->size = 10;

    return parent::executeJoinlist($request);
  }

  /**
   * Executes memberList action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeMemberList(sfWebRequest $request)
  {
    $this->size = 10;

    return parent::executeMemberList($request);
  }

  /**
   * Executes search action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeSearch(sfWebRequest $request)
  {
    sfConfig::set('sf_nav_type', 'default');

    $params = $request->getParameter('community', array());
    $this->isResult = false;
    $this->category_id = 0;
    if (isset($params['name']))
    {
      $params['name'] = $params['name'];
      $this->isResult = true;
    }
    if (isset($params['community_category_id']))
    {
      $this->category_id = $params['community_category_id'];
      $params['community_category_id'] = $this->category_id;
      $this->isResult = true;
    }

    $this->filters = new CommunityFormFilter();
    $this->filters->bind($params);
    $q = $this->filters->getQuery()->orderBy('id desc');

    $this->pager = new sfDoctrinePager('Community', 10);
    $this->pager->setQuery($q);
    $this->pager->setPage($request->getParameter('page', 1));
    $this->pager->init();

    $this->categorys = Doctrine::getTable('CommunityCategory')->getAllChildren();

    return sfView::SUCCESS;
  }

  /**
   * Executes detail action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeDetail(sfWebRequest $request)
  {
    $this->community = Doctrine::getTable('Community')->find($this->id);
    $this->forward404Unless($this->community, 'Undefined community.');
    $this->communityAdmin = Doctrine::getTable('CommunityMember')->getCommunityAdmin($this->id);
    $this->communityAdmin = Doctrine::getTable('Member')->find($this->communityAdmin->getMemberId());
    $this->communitySubAdmins = $this->community->getSubAdminMembers();

    return sfView::SUCCESS;
  }

  /**
   * Executes configImage action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeConfigImage(sfWebRequest $request)
  {
    $this->forward404Unless($this->id && $this->isEditCommunity);
    $this->community = Doctrine::getTable('Community')->find($this->id);
  }

  /**
   * Executes deleteImage action
   *
   * @param sfWebRequest $request a request object
   */
  public function executeDeleteImage($request)
  {
    $this->forward404Unless($this->id && $this->isEditCommunity);

    $this->community = Doctrine::getTable('Community')->find($this->id);
    $this->forward404Unless($this->community->getImageFileName());

    $this->form = new sfForm();
    if ($request->isMethod(sfWebRequest::POST))
    {
      $request->checkCSRFProtection();

      $this->community->getFile()->delete();
      $this->redirect('community/configImage?id='.$this->id);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
Several Visualization notebooks, including:

- static charts with matplotlib: https://tinyurl.com/yarvfhxn.
- easy out-of-the-box visualizations with seaborn: https://tinyurl.com/y7up7ssu.
- interactive charts with plotly and cufflinks: https://tinyurl.com/y8xwb8ez.
- geographical plots: https://tinyurl.com/ybqecsma..


text:
<?php

namespace NetSuite\Classes;

class PayrollItemSearch extends SearchRecord {
    public $basic;
    public $customSearchJoin;
    static $paramtypesmap = array(
        "basic" => "PayrollItemSearchBasic",
        "customSearchJoin" => "CustomSearchJoin[]",
    );
}


text:
using System;
using System.Collections.Generic;

namespace afung.MangaWeb3.Common
{
    public class ChangePasswordRequest : JsonRequest
    {
        public string currentPassword;
        public string newPassword;
        public string newPassword2;
    }
}


text:
package org.jkiss.dbeaver.ext.oracle.edit;

import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.ext.oracle.model.OracleSchema;
import org.jkiss.dbeaver.ext.oracle.model.OracleView;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.model.edit.prop.DBECommandComposite;
import org.jkiss.dbeaver.model.impl.DBSObjectCache;
import org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction;
import org.jkiss.dbeaver.model.impl.sql.edit.SQLObjectEditor;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.utils.CommonUtils;

import java.util.List;

/**
 * OracleViewManager
 */
public class OracleViewManager extends SQLObjectEditor<OracleView, OracleSchema> {

    @Override
    public long getMakerOptions()
    {
        return FEATURE_EDITOR_ON_CREATE;
    }

    @Override
    protected void validateObjectProperties(ObjectChangeCommand command)
        throws DBException
    {
        if (CommonUtils.isEmpty(command.getObject().getName())) {
            throw new DBException("View name cannot be empty");
        }
        if (CommonUtils.isEmpty(command.getObject().getAdditionalInfo().getText())) {
            throw new DBException("View definition cannot be empty");
        }
    }

    @Nullable
    @Override
    public DBSObjectCache<? extends DBSObject, OracleView> getObjectsCache(OracleView object)
    {
        return (DBSObjectCache) object.getSchema().tableCache;
    }

    @Override
    protected OracleView createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, OracleSchema parent, Object copyFrom)
    {
        OracleView newView = new OracleView(parent, "NEW_VIEW"); //$NON-NLS-1$
        newView.getAdditionalInfo().setText("CREATE OR REPLACE VIEW " + newView.getFullyQualifiedName(DBPEvaluationContext.DDL) + " AS\nSELECT");
        return newView;
    }

    @Override
    protected void addObjectCreateActions(List<DBEPersistAction> actions, ObjectCreateCommand command)
    {
        createOrReplaceViewQuery(actions, command);
    }

    @Override
    protected void addObjectModifyActions(List<DBEPersistAction> actionList, ObjectChangeCommand command)
    {
        createOrReplaceViewQuery(actionList, command);
    }

    @Override
    protected void addObjectDeleteActions(List<DBEPersistAction> actions, ObjectDeleteCommand command)
    {
        actions.add(
            new SQLDatabasePersistAction("Drop view", "DROP VIEW " + command.getObject().getFullyQualifiedName(DBPEvaluationContext.DDL)) //$NON-NLS-2$
        );
    }

    private void createOrReplaceViewQuery(List<DBEPersistAction> actions, DBECommandComposite<OracleView, PropertyHandler> command)
    {
        final OracleView view = command.getObject();
        boolean hasComment = command.getProperty("comment") != null;
        if (!hasComment || command.getProperties().size() > 1) {
            actions.add(new SQLDatabasePersistAction("Create view", view.getAdditionalInfo().getText()));
        }
        if (hasComment) {
            actions.add(new SQLDatabasePersistAction(
                "Comment table",
                "COMMENT ON TABLE " + view.getFullyQualifiedName(DBPEvaluationContext.DDL) +
                    " IS '" + view.getComment() + "'"));
        }
    }

}


text:
package org.jetbrains.idea.maven.tasks;

import com.intellij.execution.BeforeRunTask;
import com.intellij.openapi.util.io.FileUtil;
import org.jdom.Element;
import org.jetbrains.idea.maven.project.MavenProject;

public class MavenBeforeRunTask extends BeforeRunTask<MavenBeforeRunTask> {
  private String myProjectPath;
  private String myGoal;

  public MavenBeforeRunTask() {
    super(MavenBeforeRunTasksProvider.ID);
  }

  public String getProjectPath() {
    return myProjectPath;
  }

  public void setProjectPath(String projectPath) {
    myProjectPath = projectPath;
  }

  public String getGoal() {
    return myGoal;
  }

  public void setGoal(String goal) {
    myGoal = goal;
  }

  public boolean isFor(MavenProject project, String goal) {
    if (myProjectPath == null || myGoal == null) return false;
    return FileUtil.pathsEqual(project.getPath(), myProjectPath) && goal.equals(myGoal);
  }

  @Override
  public void writeExternal(Element element) {
    super.writeExternal(element);
    if (myProjectPath != null) element.setAttribute("file", myProjectPath);
    if (myGoal != null) element.setAttribute("goal", myGoal);
  }

  @Override
  public void readExternal(Element element) {
    super.readExternal(element);
    myProjectPath = element.getAttributeValue("file");
    myGoal = element.getAttributeValue("goal");
  }

  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;

    MavenBeforeRunTask that = (MavenBeforeRunTask)o;

    if (myGoal != null ? !myGoal.equals(that.myGoal) : that.myGoal != null) return false;
    if (myProjectPath != null ? !myProjectPath.equals(that.myProjectPath) : that.myProjectPath != null) return false;

    return true;
  }

  public int hashCode() {
    int result = super.hashCode();
    result = 31 * result + (myProjectPath != null ? myProjectPath.hashCode() : 0);
    result = 31 * result + (myGoal != null ? myGoal.hashCode() : 0);
    return result;
  }
}


text:
JavaScript post-processing step to replace specific function/method calls with
other bits of JavaScript. It doesn't take scope into account, but is otherwise
a good starting point for writing your own inlinifying transform modules like
[`brfs`](http://github.com/substack/brfs).

## Usage ##

[![replace-method](https://nodei.co/npm/replace-method.png?mini=true)](https://nodei.co/npm/replace-method)

### `replace = require('replace-method')(ast)` ###

Returns a function you can use to replace methods with other things.

Where `ast` is either a string of source code, or an AST object such as one
generated by [esprima](http://github.com/ariya/esprima/).

### `replace(method, found)` ###

Where `method` is an array of variable names, such that:

* `['__filename']` will match `__filename`.
* `['fs', 'readFileSync']` will match `fs.readFileSync`.
* `['a', 'nested', 'property']` will match `a.nested.property`.

`found` is then called once per every node in the AST found – if you return
nothing or `undefined`, nothing will change. However, if you return an AST
object that content will be replaced, e.g.:

``` javascript
return {
  type: 'Literal',
  value: 'hello world'
}
```

Will replace the matched variable with the string `"hello world"`.

### `replace.code()` ###

Returns the updated version of your code after having made the transformations
you needed. Note that the supplied `ast` object you provided will be modified
directly so you can convert it to JavaScript yourself or hand it off to other
processing steps if need be.

## Example ##

``` javascript
var replaceMethod  = require('replace-method')
var evaluate       = require('static-eval')
var escodegen      = require('escodegen')
var esprima        = require('esprima')
var fs             = require('fs')

var src = replaceMethod(
  fs.readFileSync(__filename, 'utf8')
)

src.replace(['fs', 'readFileSync'], function(node) {
  if (!node.arguments.length) return

  var filename = evaluate(node.arguments[0], {
      __filename: __filename
    , __dirname:  __dirname
  })

  if (filename) return {
      type: 'Literal'
    , value: fs.readFileSync(filename, 'utf8')
  }
})

console.log(src.code())
```

## License ##

MIT. See [LICENSE.md](http://github.com/hughsk/replace-method/blob/master/LICENSE.md) for details.


text:
<?php

namespace Paysafe;

class InvalidCredentialsException extends PaysafeException
{
}


text:
<?php
$laboratorio = mysql_fetch_object($datos);
?>

Datos Laboratorio

	<form id="laboratorio">

			Nro Análisis
			<input id="analisis" name="analisis" type="text" value="<?php echo $laboratorio -> nro_analisis;?>"/>

			Fecha Recepcion
			<input id="f_recepcion" name="recepcion" type="text" value="<?php echo $laboratorio -> fecha_recepcion;?>"/>

			Fecha Resultado
			<input id="f_resultado" name="resultado" type="text" value="<?php echo $laboratorio -> fecha_resultado;?>"/>

			Numero Campo
			<input id="campo" name="campo"  value="<?php echo $laboratorio -> nro_campo;?>" />

			Lote Nro
			<input id="lote" name="lote" type="text"  value="<?php echo $laboratorio -> nro_lote;?>"/>

			Tipo de Semilla
			<input id="tipo" name="tipo" type="text" value="<?php echo $laboratorio -> tipo_semilla;?>" />

			Número Bolsa
			<input id="bolsa" name="bolsa" type="text" value="<?php echo $laboratorio -> nro_bolsa;?>" />

			Kg. / Bolsa
			<input id="kgbolsa" name="kgbolsa" type="text" value="<?php echo $laboratorio -> kg_bolsa;?>" />

			Total
			<input id="total" name="total" type="text" value="<?php echo $laboratorio -> total;?>"/>

			Calibre
			<input id="calibre" name="calibre" type="text" value="<?php echo $laboratorio -> calibre;?>" />

			Número Semilla por Kilo
			<input id="semillakg" name="semillakg" type="text"  value="<?php echo $laboratorio -> nro_semilla_kilo;?>"/>

			%Pureza
			<input id="pureza" name="pureza" type="text" value="<?php echo $laboratorio -> pureza;?>" />

			%Germinacion
			<input id="germinacion" name="germinacion" type="text" value="<?php echo $laboratorio -> germinacion;?>"/>

			%Humedad
			<input id="humedad" name="humedad" type="text"  value="<?php echo $laboratorio -> humedad;?>"/>

			Observacion
			<textarea  name="observacion" cols="26" rows="3" > <?php echo $laboratorio -> observacion;?></textarea>

			<input name="idCosecha" type="hidden" id="idCosecha" value="<?php echo $laboratorio -> id_cosecha;?>"/>

			<input class="button-primary ui-state-default ui-corner-all" name="send" value="Guardar" type="button" />

	</form>


text:
#nullable enable
using System;
using System.Collections.Generic;
using System.Text;
using Core2D.Model;
using Core2D.ViewModels;
using Core2D.ViewModels.Shapes;
using Core2D.ViewModels.Style;

namespace Core2D.Modules.XamlExporter.Avalonia;

public class DrawingGroupXamlExporter : IXamlExporter
{
    private readonly IServiceProvider? _serviceProvider;

    public DrawingGroupXamlExporter(IServiceProvider? serviceProvider)
    {
        _serviceProvider = serviceProvider;
    }

    public string Create(object item, string? key)
    {
        var converter = _serviceProvider.GetService<IPathConverter>();

        if (converter is null)
        {
            return "";
        }

        var sb = new StringBuilder();

        sb.AppendLine(!string.IsNullOrWhiteSpace(key) ? $"<DrawingGroup x:Key=\"{key}\">" : $"<DrawingGroup>");

        switch (item)
        {
            case BaseShapeViewModel shape:
            {
                ToGeometryDrawing(shape, sb, converter);
            }
                break;
            case IEnumerable<BaseShapeViewModel> shapes:
            {
                foreach (var shape in shapes)
                {
                    ToGeometryDrawing(shape, sb, converter);
                }
            }
                break;
        }

        sb.AppendLine($"</DrawingGroup>");

        return sb.ToString();
    }

    private void ToGeometryDrawing(BaseShapeViewModel shape, StringBuilder sb, IPathConverter converter)
    {
        if (shape is GroupShapeViewModel group)
        {
            foreach (var child in group.Shapes)
            {
                ToGeometryDrawing(child, sb, converter);
            }
            return;
        }

        if (shape.IsFilled)
        {
            var path = converter.ToFillPathShape(shape);
            if (path is { })
            {
                var geometry = path.ToXamlString();
                var brush = (shape.Style?.Fill?.Color as ArgbColorViewModel)?.ToXamlString();
                sb.AppendLine($"    <GeometryDrawing Brush=\"{brush}\" Geometry=\"{geometry}\"/>");
            }
        }

        if (shape.IsStroked)
        {
            var path = converter.ToStrokePathShape(shape);
            if (path is { })
            {
                var geometry = path.ToXamlString();
                var brush = (shape.Style?.Stroke?.Color as ArgbColorViewModel)?.ToXamlString();
                sb.AppendLine($"    <GeometryDrawing Brush=\"{brush}\" Geometry=\"{geometry}\"/>");
            }
        }
    }
}


text:
title: Spoofax Example Projects
layout: page
modified:
excerpt: "Spoofax Examples"
image:
  feature:
  credit:
  creditlink:
context: spoofax
---

## EntityLang (tour with screenshots)

The EntityLang language shows some of the Spoofax basics, and comes with a short tutorial and screenshots. A basic version of language is included in the _New project_ wizard.

[Tour](/spoofax/tour/)

## Calculang

A simple calculator language, illustrating basic syntax and transformations.

[https://svn.strategoxt.org/repos/StrategoXT/spoofax-contrib/calculang/](https://svn.strategoxt.org/repos/StrategoXT/spoofax-contrib/calculang/)

## WebDSL

[WebDSL](http://webdsl.org) is a web programming language

## Mobl

Mobl is a language for client-side web applications specialized for mobile phones.

![mobl.png](http://www.mobl-lang.org/logo.png)

[http://mobl-lang.org](http://mobl-lang.org)

[https://github.com/mobl/mobl](https://github.com/mobl/mobl)

## Lua

[Lua](http://www.lua.org/) is a dynamically typed, lightweight, embeddable scripting language. Spoofax-Lua is an Eclipse plugin for Lua built using Spoofax, featuring reference resolving, type analysis and content assist.

[https://github.com/tvo/spoofax-lua\#readme](https://github.com/tvo/spoofax-lua#readme)


text:
.. _setting_up_the_bus:

The Bus
~~~~~~~
Release Engine requires an AMQP service allowing messages to pass between components. The current, verified to work, AMQP service used with Release Engine is `RabbitMQ <http://www.rabbitmq.com/>`_, an `Erlang-based <http://www.erlang.org/>`_ open source messaging service. For more information on setting up a RabbitMQ server please read the project's `server documentation <http://www.rabbitmq.com/admin-guide.html>`_.

For security best practices, each component that transmits on the bus should have it's own username and password combination. By enforcing component username/passwords access can be restricted to just what a component needs. This also allows quick deactivation of a component in the event something goes terribly wrong or a service is compromised.

Setup Steps
```````````

.. note::
   Provision or utilize an existing server to install RabbitMQ or similar AMQP compliant service.  For the rest of this article we will assume that you are running the service on RabbitMQ.

* Install `RabbitMQ Server <http://www.rabbitmq.com/install-rpm.html>`_
* Open ports **5672** (*AMQP*) and **15672** (*management*)
* Enable RabbitMQ management via the `Management Plugin <http://www.rabbitmq.com/management.html>`_
* Start RabbitMQ
* Create an exchange called "re" using topics
* Create a user for RE-REST (the rest interface into Release Engine)
* Create a user for RE-CORE (the state machine)
* Create a queue for RE-CORE
* Bind the RE-CORE queue to the re exchange with job.create
* Create a user for each component your instance will support
* Create a queue for each component your instance will support
* Bind the queue for each additional component (not including RE-REST and RE-CORE which are mandatory and separate from any additional components) to the re exchange with connectors that describe the step or plugin that your instance will support.

.. todo::
   List binding instructions for queues

Test Setup
``````````
.. todo::
   How to verify it's ready.


text:
package org.jets3t.service.model;

/**
 * Represents an owner object with a canonical ID and, optionally, a display name.
 *
 * @author James Murty
 */
public class StorageOwner {

    private String displayName;
    private String id;

    public StorageOwner() {
    }

    public StorageOwner(String id, String displayName) {
        this.id = id;
        this.displayName = displayName;
    }

    @Override
    public String toString() {
        return this.getClass().getName() + " ["
            + "id=" + getId()
            + (getDisplayName() != null ? ", name=" + getDisplayName(): "")
            + "]";
    }

    public String getId() {
        return id;
    }

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

    public String getDisplayName() {
        return displayName;
    }

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

}


text:
@interface NSURL (CDEAdditions)

#pragma mark - Bookmarks (Convenience)
+ (NSURL *)URLByResolvingBookmarkData:(NSData *)data error_cde:(NSError **)error;
- (NSData *)bookmarkDataAndGetError_cde:(NSError **)error;

#pragma mark - UTI
- (NSString *)typeOfFileURLAndGetError_cde:(NSError **)error;
- (BOOL)isCompiledManagedObjectModelFile_cde;

#pragma mark - App Specific URLs
+ (instancetype)URLForWebsite_cde;
+ (instancetype)URLForCreateProjectTutorial_cde;
+ (instancetype)URLForSupportWebsite_cde;
+ (instancetype)URLForVersionCheck_cde;

@end

@interface NSURL (CDESQLiteAdditions)
- (BOOL)isSQLiteURL_cde;
@end


text:
layout: page
title: Seattle Police Officer 6646 Lauren Truscott
permalink: /information/agencies/city_of_seattle/seattle_police_department/copbook/6646/
---

**Age as of Feb. 24, 2016:** 40


text:
require "gnar/style/cli/application"
require "gnar/style/version"

module Gnar
  module Style
  end
end


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace SwitchAppDesign.AniListAPI.v2.Models
{
    public class StaffConnection
    {
        public StaffEdge[] edges { get; set; }
        public Staff[] nodes { get; set; }

        /// <summary>
        /// The pagination information
        /// </summary>
        public PageInfo pageInfo { get; set; }
    }
}


text:
<transforms xmlns="urn:switchyard-config:switchyard:1.1">
    <transform.java xmlns="urn:switchyard-config:transform:1.1" class="org.switchyard.component.camel.atom.transformer.AtomTransforms" from="java:org.apache.abdera.parser.stax.FOMEntry" to="java:java.lang.String"/>
</transforms>


text:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using OdessaGUIProject.Properties;

namespace OdessaGUIProject.UI_Helpers
{
    public class BorderlessWindow : IDisposable
    {
        internal bool IsFormActive = true;
        internal bool IsMinimizable = true;
        internal bool IsResizable = true;
        internal WindowMenu SystemMenu;
        private readonly ToolTip ButtonTip;
        private Form form;

        private GraphicsPath topEdgePath, topLeftEdgePath, topRightEdgePath,
            titleBarPath, closeButtonPath, maxButtonPath, minButtonPath,
            minimizeDividerPath, maximizeDividerPath, closeDividerPath,
            leftEdge, bottomEdge, rightEdge, bottomLeftEdge, bottomRightEdge;
        //iconButtonPath,

        internal BorderlessWindow(Form owner, bool resizable, bool minimizable)
        {
            form = owner;

            this.IsResizable = resizable;
            this.IsMinimizable = minimizable;

            this.topEdgePath = new GraphicsPath();
            this.topLeftEdgePath = new GraphicsPath();
            this.topRightEdgePath = new GraphicsPath();
            this.titleBarPath = new GraphicsPath();
            this.closeButtonPath = new GraphicsPath();
            this.closeDividerPath = new GraphicsPath();
            this.maxButtonPath = new GraphicsPath();
            this.maximizeDividerPath = new GraphicsPath();
            this.minButtonPath = new GraphicsPath();
            this.minimizeDividerPath = new GraphicsPath();
            //this.iconButtonPath = new GraphicsPath();
            this.leftEdge = new GraphicsPath();
            this.rightEdge = new GraphicsPath();
            this.bottomEdge = new GraphicsPath();
            this.bottomLeftEdge = new GraphicsPath();
            this.bottomRightEdge = new GraphicsPath();

            BuildPaths();

            //this.Padding = new Padding(5, (int)titleBar.GetBounds().Height + 7, 5, 5);

            this.SystemMenu = new WindowMenu(form);
            this.SystemMenu.SystemEvent += new WindowMenuEventHandler(SystemMenu_SystemEvent);

            ButtonTip = new ToolTip();
        }

        internal delegate void NCWinMessageEventArgs(int msg, IntPtr wParam, IntPtr lParam);

        internal event NCWinMessageEventArgs SendNCWinMessage;

        public void Dispose()
        {
            Dispose(true);

            // Use SupressFinalize in case a subclass
            // of this type implements a finalizer.
            GC.SuppressFinalize(this);
        }

        internal void BuildPaths()
        {
            int edgeSize = SystemInformation.CaptionHeight + 2;
            int buttonSize = 27;
            int buttonPadding = 2;

            //Top Sizing Edge
            topEdgePath.Reset();
            topEdgePath.AddRectangle(new Rectangle(edgeSize, 0, form.Width - (edgeSize * 2), 5));

            //Top-Left Sizing Edge
            topLeftEdgePath.Reset();
            topLeftEdgePath.AddRectangle(new Rectangle(0, 0, edgeSize, edgeSize));
            topLeftEdgePath.AddRectangle(new Rectangle(5, 5, edgeSize - 5, edgeSize - 5));

            //Top-Right Sizing Edge
            topRightEdgePath.Reset();
            topRightEdgePath.AddRectangle(new Rectangle(form.Width - edgeSize, 0, edgeSize, edgeSize));
            topRightEdgePath.AddRectangle(new Rectangle(form.Width - edgeSize, 5, edgeSize - 5, edgeSize - 5));

            //Close Button
            closeButtonPath.Reset();
            closeButtonPath.AddRectangle(new Rectangle(form.Width - (buttonSize + buttonPadding), buttonPadding, buttonSize, buttonSize));
            //closeButtonPath.AddRectangle(closeButton.ClientRectangle);

            //Close divider (to the left of Close button)
            closeDividerPath.Reset();
            closeDividerPath.AddRectangle(new Rectangle(form.Width - (buttonPadding + buttonSize + buttonPadding), 0, 2, 31));

            //Maximize Button
            if (IsResizable)
            {
                maxButtonPath.Reset();
                maxButtonPath.AddRectangle(new Rectangle(form.Width - ((buttonSize + buttonPadding) * 2), buttonPadding, buttonSize, buttonSize));
                //maxButtonPath.AddRectangle(maximizeButton.ClientRectangle);

                //Maximize divider (to the left of Maximize button)
                maximizeDividerPath.Reset();
                maximizeDividerPath.AddRectangle(new Rectangle(form.Width - (2 * buttonPadding + 2 * buttonSize + buttonPadding), 0, 2, 31));
            }

            //Minimize Button
            if (IsMinimizable)
            {
                minButtonPath.Reset();
                minButtonPath.AddRectangle(new Rectangle(form.Width - ((buttonSize + buttonPadding) * 3), buttonPadding, buttonSize, buttonSize));
                //minButtonPath.AddRectangle(minimizeButton.ClientRectangle);

                //Minimize divider (to the left of Minimize button)
                minimizeDividerPath.Reset();
                minimizeDividerPath.AddRectangle(new Rectangle(form.Width - (3 * buttonPadding + 3 * buttonSize + buttonPadding), 0, 2, 31));
            }

            /* Disabled because it looks like shit
            //Window Menu Button (Icon)
            iconButtonPath.Reset();
            //iconButton.AddRectangle(new Rectangle(8, 8, buttonSize, buttonSize));
            iconButtonPath.AddRectangle(new Rectangle(4, 8, 24, 31 - 8));
             */

            //TitleBar
            titleBarPath.Reset();
            titleBarPath.AddRectangle(new Rectangle(0, 0, form.Width, 31));
            //titleBarPath.AddRectangle(new Rectangle();

            //Remove Titlebar Buttons from TitleBar Path
            titleBarPath.AddPath(closeButtonPath, false);
            if (IsResizable)
                titleBarPath.AddPath(maxButtonPath, false);
            if (IsMinimizable)
                titleBarPath.AddPath(minButtonPath, false);
            //titleBarPath.AddPath(iconButtonPath, false);

            //Left Sizing Edge
            leftEdge.Reset();
            leftEdge.AddRectangle(new Rectangle(0, edgeSize, 5, form.Height - (edgeSize * 2)));

            //Right Sizing Edge
            rightEdge.Reset();
            rightEdge.AddRectangle(new Rectangle(form.Width - 5, edgeSize, 5, form.Width - (edgeSize * 2)));

            //Bottom Sizing Edge
            bottomEdge.Reset();
            bottomEdge.AddRectangle(new Rectangle(edgeSize, form.Height - 5, form.Width - (edgeSize * 2), 5));

            //Bottom-Left Sizing Edge
            bottomLeftEdge.Reset();
            bottomLeftEdge.AddRectangle(new Rectangle(0, form.Height - edgeSize, edgeSize, edgeSize));
            bottomLeftEdge.AddRectangle(new Rectangle(5, form.Height - edgeSize, edgeSize - 5, edgeSize - 5));

            //Bottom-Right Sizing Edge
            bottomRightEdge.Reset();
            bottomRightEdge.AddRectangle(new Rectangle(form.Width - edgeSize, form.Height - edgeSize, edgeSize, edgeSize));
            bottomRightEdge.AddRectangle(new Rectangle(form.Width - edgeSize, form.Height - edgeSize, edgeSize - 5, edgeSize - 5));
        }

        internal IntPtr OnNonClientHitTest(IntPtr lParam)
        {
            USER32.NCHitTestResult result = USER32.NCHitTestResult.HTCLIENT;

            Point point = form.PointToClient(new Point(lParam.ToInt32()));

            if (this.titleBarPath.IsVisible(point))
            {
                result = USER32.NCHitTestResult.HTCAPTION;
            }

            if (form.WindowState == FormWindowState.Normal && IsResizable)
            {
                if (this.topLeftEdgePath.IsVisible(point))
                    result = USER32.NCHitTestResult.HTTOPLEFT;
                else if (this.topEdgePath.IsVisible(point))
                    result = USER32.NCHitTestResult.HTTOP;
                else if (this.topRightEdgePath.IsVisible(point))
                    result = USER32.NCHitTestResult.HTTOPRIGHT;
                else if (this.leftEdge.IsVisible(point))
                    result = USER32.NCHitTestResult.HTLEFT;
                else if (this.rightEdge.IsVisible(point))
                    result = USER32.NCHitTestResult.HTRIGHT;
                else if (this.bottomLeftEdge.IsVisible(point))
                    result = USER32.NCHitTestResult.HTBOTTOMLEFT;
                else if (this.bottomEdge.IsVisible(point))
                    result = USER32.NCHitTestResult.HTBOTTOM;
                else if (this.bottomRightEdge.IsVisible(point))
                    result = USER32.NCHitTestResult.HTBOTTOMRIGHT;
            }

            if (this.closeButtonPath.IsVisible(point))
                result = USER32.NCHitTestResult.HTBORDER; // if this is HTCLOSE, the user must double-click to close. not good
            else if (IsResizable && this.maxButtonPath.IsVisible(point))
                result = USER32.NCHitTestResult.HTBORDER;
            else if (IsMinimizable && this.minButtonPath.IsVisible(point))
                result = USER32.NCHitTestResult.HTBORDER;
            //else if (this.iconButtonPath.IsVisible(point))
            //    result = USER32.NCHitTestResult.HTBORDER;

            return (IntPtr)result;
        }

        internal void OnNonClientLButtonUp(IntPtr lParam)
        {
            USER32.SysCommand code = USER32.SysCommand.SC_DEFAULT;
            Point point = form.PointToClient(new Point(lParam.ToInt32()));

            /*
            if (this.iconButtonPath.IsVisible(point))
            {
                SendNCWinMessage(USER32.WM_GETSYSMENU, IntPtr.Zero, lParam);
            }
            else
            {
             */
                if (this.closeButtonPath.IsVisible(point))
                    code = USER32.SysCommand.SC_CLOSE;
                else if (IsResizable && this.maxButtonPath.IsVisible(point))
                    code = form.WindowState == FormWindowState.Normal ? USER32.SysCommand.SC_MAXIMIZE : USER32.SysCommand.SC_RESTORE;
                else if (IsMinimizable && this.minButtonPath.IsVisible(point))
                    code = USER32.SysCommand.SC_MINIMIZE;

                SendNCWinMessage(USER32.WM_SYSCOMMAND, (IntPtr)code, IntPtr.Zero);
            //}
        }

        internal void OnNonClientMouseMove(IntPtr lParam)
        {
            //Logger.Trace("called");

            Point point = form.PointToClient(new Point(lParam.ToInt32()));
            String tooltip;
            if (this.closeButtonPath.IsVisible(point))
            {
                tooltip = "Close";
            }
            else if (IsResizable && this.maxButtonPath.IsVisible(point))
            {
                tooltip = form.WindowState == FormWindowState.Normal ? "Maximize" : "Restore";
            }
            else if (IsMinimizable && this.minButtonPath.IsVisible(point))
                tooltip = "Minimize";
            else
                tooltip = string.Empty;

            if (ButtonTip.GetToolTip(form) != tooltip)
                ButtonTip.SetToolTip(form, tooltip);

            form.Invalidate(Rectangle.Round(titleBarPath.GetBounds()));
        }

        internal void OnNonClientRButtonUp(IntPtr lParam)
        {
            if (this.titleBarPath.IsVisible(form.PointToClient(new Point(lParam.ToInt32()))))
                SendNCWinMessage(USER32.WM_GETSYSMENU, IntPtr.Zero, lParam);
        }

        internal void PaintForm(PaintEventArgs e, string mainTitle, string subTitle)
        {
            Rectangle rc;

            if (titleBarPath != null) // added null check in case this was disposed
            {
                rc = Rectangle.Round(titleBarPath.GetBounds());
                using (TextureBrush brush = new TextureBrush(Resources.titlebar_tile, WrapMode.Tile))
                    e.Graphics.FillRectangle(brush, rc);
            }

            /*
            e.Graphics.FillPath(Brushes.Orange, leftEdge);
            e.Graphics.FillPath(Brushes.Orange, topEdgePath);
            e.Graphics.FillPath(Brushes.Orange, rightEdge);
            e.Graphics.FillPath(Brushes.Orange, bottomEdge);

            e.Graphics.FillPath(Brushes.Coral, topLeftEdgePath);
            e.Graphics.FillPath(Brushes.Coral, topRightEdgePath);
            e.Graphics.FillPath(Brushes.Coral, bottomLeftEdge);
            e.Graphics.FillPath(Brushes.Coral, bottomRightEdge);
            */

            // Icon
            /* Disabled because it looks like shit
            rc = Rectangle.Round(iconButtonPath.GetBounds());
            using (Bitmap bm = Resources.icon_16x16)
            {
                e.Graphics.DrawImageUnscaled(bm, rc.X, rc.Y);
            }
             */

            Point mousePt = form.PointToClient(Cursor.Position);

            // Minimize button
            if (IsMinimizable && minButtonPath != null && minimizeDividerPath != null)
            {
                rc = Rectangle.Round(minButtonPath.GetBounds());
                if (this.minButtonPath.IsVisible(mousePt))
                    using (Bitmap bm = Resources.titlebar_minimize_icon_hover)
                        e.Graphics.DrawImage(bm, rc);
                else
                    using (Bitmap bm = Resources.titlebar_minimize_icon)
                        e.Graphics.DrawImage(bm, rc);

                rc = Rectangle.Round(minimizeDividerPath.GetBounds());
                using (Bitmap bm = Resources.titlebar_2px_vertical_divider)
                    e.Graphics.DrawImage(bm, rc);
            }

            // Maximize button
            rc = Rectangle.Round(maxButtonPath.GetBounds());
            if (IsResizable && maxButtonPath != null)
            {
                if (this.maxButtonPath.IsVisible(mousePt))
                    using (Bitmap bm = form.WindowState == FormWindowState.Normal ? Resources.titlebar_maximize_icon_hover : Resources.titlebar_restore_icon_hover)
                    {
                        e.Graphics.DrawImage(bm, rc);
                    }
                else
                    using (Bitmap bm = form.WindowState == FormWindowState.Normal ? Resources.titlebar_maximize_icon : Resources.titlebar_restore_icon)
                    {
                        e.Graphics.DrawImage(bm, rc);
                    }
            }

            if (maximizeDividerPath != null)
            {
                rc = Rectangle.Round(maximizeDividerPath.GetBounds());
                using (Bitmap bm = Resources.titlebar_2px_vertical_divider)
                    e.Graphics.DrawImage(bm, rc);
            }

            // Close button
            if (closeButtonPath != null && closeDividerPath != null)
            {
                rc = Rectangle.Round(closeButtonPath.GetBounds());
                if (this.closeButtonPath.IsVisible(mousePt))
                    using (Bitmap bm = Resources.titlebar_close_icon_hover)
                        e.Graphics.DrawImage(bm, rc);
                else
                    using (Bitmap bm = Resources.titlebar_close_icon)
                        e.Graphics.DrawImage(bm, rc);

                rc = Rectangle.Round(closeDividerPath.GetBounds());
                using (Bitmap bm = Resources.titlebar_2px_vertical_divider)
                    e.Graphics.DrawImage(bm, rc);
            }

            /*
            using (Pen myPen = new Pen(Color.Orange, 2))
            {
                rc = this.DisplayRectangle;
                e.Graphics.DrawLine(myPen, rc.Left, rc.Top - 2, rc.Right, rc.Top - 2);
            }
             */

            Size titleSize;
            var drawingPoint = new Point(3, 6);
            using (var font = new Font(DesignLanguage.BoldFont, 10, FontStyle.Bold))
            {
                titleSize = TextRenderer.MeasureText(mainTitle, font);
                TextRenderer.DrawText(e.Graphics, mainTitle, font,
                    drawingPoint, DesignLanguage.LightGray, Color.Transparent);
            }

            using (var font = new Font(DesignLanguage.NormalFont, 10, FontStyle.Regular))
            {
                if (String.IsNullOrEmpty(subTitle) == false)
                    TextRenderer.DrawText(e.Graphics, subTitle, font, new Point(drawingPoint.X + titleSize.Width - 3, drawingPoint.Y),
                        DesignLanguage.LightGray, Color.Transparent, TextFormatFlags.NoPrefix); // NoPrefix ignores amperstand
            }

            if (!IsFormActive && titleBarPath != null) // draw it as overlay
            {
                rc = Rectangle.Round(titleBarPath.GetBounds());
                //using (TextureBrush brush = new TextureBrush(Resources.titlebar_inactive_overlay_1px_transparent, WrapMode.Tile))
                using (var brush = new SolidBrush(Color.FromArgb(20, Color.White)))
                    e.Graphics.FillRectangle(brush, rc);
            }

            /*
            RectangleF textRect = titleBarPath.GetBounds();
            textRect.X += iconButtonPath.GetBounds().Width + 3;
            textRect.Width = minButtonPath.GetBounds().Left - textRect.Left;
            TextRenderer.DrawText(e.Graphics, this.Text, SystemFonts.CaptionFont, Rectangle.Round(textRect), Color.DarkGoldenrod, TextFormatFlags.EndEllipsis | TextFormatFlags.VerticalCenter);
            */
        }

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                bottomEdge.Dispose();
                topEdgePath.Dispose();
                topLeftEdgePath.Dispose();
                topRightEdgePath.Dispose();
                titleBarPath.Dispose();
                closeButtonPath.Dispose();
                closeDividerPath.Dispose();
                maxButtonPath.Dispose();
                maximizeDividerPath.Dispose();
                minButtonPath.Dispose();
                minimizeDividerPath.Dispose();
                //iconButtonPath.Dispose();
                leftEdge.Dispose();
                bottomEdge.Dispose();
                rightEdge.Dispose();
                bottomLeftEdge.Dispose();
                bottomRightEdge.Dispose();

                SystemMenu.Dispose();

                ButtonTip.Dispose();
            }
        }

        protected void SystemMenu_SystemEvent(object sender, WindowMenuEventArgs ev)
        {
            SendNCWinMessage(USER32.WM_SYSCOMMAND, (IntPtr)ev.SystemCommand, IntPtr.Zero);
        }
    }
}


text:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
import           Control.Monad
import           Data.Bifunctor
import           Data.List
import           Data.ML
import           Data.Random
import           Data.ML.Repl
import           Data.Total.Array
import           Data.Vector (Vector)
import qualified Data.Vector as Vector
import           Control.Monad.IO.Class

newtype Letter = Letter Char
    deriving (Eq, Ord, Enum)

instance Show Letter where
    show (Letter l) = show l

instance Bounded Letter where
    minBound = Letter 'a'
    maxBound = Letter 'b'

type ExampleModel
    = MonoidHom (TotalArray Letter) (Matrix' 5)
  :>> AffineMap (Matrix' 5) Scalar
  :>> Sigmoid

cost :: Cost ExampleModel
cost = logistic + 0.01 * l2reg

evenCount :: Char -> [Char] -> Bool
evenCount x xs = length (elemIndices x xs) `rem` 2 == 0

isAccepted :: String -> Bool
isAccepted s = evenCount 'a' s && evenCount 'b' s

dataset :: Int -> Vector (Const [Letter] Double, Scalar Double)
dataset n = Vector.fromList
          $ map (bimap (Const . map Letter) Scalar)
          $ map (\s -> (s, if isAccepted s then 1 else 0))
          $ [0 .. n] >>= flip replicateM ['a', 'b']

isOk :: Scalar Double -> Scalar Double -> CountCorrect
isOk x y = if abs (x - y) < 0.5
              then correct
              else incorrect

driver :: Driver ExampleModel Double ()
driver = do
    setTrainingSet (dataset 6)
    setTestSet (dataset 15)
    setCostFun cost
    runReplT (driverRepl "example/Example.hs")

main :: IO ()
main = runDriverT driver


text:
#include <linux/moduleloader.h>
#include <linux/elf.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/slab.h>

#include <asm/system.h>
#include <asm/page.h>
#include <asm/pgtable.h>

#define DEBUGP(fmt...)

#ifndef CONFIG_UML
void module_free(struct module *mod, void *module_region)
{
	vfree(module_region);
	/* FIXME: If module_region == mod->init_region, trim exception
           table entries. */
}

void *module_alloc(unsigned long size)
{
	struct vm_struct *area;

	if (!size)
		return NULL;
	size = PAGE_ALIGN(size);
	if (size > MODULES_LEN)
		return NULL;

	area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END);
	if (!area)
		return NULL;

	return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
}
#endif

/* We don't need anything special. */
int module_frob_arch_sections(Elf_Ehdr *hdr,
			      Elf_Shdr *sechdrs,
			      char *secstrings,
			      struct module *mod)
{
	return 0;
}

int apply_relocate_add(Elf64_Shdr *sechdrs,
		   const char *strtab,
		   unsigned int symindex,
		   unsigned int relsec,
		   struct module *me)
{
	unsigned int i;
	Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr;
	Elf64_Sym *sym;
	void *loc;
	u64 val;

	DEBUGP("Applying relocate section %u to %u\n", relsec,
	       sechdrs[relsec].sh_info);
	for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
		/* This is where to make the change */
		loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
			+ rel[i].r_offset;

		/* This is the symbol it is referring to.  Note that all
		   undefined symbols have been resolved.  */
		sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
			+ ELF64_R_SYM(rel[i].r_info);

	        DEBUGP("type %d st_value %Lx r_addend %Lx loc %Lx\n",
		       (int)ELF64_R_TYPE(rel[i].r_info),
		       sym->st_value, rel[i].r_addend, (u64)loc);

		val = sym->st_value + rel[i].r_addend;

		switch (ELF64_R_TYPE(rel[i].r_info)) {
		case R_X86_64_NONE:
			break;
		case R_X86_64_64:
			*(u64 *)loc = val;
			break;
		case R_X86_64_32:
			*(u32 *)loc = val;
			if (val != *(u32 *)loc)
				goto overflow;
			break;
		case R_X86_64_32S:
			*(s32 *)loc = val;
			if ((s64)val != *(s32 *)loc)
				goto overflow;
			break;
		case R_X86_64_PC32:
			val -= (u64)loc;
			*(u32 *)loc = val;
#if 0
			if ((s64)val != *(s32 *)loc)
				goto overflow;
#endif
			break;
		default:
			printk(KERN_ERR "module %s: Unknown rela relocation: %Lu\n",
			       me->name, ELF64_R_TYPE(rel[i].r_info));
			return -ENOEXEC;
		}
	}
	return 0;

overflow:
	printk(KERN_ERR "overflow in relocation type %d val %Lx\n",
	       (int)ELF64_R_TYPE(rel[i].r_info), val);
	printk(KERN_ERR "`%s' likely not compiled with -mcmodel=kernel\n",
	       me->name);
	return -ENOEXEC;
}

int apply_relocate(Elf_Shdr *sechdrs,
		   const char *strtab,
		   unsigned int symindex,
		   unsigned int relsec,
		   struct module *me)
{
	printk("non add relocation not supported\n");
	return -ENOSYS;
}

extern void apply_alternatives(void *start, void *end);

int module_finalize(const Elf_Ehdr *hdr,
		    const Elf_Shdr *sechdrs,
		    struct module *me)
{
	const Elf_Shdr *s;
	char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;

	/* look for .altinstructions to patch */
	for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
		void *seg;
		if (strcmp(".altinstructions", secstrings + s->sh_name))
			continue;
		seg = (void *)s->sh_addr;
		apply_alternatives(seg, seg + s->sh_size);
	}
	return 0;
}

void module_arch_cleanup(struct module *mod)
{
}


text:
package com.freerdp.freerdpcore.utils;

import android.annotation.TargetApi;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;

public abstract class ClipboardManagerProxy {

	public static ClipboardManagerProxy getClipboardManager(Context ctx) {
		if (VERSION.SDK_INT < VERSION_CODES.HONEYCOMB)
			return new PreHCClipboardManager(ctx);
		else
			return new HCClipboardManager(ctx);
	}

	public static interface OnClipboardChangedListener {
		void onClipboardChanged(String data);
	}

	public abstract void setClipboardData(String data);
	public abstract void addClipboardChangedListener(OnClipboardChangedListener listener);
	public abstract void removeClipboardboardChangedListener(OnClipboardChangedListener listener);

	private static class PreHCClipboardManager extends ClipboardManagerProxy {

		public PreHCClipboardManager(Context ctx) {

		}

		@Override
		public void setClipboardData(String data) {
		}

		@Override
		public void addClipboardChangedListener(
				OnClipboardChangedListener listener) {
		}

		@Override
		public void removeClipboardboardChangedListener(
				OnClipboardChangedListener listener) {
		}
	}

	@TargetApi(11)
	private static class HCClipboardManager extends ClipboardManagerProxy implements ClipboardManager.OnPrimaryClipChangedListener {
		private ClipboardManager mClipboardManager;
		private OnClipboardChangedListener mListener;

		public HCClipboardManager(Context ctx) {
			mClipboardManager = (ClipboardManager) ctx.getSystemService(Context.CLIPBOARD_SERVICE);
		}

		@Override
		public void setClipboardData(String data) {
			mClipboardManager.setPrimaryClip(ClipData.newPlainText("rdp-clipboard", data == null ? "" : data));
		}

		@Override
		public void onPrimaryClipChanged() {
			ClipData clip = mClipboardManager.getPrimaryClip();
			String data = null;

			if (clip != null && clip.getItemCount() > 0) {
				CharSequence cs = clip.getItemAt(0).getText();
				if (cs != null)
					data = cs.toString();
			}
			if (mListener != null) {
				mListener.onClipboardChanged(data);
			}
		}

		@Override
		public void addClipboardChangedListener(
				OnClipboardChangedListener listener) {
			mListener = listener;
			mClipboardManager.addPrimaryClipChangedListener(this);
		}

		@Override
		public void removeClipboardboardChangedListener(
				OnClipboardChangedListener listener) {
			mListener = null;
			mClipboardManager.removePrimaryClipChangedListener(this);
		}
	}
}


text:
package org.scalaide.debug.internal.editor

import scala.reflect.internal.util.OffsetPosition
import scala.reflect.internal.util.SourceFile
import scala.util.Try

import org.eclipse.debug.core.model.IVariable
import org.eclipse.jdt.internal.debug.ui.ExpressionInformationControlCreator
import org.eclipse.jface.text.IInformationControlCreator
import org.eclipse.jface.text.IRegion
import org.eclipse.jface.text.ITextHover
import org.eclipse.jface.text.ITextHoverExtension
import org.eclipse.jface.text.ITextHoverExtension2
import org.eclipse.jface.text.ITextViewer
import org.scalaide.core.compiler.IScalaPresentationCompiler
import org.scalaide.core.compiler.IScalaPresentationCompiler.Implicits.RichResponse
import org.scalaide.core.compiler.InteractiveCompilationUnit
import org.scalaide.core.internal.jdt.model.ScalaCompilationUnit
import org.scalaide.debug.internal.ScalaDebugger
import org.scalaide.debug.internal.model.ScalaStackFrame
import org.scalaide.debug.internal.model.ScalaThisVariable
import org.scalaide.ui.editor.extensionpoints.{ TextHoverFactory => TextHoverFactoryInterface }
import org.scalaide.ui.internal.editor.hover.ScalaHoverImpl

class TextHoverFactory extends TextHoverFactoryInterface {
  import IScalaPresentationCompiler.Implicits._

  def createFor(scu: ScalaCompilationUnit): ITextHover = new ScalaHoverImpl with ITextHoverExtension with ITextHoverExtension2 {
    var stringWasReturnedAtGetHoverInfo2 = false

    // fix the compilation unit
    override def getCompilationUnit(viewer: ITextViewer): Option[InteractiveCompilationUnit] =
      Option(scu)

    override def getHoverInfo2(viewer: ITextViewer, region: IRegion): AnyRef = {
      val hoverInfo = for {
        icu <- getCompilationUnit(viewer)
      } yield icu.withSourceFile { (src, compiler) =>
        import compiler._
        import org.scalaide.util.eclipse.RegionUtils.RichRegion

        val resp = askTypeAt(region.toRangePos(src))

        stringWasReturnedAtGetHoverInfo2 = false

        for {
          t <- resp.getOption()
          stackFrame <- Option(ScalaDebugger.currentStackFrame)
          variable <- StackFrameVariableOfTreeFinder.find(src, compiler, stackFrame)(t)
        } yield variable
      }.flatten getOrElse {
        stringWasReturnedAtGetHoverInfo2 = true
        super.getHoverInfo2(viewer, region)
      }
      hoverInfo.getOrElse(null)
    }

    override def getHoverControlCreator: IInformationControlCreator =
      if(stringWasReturnedAtGetHoverInfo2)
        super.getHoverControlCreator()
      else  /* An IVariable was returned. */
        new ExpressionInformationControlCreator
  }

}

object StackFrameVariableOfTreeFinder {
  def find(src: SourceFile, compiler: IScalaPresentationCompiler, stackFrame: ScalaStackFrame)(t: compiler.Tree): Option[IVariable] = {
    import compiler.{Try => _, _}

    // ---------------- HELPERS ---------------------------------
    /////////////////////////////////////////////////////////////

    def optSymbol(symbolProducer: => Symbol) =
      Option(symbolProducer) filterNot(_ == NoSymbol)

    def treeAt(pos: Position) = {
      askTypeAt(pos).getOption()
    }

    // StackFrame line numbering is 1-based, while SourceFile line numbering is 0-based. Hence the "- 1".
    lazy val sfLineNumber = Try{stackFrame.getLineNumber}.filter(_ > 0).map(_ - 1).toOption

    lazy val stackFramePos = sfLineNumber.map {ln =>
      new OffsetPosition(src, src.skipWhitespace(src.lineToOffset(ln)))
    }

    def isStackFrameWithin(range: Position) = stackFramePos map {range includes _} getOrElse false

    /** Here we use 'template' as an umbrella term to refer to any entity that exposes a 'this'
     *  variable in the stack frame. This 'this' variable will contain the fields of this template.
     *  Also if an instance X of a template is enclosed by an instance Y of a template, then Y is
     *  accessible from X, via the 'outer' field of X.
     *
     *  Currently this file considers classes, objects, traits & closures to be templates.
     *
     *  Since the stack frame only reveals its line number (and not its position within the line),
     *  sometimes it is difficult to pinpoint, with certainty, the template that encloses its
     *  position.
     *
     *  This function returns the certainly inner-most template that encloses the line of the stack
     *  frame. None is returned if we cannot be certain.
     */
    def innerMostTemplateCertainlyEnclosingSfPos: Option[Symbol] = sfLineNumber flatMap {sfLine =>
      val sfPos = src.position(src lineToOffset sfLine)
      val enclTemplTree = locateIn(parseTree(src), sfPos,
          t => t.isInstanceOf[ClassDef] || t.isInstanceOf[ModuleDef] || t.isInstanceOf[Function])

      if(enclTemplTree == EmptyTree)
        None
      else {
        val templStartLine = src.offsetToLine(enclTemplTree.pos.start)
        val templEndLine = src.offsetToLine(enclTemplTree.pos.end)
        if(sfLine == templStartLine || sfLine == templEndLine)
          None  // Because in these lines, statements within other templates may exist as well.
        else
          treeAt(enclTemplTree.pos) flatMap {t => optSymbol(t.symbol)}
      }
    }

    def enclosingTemplOf(s: Symbol) = optSymbol {s enclosingSuchThat {e =>
      e != s && (e.isClass || e.isTrait || e.isModuleOrModuleClass || e.isAnonymousFunction)}
    }

    def isFieldAccessibleAtStackFrame(field: Symbol) = optSymbol(field.owner) map {owner =>
      isStackFrameWithin(owner.pos)
    } getOrElse false

    def findVariableFromLocalVars(sym: Symbol, disableVarAccessibilityCheck: Boolean = false) = {
      val isLocalVarAccessibleAtStackFrame = (for {
        encloser <- optSymbol(sym.enclosingSuchThat{x => x.isMethod || x.isAnonymousFunction})
      } yield isStackFrameWithin(encloser.pos)) getOrElse false

      if(isLocalVarAccessibleAtStackFrame || disableVarAccessibilityCheck)
        for {
          localVars <- Try{stackFrame.getVariables}.toOption
          foundVar <- localVars.find{_.getName == sym.name.decoded} orElse
            localVars.find{_.getName.split('$')(0) == sym.name.decoded}  // for variables of enclosing methods
        } yield foundVar
      else None
    }

    def findVariableFromFieldsOf(variable: IVariable, sym: Symbol, varMatcher: IVariable => Boolean = null) = {
      def stackFrameCompatibleNameOf(sym: Symbol): Name = {  // Based on trial & error. May need more work.
        var name = sym.name.toTermName
        if(sym.isLocalToThis) {
          name = name.dropLocal
        }
        name.decodedName
      }

      def cleanBinaryName(name: String) = nme unexpandedName newTermName(name)

      val variableMatcher = if(varMatcher != null)
        varMatcher
      else
        (v: IVariable) => cleanBinaryName(v.getName) == stackFrameCompatibleNameOf(sym)

      for {
        value <- Try{variable.getValue}.toOption
        foundFieldVariable <- value.getVariables.find(variableMatcher)
      } yield foundFieldVariable
    }

    def thisOfStackFrame = Try{stackFrame.getVariables}.toOption flatMap {sfVars =>
      sfVars.find(_.isInstanceOf[ScalaThisVariable]) /* doesn't match in traits */ orElse
        sfVars.find(_.getName == "$this")  // a hack used to access the this when in traits
    }

    def findVariableFromFieldsOfThis(sym: Symbol, varMatcher: IVariable => Boolean = null) =
       thisOfStackFrame flatMap {ths => findVariableFromFieldsOf(ths, sym, varMatcher)}

    // ---------------- END OF HELPERS --------------------------
    /////////////////////////////////////////////////////////////

    Option(t.symbol) flatMap {sym =>
      val isAVariableOrField = sym.isVal || sym.isVar || sym.isAccessor
      if(! isAVariableOrField) None
      else t match {
        case Select(ths: This, _) =>
          def tryGetOuter(inner: IVariable) = for {
            innerVal <- Try{inner.getValue}.toOption
            outer <- innerVal.getVariables.find(_.getName == "$outer")
          } yield outer

          (for {
            sfEnclTempl <- innerMostTemplateCertainlyEnclosingSfPos
            requestedThisTempl <- Option(ths.symbol)
            thisOfSf <- thisOfStackFrame
          } yield {

            // Symbol equality, except if a param is a module & the other its module class, still returns true.
            def templSymbolsMatch(s1: Symbol, s2: Symbol) =
              s1 == s2 ||
              (s1.isModule && (s1.moduleClass == s2)) ||
              (s2.isModule && (s1 == s2.moduleClass)) ||
              //
              // Only in the test case, sometimes two different Symbol objects are created for the same thing,
              // causing s1 == s2 to be false. The below clause is thus added to make the tests pass.
              s1.fullLocationString == s2.fullLocationString

            if(templSymbolsMatch(requestedThisTempl, sfEnclTempl))
              findVariableFromFieldsOfThis(sym) orElse {
                // Non-field class parameters are sometimes only accessible as local vars.
                findVariableFromLocalVars(sym, disableVarAccessibilityCheck = true)}
            else {
              var currOuter = tryGetOuter(thisOfSf)
              var currEncl = enclosingTemplOf(sfEnclTempl)
              while(currOuter.isDefined && currEncl.isDefined && (! templSymbolsMatch(currEncl.get, requestedThisTempl))) {
                currOuter = tryGetOuter(currOuter.get)
                currEncl = enclosingTemplOf(currEncl.get)
              }
              if(currOuter.isDefined && currEncl.isDefined)
                findVariableFromFieldsOf(currOuter.get, sym)
              else None
            }
          }).flatten
        case Select(_, _) => None
        case _ =>
          if(sym.isLocalToBlock) {
            findVariableFromLocalVars(sym) orElse
            //
            // In closures, local vars of enclosing methods are stored as fields with mangled names.
            findVariableFromFieldsOfThis(sym, varMatcher = {_.getName.startsWith(sym.decodedName + "$")})
          } else {
            if(isFieldAccessibleAtStackFrame(sym))
              findVariableFromFieldsOfThis(sym) orElse {
                // Non-field class parameters are sometimes only accessible as local vars.
                findVariableFromLocalVars(sym, disableVarAccessibilityCheck = true)}
            else None
          }
      }
    }
  }
}


text:
    <meta name="theme-color" content="#fff">
    <title>CrazzyMCPE</title>
   <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
   	<link rel="image_src" href="https://crazzymcpe.github.io/img/thumbnail.png"/>
	<link rel="StyleSheet" href="../css/styles.css" type="text/css">
        <link rel="shortcut icon" href="../img/favicon.ico">

     <button id="ColorPalete" style="font-size: 125%" onclick="changeColor();">🎨</button>


text:
common.controller('ToolbarController', ['$rootScope', '$scope', '$state', 'States',
    function ($rootScope, $scope, $state, States) {
    	console.log("header controller");
    	var self = this;
		self.hideAccountPopOver = true;

		self.init = function() {
			self.changeIconsOnStateChange();
		};

		self.changeIconsOnStateChange = function() {
			console.log($state.current.name);
			var state = $state.current.name;
			if (state === States.LOGIN) {
				self.hideAccountPopOver = true;
			} else {
				self.hideAccountPopOver = false;
			}
		};

		$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
			self.changeIconsOnStateChange();
		});

		self.init();
    }]);


text:
package es.bsc.compss.executor.external.piped.commands;

import es.bsc.compss.executor.external.commands.RemovedExecutorExternalCommand;
import es.bsc.compss.executor.external.piped.PipePair;

public class RemovedExecutorPipeCommand extends RemovedExecutorExternalCommand implements PipeCommand {

    private final String inPipe;
    private final String outPipe;

    public RemovedExecutorPipeCommand(String[] command) {
        this.inPipe = command[1];
        this.outPipe = command[2];
    }

    public RemovedExecutorPipeCommand(PipePair pp) {
        this.inPipe = pp.getInboundPipe();
        this.outPipe = pp.getOutboundPipe();
    }

    @Override
    public String getAsString() {
        return super.getAsString() + " " + inPipe + " " + this.outPipe;
    }

    @Override
    public int compareTo(PipeCommand t) {
        int value = Integer.compare(this.getType().ordinal(), t.getType().ordinal());
        if (value == 0) {
            RemovedExecutorPipeCommand rt = (RemovedExecutorPipeCommand) t;
            value = this.inPipe.compareTo(rt.inPipe);
        }
        if (value == 0) {
            RemovedExecutorPipeCommand rt = (RemovedExecutorPipeCommand) t;
            value = this.outPipe.compareTo(rt.outPipe);
        }
        return value;
    }

    @Override
    public void join(PipeCommand receivedCommand) {
    }

}


text:
<?php
namespace app\modules\api\versions\v1\controllers;

class CrackController extends \app\modules\api\common\controllers\CrackController
{
}


text:
BlazeComponent.extendComponent({
  template: function() {
    return 'archivesSidebar';
  },

  tabs: function() {
    return [
      { name: 'Cards', slug: 'cards' },
      { name: 'Lists', slug: 'lists' }
    ]
  },

  archivedCards: function() {
    return Cards.find({ archived: true });
  },

  archivedLists: function() {
    return Lists.find({ archived: true });
  },

  cardIsInArchivedList: function() {
    return this.currentData().list().archived;
  },

  onRendered: function() {
    //XXX We should support dragging a card from the sidebar to the board
  },

  events: function() {
    return [{
      'click .js-restore-card': function() {
        var cardId = this.currentData()._id;
        Cards.update(cardId, {$set: {archived: false}});
      },
      'click .js-delete-card': Popup.afterConfirm('cardDelete', function() {
        var cardId = this._id;
        Cards.remove(cardId);
        Popup.close();
      }),
      'click .js-restore-list': function() {
        var listId = this.currentData()._id;
        Lists.update(listId, {$set: {archived: false}});
      }
    }];
  }
}).register('archivesSidebar');


text:
/**
 * @fileOverview Defines an image nodes for webglGraphics class.
 * Shape of nodes is square.
 *
 * @author Andrei Kashcha (aka anvaka) / http://anvaka.blogspot.com
 */

var WebglAtlas = require('./webglAtlas.js');
var glUtils = require('./webgl.js');

module.exports = webglImageNodeProgram;

/**
 * Defines simple UI for nodes in webgl renderer. Each node is rendered as an image.
 */
function webglImageNodeProgram() {
    var ATTRIBUTES_PER_PRIMITIVE = 18,
    // TODO: Use glslify for shaders
        nodesFS = [
            "precision mediump float;",
            "varying vec4 color;",
            "varying vec3 vTextureCoord;",
            "uniform sampler2D u_sampler0;",
            "uniform sampler2D u_sampler1;",
            "uniform sampler2D u_sampler2;",
            "uniform sampler2D u_sampler3;",

            "void main(void) {",
            "   if (vTextureCoord.z == 0.) {",
            "     gl_FragColor = texture2D(u_sampler0, vTextureCoord.xy);",
            "   } else if (vTextureCoord.z == 1.) {",
            "     gl_FragColor = texture2D(u_sampler1, vTextureCoord.xy);",
            "   } else if (vTextureCoord.z == 2.) {",
            "     gl_FragColor = texture2D(u_sampler2, vTextureCoord.xy);",
            "   } else if (vTextureCoord.z == 3.) {",
            "     gl_FragColor = texture2D(u_sampler3, vTextureCoord.xy);",
            "   } else { gl_FragColor = vec4(0, 1, 0, 1); }",
            "}"
        ].join("\n"),

        nodesVS = [
            "attribute vec2 a_vertexPos;",

            "attribute float a_customAttributes;",
            "uniform vec2 u_screenSize;",
            "uniform mat4 u_transform;",
            "uniform float u_tilesPerTexture;",
            "varying vec3 vTextureCoord;",

            "void main(void) {",
            "   gl_Position = u_transform * vec4(a_vertexPos/u_screenSize, 0, 1);",
            "float corner = mod(a_customAttributes, 4.);",
            "float tileIndex = mod(floor(a_customAttributes / 4.), u_tilesPerTexture);",
            "float tilesPerRow = sqrt(u_tilesPerTexture);",
            "float tileSize = 1./tilesPerRow;",
            "float tileColumn = mod(tileIndex, tilesPerRow);",
            "float tileRow = floor(tileIndex/tilesPerRow);",

            "if(corner == 0.0) {",
            "  vTextureCoord.xy = vec2(0, 1);",
            "} else if(corner == 1.0) {",
            "  vTextureCoord.xy = vec2(1, 1);",
            "} else if(corner == 2.0) {",
            "  vTextureCoord.xy = vec2(0, 0);",
            "} else {",
            "  vTextureCoord.xy = vec2(1, 0);",
            "}",

            "vTextureCoord *= tileSize;",
            "vTextureCoord.x += tileColumn * tileSize;",
            "vTextureCoord.y += tileRow * tileSize;",
            "vTextureCoord.z = floor(floor(a_customAttributes / 4.)/u_tilesPerTexture);",
            "}"
        ].join("\n"),

        tilesPerTexture = 1024, // TODO: Get based on max texture size
        atlas;

    var program,
        gl,
        buffer,
        utils,
        locations,
        nodesCount = 0,
        nodes = new Float32Array(64),
        width,
        height,
        transform,
        sizeDirty,

        refreshTexture = function (texture, idx) {
            if (texture.nativeObject) {
                gl.deleteTexture(texture.nativeObject);
            }

            var nativeObject = gl.createTexture();
            gl.activeTexture(gl["TEXTURE" + idx]);
            gl.bindTexture(gl.TEXTURE_2D, nativeObject);
            gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, texture.canvas);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);

            gl.generateMipmap(gl.TEXTURE_2D);
            gl.uniform1i(locations["sampler" + idx], idx);

            texture.nativeObject = nativeObject;
        },

        ensureAtlasTextureUpdated = function () {
            if (atlas.isDirty) {
                var textures = atlas.getTextures(),
                    i;
                for (i = 0; i < textures.length; ++i) {
                    if (textures[i].isDirty || !textures[i].nativeObject) {
                        refreshTexture(textures[i], i);
                    }
                }

                atlas.clearDirty();
            }
        };

    return {
        load : function (glContext) {
            gl = glContext;
            utils = glUtils(glContext);

            atlas = new WebglAtlas(tilesPerTexture);

            program = utils.createProgram(nodesVS, nodesFS);
            gl.useProgram(program);
            locations = utils.getLocations(program, ["a_vertexPos", "a_customAttributes", "u_screenSize", "u_transform", "u_sampler0", "u_sampler1", "u_sampler2", "u_sampler3", "u_tilesPerTexture"]);

            gl.uniform1f(locations.tilesPerTexture, tilesPerTexture);

            gl.enableVertexAttribArray(locations.vertexPos);
            gl.enableVertexAttribArray(locations.customAttributes);

            buffer = gl.createBuffer();
        },

        /**
         * Updates position of current node in the buffer of nodes.
         *
         * @param idx - index of current node.
         * @param pos - new position of the node.
         */
        position : function (nodeUI, pos) {
            var idx = nodeUI.id * ATTRIBUTES_PER_PRIMITIVE;
            nodes[idx] = pos.x - nodeUI.size;
            nodes[idx + 1] = pos.y - nodeUI.size;
            nodes[idx + 2] = nodeUI._offset * 4;

            nodes[idx + 3] = pos.x + nodeUI.size;
            nodes[idx + 4] = pos.y - nodeUI.size;
            nodes[idx + 5] = nodeUI._offset * 4 + 1;

            nodes[idx + 6] = pos.x - nodeUI.size;
            nodes[idx + 7] = pos.y + nodeUI.size;
            nodes[idx + 8] = nodeUI._offset * 4 + 2;

            nodes[idx + 9] = pos.x - nodeUI.size;
            nodes[idx + 10] = pos.y + nodeUI.size;
            nodes[idx + 11] = nodeUI._offset * 4 + 2;

            nodes[idx + 12] = pos.x + nodeUI.size;
            nodes[idx + 13] = pos.y - nodeUI.size;
            nodes[idx + 14] = nodeUI._offset * 4 + 1;

            nodes[idx + 15] = pos.x + nodeUI.size;
            nodes[idx + 16] = pos.y + nodeUI.size;
            nodes[idx + 17] = nodeUI._offset * 4 + 3;
        },

        createNode : function (ui) {
            nodes = utils.extendArray(nodes, nodesCount, ATTRIBUTES_PER_PRIMITIVE);
            nodesCount += 1;

            var coordinates = atlas.getCoordinates(ui.src);
            if (coordinates) {
                ui._offset = coordinates.offset;
            } else {
                ui._offset = 0;
                // Image is not yet loaded into the atlas. Reload it:
                atlas.load(ui.src, function (coordinates) {
                    ui._offset = coordinates.offset;
                });
            }
        },

        removeNode : function (nodeUI) {
            if (nodesCount > 0) { nodesCount -= 1; }

            if (nodeUI.id < nodesCount && nodesCount > 0) {
                if (nodeUI.src) {
                    atlas.remove(nodeUI.src);
                }

                utils.copyArrayPart(nodes, nodeUI.id * ATTRIBUTES_PER_PRIMITIVE, nodesCount * ATTRIBUTES_PER_PRIMITIVE, ATTRIBUTES_PER_PRIMITIVE);
            }
        },

        replaceProperties : function (replacedNode, newNode) {
            newNode._offset = replacedNode._offset;
        },

        updateTransform : function (newTransform) {
            sizeDirty = true;
            transform = newTransform;
        },

        updateSize : function (w, h) {
            width = w;
            height = h;
            sizeDirty = true;
        },

        render : function () {
            gl.useProgram(program);
            gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
            gl.bufferData(gl.ARRAY_BUFFER, nodes, gl.DYNAMIC_DRAW);

            if (sizeDirty) {
                sizeDirty = false;
                gl.uniformMatrix4fv(locations.transform, false, transform);
                gl.uniform2f(locations.screenSize, width, height);
            }

            gl.vertexAttribPointer(locations.vertexPos, 2, gl.FLOAT, false, 3 * Float32Array.BYTES_PER_ELEMENT, 0);
            gl.vertexAttribPointer(locations.customAttributes, 1, gl.FLOAT, false, 3 * Float32Array.BYTES_PER_ELEMENT, 2 * 4);

            ensureAtlasTextureUpdated();

            gl.drawArrays(gl.TRIANGLES, 0, nodesCount * 6);
        }
    };
}


text:
import { OvaleQueue } from "./Queue";
import { SpellCast } from "./LastSpell";

let self_stateAddons = new OvaleQueue<StateModule>("OvaleState_stateAddons");

export interface StateModule {
    CleanState():void;
    InitializeState():void;
    ResetState():void;
    ApplySpellStartCast?(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast):void;
    ApplySpellAfterCast?(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast):void;
    ApplySpellOnHit?(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast):void;
}

export class States<T> {
    current: T;
    next: T;

    constructor(c: {new(): T}) {
        this.current = new c();
        this.next = new c();
    }

    GetState(atTime: number | undefined) {
        if (!atTime) return this.current;
        return this.next;
    }
}

export class OvaleStateClass {

    RegisterState(stateAddon: StateModule) {
        self_stateAddons.Insert(stateAddon);
    }
    UnregisterState(stateAddon: StateModule) {
        let stateModules = new OvaleQueue<StateModule>("OvaleState_stateModules");
        while (self_stateAddons.Size() > 0) {
            let addon = self_stateAddons.Remove();
            if (stateAddon != addon) {
                stateModules.Insert(addon);
            }
        }
        self_stateAddons = stateModules;
        stateAddon.CleanState();
    }

    /** Called each time the script is executed */
    InitializeState() {
        const iterator = self_stateAddons.Iterator();
        while (iterator.Next()) {
            iterator.value.InitializeState();
        }
    }

    /** Called at the start of each AddIcon command */
    ResetState() {
        const iterator = self_stateAddons.Iterator();
        while (iterator.Next()) {
            iterator.value.ResetState();
        }
    }

    ApplySpellStartCast(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast) {
        const iterator = self_stateAddons.Iterator();
        while (iterator.Next()) {
            if (iterator.value.ApplySpellStartCast) {
                iterator.value.ApplySpellStartCast(spellId, targetGUID, startCast, endCast, channel, spellcast);
            }
        }
    }

    ApplySpellAfterCast(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast) {
        const iterator = self_stateAddons.Iterator();
        while (iterator.Next()) {
            if (iterator.value.ApplySpellAfterCast){
                iterator.value.ApplySpellAfterCast(spellId, targetGUID, startCast, endCast, channel, spellcast);
            }
        }
    }

    ApplySpellOnHit(spellId: number, targetGUID: string, startCast: number, endCast: number, channel: boolean, spellcast: SpellCast) {
        const iterator = self_stateAddons.Iterator();
        while (iterator.Next()) {
            if (iterator.value.ApplySpellOnHit) {
                iterator.value.ApplySpellOnHit(spellId, targetGUID, startCast, endCast, channel, spellcast);
            }
        }
    }
}


text:
package io.spine.testing;

import com.google.common.truth.Correspondence;
import org.checkerframework.checker.nullness.qual.NonNull;

/**
 * A factory of {@link Correspondence}s for constructing fluent assertions for collection elements.
 */
public final class Correspondences {

    /**
     * Prevents the utility class instantiation.
     */
    private Correspondences() {
    }

    /**
     * Obtains a {@link Correspondence} of an object to its type.
     *
     *
Elements of a collection can be matched to their class using this correspondence.
     *
     *
Example:
     * {@code
     * assertThat(objects)
     *     .comparingElementsUsing(type())
     *     .containsExactly(String.class, String.class);
     * }
     *
     * @param <T>
     *         type of the input object
     * @return correspondence by type
     */
    @SuppressWarnings("NullableProblems") // False positive.
    public static <T> Correspondence<T, @NonNull Class<?>> type() {
        return Correspondence.from(
                (o, cls) -> cls.isInstance(o), "is an instance of"
        );
    }
}


text:
/*IE8 Specific Styles*/
.lens-proto a.deck-navigation {
	background:transparent;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#50000000,endColorstr=#50000000);
	zoom: 1;
}
.lens-proto a.deck-navigation:hover {
	background:transparent;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#80000000,endColorstr=#80000000);
	zoom: 1;
}
.lens-proto a.deck-navigation:active {
	background:transparent;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#90000000);
	zoom: 1;
}
/*Dark Styles*/
.lens-proto.sd2-dark dl.slidedeck > dd.has-image div.slide-content {
	background:transparent;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#75000000,endColorstr=#75000000);
	zoom: 1;
}
/*Light Styles*/
.lens-proto.sd2-light dl.slidedeck > dd.has-image div.slide-content {
	background:transparent;
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99FFFFFF,endColorstr=#99FFFFFF);
	zoom: 1;
}


text:
#import "VVBaseCommenterExtension.h"

@interface VVLicenseCommenter : VVBaseCommenter

@end


text:
class Girl < ActiveRecord::Base
  validates :name, :uniqueness => true, :presence => true
  validates :product_code, :uniqueness => true, :presence => true

  def avatar_file_path
    "/u/apps/files/listing/avatars/#{product_code}.jpg"
  end
end


text:
'use strict';

angular.module('midasApp').config(function ($stateProvider) {
	$stateProvider.state('backend.role', {
		url: '/admin/role',
		templateUrl: 'backend/admin/role/role.html',
		controller: 'RoleCtrl'
	});
});