text:
#ifndef __ARCH_MACHINE_REGISTERSET_H
#define __ARCH_MACHINE_REGISTERSET_H

#include <config.h>
#include <arch/types.h>
#include <util.h>
#include <assert.h>

#include <mode/machine/registerset.h>

/* Minimum hardware-enforced alignment needed for FPU state. */
#define MIN_FPU_ALIGNMENT 64

#ifdef CONFIG_HARDWARE_DEBUG_API
/* X86 Debug register context */
struct user_debug_state {
    /* DR0-3 = Breakpoint linear address.
     * DR4-5 = reserved or aliased, depending on value of CR4.DE.
     * DR6 = Debug status register.
     * DR7 = Debug control register.
     */
    word_t dr[6];
    /* For each breakpoint currently being used by a thread, a bit in this
     * bitfield is set, and for each breakpoint that is cleared, a bit is
     * cleared. This enables an optimization: when a thread is being context-
     * switched to, we can check to see if it's using breakpoints, and
     * if so, we pop the whole register context.
     *
     * If it's not using breakpoints, we just pop all 0s into the ENABLED
     * bits in DR7.
     */
    uint32_t used_breakpoints_bf;

    /* The API supports stepping N instructions forward, where N can 1..N.
     * That feature is provided using this counter. Everytime a debug exception
     * occurs, the kernel will decrement, then check the counter, and only when
     * the counter is 0 will we deliver the fault to the userspace thread.
     */
    word_t n_instructions;

    /* This is part of the state machine that allows a thread to make
     * syscalls while being single-stepped. Basically helps the kernel to
     * disable single-stepping while executing the syscall, and then re-enable
     * it just before returning from the syscall into userspace.
     */
    bool_t single_step_enabled;
};
typedef struct user_debug_state user_breakpoint_state_t;
#endif /* CONFIG_HARDWARE_DEBUG_API */

/* X86 FPU context. */
struct user_fpu_state {
    uint8_t state[CONFIG_XSAVE_SIZE];
};
typedef struct user_fpu_state user_fpu_state_t;

/* X86 user-code context */
struct user_context {
    user_fpu_state_t fpuState;
    word_t registers[n_contextRegisters];
#if CONFIG_MAX_NUM_NODES > 1 && defined(CONFIG_ARCH_IA32)
    /* stored pointer to kernel stack used when kernel run in current TCB context. */
    word_t kernelSP;
#endif
#ifdef CONFIG_HARDWARE_DEBUG_API
    user_breakpoint_state_t breakpointState;
#endif
};
typedef struct user_context user_context_t;

void Mode_initContext(user_context_t* context);
void Arch_initContext(user_context_t* context);
word_t Mode_sanitiseRegister(register_t reg, word_t v);
word_t sanitiseRegister(register_t reg, word_t v);

/* Ensure FPU state is aligned within user context. */
compile_assert(fpu_state_alignment_valid,
               OFFSETOF(user_context_t, fpuState) % MIN_FPU_ALIGNMENT == 0)

#if CONFIG_MAX_NUM_NODES > 1 && defined(CONFIG_ARCH_IA32)
/* Ensure kernelSP is the first member following the registers. */
compile_assert(kernelSP_alignment_valid,
               OFFSETOF(user_context_t, kernelSP) -
               OFFSETOF(user_context_t, registers) == 0x4C)
#endif

#endif


text:
package org.scalatest.exceptions

private[scalatest] object StackDepthExceptionHelper {

  def getStackDepth(stackTraces: Array[StackTraceElement], fileName: String, methodName: String, adjustment: Int = 0): Int = {
    stackTraces.takeWhile(_.getFileName.startsWith("https://")).length
  }

  def getStackDepthFun(fileName: String, methodName: String, adjustment: Int = 0): (StackDepthException => Int) = { sde =>
    getStackDepth(sde.getStackTrace, fileName, methodName, adjustment)
  }

  def getFailedCodeFileName(stackTraceElement: StackTraceElement): Option[String] = {
    val fileName = stackTraceElement.getFileName
    if (fileName != null) {
      val lastPathSeparatorIdx = fileName.lastIndexOf("/")
      if (lastPathSeparatorIdx >= 0)
        Some(fileName.substring(lastPathSeparatorIdx + 1))
      else
        Some(fileName)
    }
    else None
  }

  val macroCodeStackDepth: Int = 9
}

redpajama_set_name: RedPajamaGithub


text:
package com.thoughtworks.go.server.dao;

import com.thoughtworks.go.config.PipelineConfig;
import com.thoughtworks.go.config.elastic.ClusterProfile;
import com.thoughtworks.go.config.elastic.ElasticProfile;
import com.thoughtworks.go.domain.DefaultSchedulingContext;
import com.thoughtworks.go.domain.JobAgentMetadata;
import com.thoughtworks.go.domain.Pipeline;
import com.thoughtworks.go.domain.Stage;
import com.thoughtworks.go.domain.config.ConfigurationProperty;
import com.thoughtworks.go.helper.BuildPlanMother;
import com.thoughtworks.go.helper.PipelineMother;
import com.thoughtworks.go.server.service.InstanceFactory;
import com.thoughtworks.go.util.TimeProvider;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import static com.thoughtworks.go.helper.ModificationsMother.modifySomeFiles;
import static com.thoughtworks.go.util.GoConstants.DEFAULT_APPROVED_BY;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;

@ExtendWith(SpringExtension.class)
@ContextConfiguration(locations = {
        "classpath:/applicationContext-global.xml",
        "classpath:/applicationContext-dataLocalAccess.xml",
        "classpath:/testPropertyConfigurer.xml",
        "classpath:/spring-all-servlet.xml",
})
public class JobAgentMetadataSqlMapDaoIntegrationTest {
    private static final String JOB_NAME = "functional";
    private static final String OTHER_JOB_NAME = "unit";
    private static final String STAGE_NAME = "mingle";
    private static final String PIPELINE_NAME = "pipeline";
    private long jobId;

    @Autowired
    private InstanceFactory instanceFactory;
    @Autowired
    private JobAgentMetadataSqlMapDao dao;
    @Autowired
    private DatabaseAccessHelper dbHelper;

    @BeforeEach
    public void setup() throws Exception {
        dbHelper.onSetUp();

        PipelineConfig pipelineConfig = PipelineMother.withSingleStageWithMaterials(PIPELINE_NAME, STAGE_NAME, BuildPlanMother.withBuildPlans(JOB_NAME, OTHER_JOB_NAME));
        DefaultSchedulingContext schedulingContext = new DefaultSchedulingContext(DEFAULT_APPROVED_BY);
        Pipeline savedPipeline = instanceFactory.createPipelineInstance(pipelineConfig, modifySomeFiles(pipelineConfig), schedulingContext, "md5-test", new TimeProvider());
        dbHelper.savePipelineWithStagesAndMaterials(savedPipeline);
        Stage savedStage = savedPipeline.getFirstStage();
        jobId = savedStage.getJobInstances().getByName(JOB_NAME).getId();
    }

    @AfterEach
    public void tearDown() throws Exception {
        dbHelper.onTearDown();
    }

    @Test
    public void shouldSaveElasticAgentPropertyOnJob() throws Exception {
        ElasticProfile profile = new ElasticProfile("elastic", "clusterProfileId");
        ClusterProfile clusterProfile = new ClusterProfile("clusterProfileId", "plugin");
        JobAgentMetadata jobAgentMetadata = new JobAgentMetadata(jobId, profile, clusterProfile);
        dao.save(jobAgentMetadata);

        JobAgentMetadata metadataFromDb = dao.load(jobId);
        assertThat(metadataFromDb.elasticProfile(), is(profile));
        assertThat(metadataFromDb.clusterProfile(), is(clusterProfile));
        assertThat(metadataFromDb, is(jobAgentMetadata));
    }

    @Test
    public void shouldDeleteElasticAgentPropertySetToJob() throws Exception {
        ElasticProfile profile = new ElasticProfile("elastic", "clusterProfileId", new ConfigurationProperty());
        ClusterProfile clusterProfile = new ClusterProfile("clusterProfileId", "plugin", new ConfigurationProperty());
        JobAgentMetadata jobAgentMetadata = new JobAgentMetadata(jobId, profile, clusterProfile);
        dao.save(jobAgentMetadata);

        JobAgentMetadata metadataFromDb = dao.load(jobId);
        assertThat(metadataFromDb, is(jobAgentMetadata));

        dao.delete(metadataFromDb);
        assertThat(dao.load(jobId), is(nullValue()));
    }
}


text: export { default as GlobalSettings } from './GlobalSettings'


text:
from __future__ import absolute_import

import pytest
import requests
import xml.etree.ElementTree as ET

from foist import (create_container, parse_text_encoding_errors, Thesis,
                   transaction, upload_file, update_metadata)

from foist.namespaces import BIBO, DCTYPE, PCDM

def test_thesis(xml, text_errors):
    '''Thesis object should initialize with a name, mets, errors, and full
    text status.
    '''
    mets = ET.parse(xml).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, 'Department One',
               errors)

    assert t.name == 'thesis'
    assert t.mets == mets
    assert t.errors == errors
    assert t.departments == 'Department One'
    assert t.no_full_text is True

def test_thesis_with_all_metadata_fields_parses_correctly(xml, text_errors):
    '''Thesis object should create properties for all metadata fields.
    '''
    mets = ET.parse(xml).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, ['Department One', 'Department Two'],
               errors)

    assert t.abstract == 'Sample abstract.'
    assert t.advisor == ['Advisor One.', 'Advisor Two.']
    assert t.alt_title == ['Alternative Title.']
    assert t.author == ['Author One.', 'Author Two.']
    assert t.copyright_date == '2006'
    assert t.dc_type == DCTYPE.Text
    assert t.degree == ['S.M.', 'M.B.A.']
    assert t.degree_statement == ('Thesis (S.M. and M.B.A.)--Massachusetts '
                                  'Institute of Technology, Computation for '
                                  'Design and Optimization Program, 2006.')
    assert t.department == ['Department One', 'Department Two']
    assert t.encoded_text is True
    assert t.handle == 'http://hdl.handle.net/1721.1/39208'
    assert t.handle_part == '39208'
    assert t.issue_date == '2006'
    assert t.ligatures is None
    assert t.no_full_text is True
    assert t.notes == [('Thesis (S.M. and M.B.A.)--Massachusetts Institute of '
                        'Technology, Computation for Design and Optimization '
                        'Program, 2006.'),
                       'Includes bibliographical references (p. 1-2).',
                       'by Lei Zhang.']
    assert t.publisher == 'Massachusetts Institute of Technology'
    assert t.rdf_type == [BIBO.Thesis, PCDM.Object]
    assert t.rights_statement == ('MIT theses are protected by copyright. They'
                                  ' may be viewed, downloaded, or printed from'
                                  ' this source but further reproduction or '
                                  'distribution in any format is prohibited '
                                  'without written permission.')
    assert t.title == 'Sample Title.'

def test_set_thesis_full_text_property(xml, text_errors):
    mets = ET.parse(xml).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, ['Department One', 'Department Two'],
               errors)
    t.no_full_text = None

    assert t.no_full_text is None

def test_thesis_get_metadata_returns_turtle(xml, text_errors):
    mets = ET.parse(xml).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, ['Department One'],
               errors)
    m = t.get_metadata()

    # Check all prefix bindings
    assert b'@prefix bibo: <http://purl.org/ontology/bibo/> .' in m
    assert b'@prefix dcterms: <http://purl.org/dc/terms/> .' in m
    assert b'@prefix dctype: <http://purl.org/dc/dcmitype/> .' in m
    assert b'@prefix local: <http://example.com/> .' in m
    assert b'@prefix mods: <http://www.loc.gov/standards/mods/modsrdf/v1/#> .'\
        in m
    assert b'@prefix msl: <http://purl.org/montana-state/library/> .' in m
    assert b'@prefix pcdm: <http://pcdm.org/models#> .' in m
    assert b'@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .' in m
    assert b'@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .' in m
    assert b'@prefix xml: <http://www.w3.org/XML/1998/namespace> .' in m
    assert b'@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .' in m

    # Check a few metadata statements
    assert b'<>' in m
    assert b'a pcdm:Object' in m
    assert b'bibo:Thesis' in m
    assert b'dcterms:type dctype:Text' in m
    assert b'dcterms:title "Alternative Title."' in m
    assert b'local:encoded_text true' in m
    assert b'local:ligature_errors "None"' in m
    assert b'bibo:handle <http://hdl.handle.net/1721.1/39208>' in m
    assert b'msl:degreeGrantedForCompletion "M.B.A."' in m
    assert b'"S.M."' in m
    assert (b'local:degree_statement "Thesis (S.M. and M.B.A.)--Massachusetts '
            b'Institute of Technology, Computation for Design and Optimization'
            b' Program, 2006."' in m)
    assert (b'msl:associatedDepartment "Department One"' in m)
    assert b'local:handle_part "39208"' in m

def test_thesis_handles_missing_metadata_fields(xml_missing_fields,
                                                text_errors):
    mets = ET.parse(xml_missing_fields).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis-02')
    t = Thesis('thesis-02', mets, ['Test department'], errors)

    assert t.abstract is None
    assert t.advisor is None
    assert t.copyright_date is None
    assert t.degree is None
    assert t.degree_statement is None
    assert t.department == ['Test department']
    assert t.encoded_text is None
    assert t.handle is None
    assert t.handle_part is None
    assert t.issue_date is None
    assert t.ligatures is None
    assert t.no_full_text is None
    assert t.notes is None
    assert t.title is None

def test_thesis_create_file_sparql_update_is_correct(xml, text_errors):
    mets = ET.parse(xml).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, errors)

    s = t.create_file_sparql_update('.pdf')
    assert s == ('PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX pcdm: '
                 '<http://pcdm.org/models#> PREFIX ebucore: '
                 '<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> '
                 'INSERT { <> a pcdm:File ; dcterms:language "eng" ; '
                 'dcterms:extent "109 p." . } WHERE { }')

    s = t.create_file_sparql_update('.txt')
    assert s == ('PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX pcdm: '
                 '<http://pcdm.org/models#> PREFIX ebucore: '
                 '<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> '
                 'INSERT { <> a pcdm:File ; dcterms:language "eng" ; '
                 'ebucore:hasEncodingFormat "utf-8" . } WHERE { }')

def test_thesis_create_file_sparql_update_missing_fields(xml_missing_fields,
                                                         text_errors):
    mets = ET.parse(xml_missing_fields).getroot()
    errors = parse_text_encoding_errors(text_errors).get('thesis')
    t = Thesis('thesis', mets, errors)

    s = t.create_file_sparql_update('.pdf')
    assert s == ('PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX pcdm: '
                 '<http://pcdm.org/models#> PREFIX ebucore: '
                 '<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> '
                 'INSERT { <> a pcdm:File . } WHERE { }')

def test_parse_text_encoding_errors_creates_dict(text_errors):
    d = parse_text_encoding_errors(text_errors)
    assert type(d) == dict
    assert d['thesis']['Encoded text old file'] == '1'

def test_transaction_commits(fedora):
    with transaction('mock://example.com/rest/') as t:
        assert t == 'mock://example.com/rest/tx:123456789'

def test_transaction_with_error_raises_exception(fedora):
    with pytest.raises(RuntimeError):
        with transaction('mock://example.com/rest/'):
            raise

def test_transaction_commit_fail_raises_exception(fedora_errors):
    with pytest.raises(requests.exceptions.HTTPError):
        with transaction('mock://example.com/rest/'):
            pass

def test_create_container_is_successful(fedora, turtle):
    r = None
    with transaction('mock://example.com/rest/') as t:
        uri = t + '/theses/thesis'
        r = create_container(uri, turtle)
    assert r.status_code == 201

def test_create_container_failure_raises_error(fedora_errors, turtle):
    with pytest.raises(requests.exceptions.HTTPError):
        uri = 'mock://example.com/rest/tx:error/theses/thesis'
        create_container(uri, turtle)

def test_upload_file_is_successful(fedora, pdf):
    r = None
    with transaction('mock://example.com/rest/') as t:
        uri = t + '/theses/thesis/thesis.pdf/'
        r = upload_file(uri, pdf, 'application/pdf')
    assert r == 201

def test_upload_file_failure_raises_error(fedora_errors, pdf):
    with pytest.raises(requests.exceptions.HTTPError):
        uri = 'mock://example.com/rest/tx:error/theses/thesis/thesis.pdf'
        upload_file(uri, pdf, 'application/pdf')

def test_add_file_metadata_is_successful(fedora, sparql, auth=None):
    r = None
    with transaction('mock://example.com/rest/') as t:
        uri = t + '/theses/thesis/thesis.pdf/fcr:metadata'
        r = update_metadata(uri, sparql)
    assert r == 204

def test_add_file_metadata_failure_raises_error(fedora_errors, sparql,
                                                auth=None):
    with pytest.raises(requests.exceptions.HTTPError):
        uri = ('mock://example.com/rest/tx:error/theses/thesis/thesis.pdf/'
               'fcr:metadata')
        update_metadata(uri, sparql)


text:
extern "Java"
{
  namespace gnu
  {
    namespace gcj
    {
        class RawData;
      namespace xlib
      {
          class Clip;
      }
    }
  }
  namespace java
  {
    namespace awt
    {
        class Rectangle;
    }
  }
}

class gnu::gcj::xlib::Clip : public ::java::lang::Object
{

public:
  Clip(JArray< ::java::awt::Rectangle * > *);
private:
  void init(JArray< ::java::awt::Rectangle * > *);
public:
  void finalize();
  void dispose();
public: // actually package-private
  ::gnu::gcj::RawData * __attribute__((aligned(__alignof__( ::java::lang::Object)))) xrects;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_gcj_xlib_Clip__


text:
import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { BaseFilter } from './base.filter';
import { FilterControlService } from './filter-control.service';

@Component({
  selector: 'filters',
  templateUrl: './filters.component.html',
  styles: [ '.submit-btn { display: block; margin: 0 auto; }' ],
  providers: [ FilterControlService ],
})
export class FiltersComponent implements OnInit {
  @Input() filters: BaseFilter<any>[] = [];
  @Output() search = new EventEmitter();
  @Output() formChanges = new EventEmitter();

  form: FormGroup;

  constructor(private fcs: FilterControlService) { }

  ngOnInit() {
    console.log(this.filters)
    this.form = this.fcs.toFormGroup(this.filters);
    this.form.valueChanges
      .map((data: any) => data)
      .subscribe(
      (data: any) => this.formChanges.emit(data)
    );
  }

  onSubmit() {
    this.search.emit(this.form.value);
  }
}


text:
(function(Models, Types, Constants, Debug) {
    "use strict";

    // Constructor

    var NegotiateProtocolResponse = function() {
        this.types_ = new Types();
        this.dialectIndex_ = 0;
        this.securityMode_ = 0;
        this.maxMpxCount_ = 0;
        this.maxNumberVCs_ = 0;
        this.maxBufferSize_ = 0;
        this.maxRawSize_ = 0;
        this.sessionKey_ = 0;
        this.capabilities_ = 0;
        this.systemTimeLow_ = 0;
        this.systemTimeHigh_ = 0;
        this.serverTimeZone_ = 0;
        this.encryptionKeyLength_ = 0;

        this.guid_ = []; // Uint8Array
        this.securityBlob_ = []; // Uint8Array

        this.encryptionKey_ = []; // Uint8Array
        this.domainName_ = "";
    };

    // Public functions

    NegotiateProtocolResponse.prototype.load = function(packet) {
        var array = packet.getPacketHelper().getSmbParametersAndSmbDataUint8Array();

        this.dialectIndex_ = this.types_.getFixed2BytesValue(array, 1);
        if (this.dialectIndex_ === Constants.NO_SUPPORTED_DIALECT) {
            // No supported dialect.
            return;
        }
        this.securityMode_ = array[3];
        this.maxMpxCount_ = this.types_.getFixed2BytesValue(array, 4);
        this.maxNumberVCs_ = this.types_.getFixed2BytesValue(array, 6);
        this.maxBufferSize_ = this.types_.getFixed4BytesValue(array, 8);
        this.maxRawSize_ = this.types_.getFixed4BytesValue(array, 12);
        this.sessionKey_ = this.types_.getFixed4BytesValue(array, 16);
        this.capabilities_ = this.types_.getFixed4BytesValue(array, 20);
        this.systemTimeLow_ = this.types_.getFixed4BytesValue(array, 24);
        this.systemTimeHigh_ = this.types_.getFixed4BytesValue(array, 28);
        this.serverTimeZone_ = this.types_.getFixed2BytesSignedValue(array, 32);
        this.encryptionKeyLength_ = array[34];

        if (this.isCapabilityOf(Constants.CAP_EXTENDED_SECURITY)) {
            this.guid_ = new Uint8Array(array.subarray(37, 53));
            this.securityBlob_ = new Uint8Array(array.subarray(53, array.length - 1));
        } else {
            if (this.encryptionKeyLength_ > 0) {
                this.encryptionKey_ = new Uint8Array(array.subarray(37, 37 + this.encryptionKeyLength_));
            }
            // Multiple domain names may be included. Only first name is applied.
            // Also, each domain name is written as Unicode string...
            this.domainName_ = this.types_.getUnicodeNullEndString(array, 37 + this.encryptionKeyLength_).result;
        }
    };

    NegotiateProtocolResponse.prototype.getDialectIndex = function() {
        return this.dialectIndex_;
    };

    NegotiateProtocolResponse.prototype.getSecurityMode = function() {
        return this.securityMode_;
    };

    /*jslint bitwise: true */
    NegotiateProtocolResponse.prototype.isSecurityModeOf = function(name) {
        return (this.securityMode_ & name) !== 0 ? 1 : 0;
    };

    NegotiateProtocolResponse.prototype.getMaxMpxCount = function() {
        return this.maxMpxCount_;
    };

    NegotiateProtocolResponse.prototype.getMaxNumberVCs = function() {
        return this.maxNumberVCs_;
    };

    NegotiateProtocolResponse.prototype.getMaxBufferSize = function() {
        return this.maxBufferSize_;
    };

    NegotiateProtocolResponse.prototype.getMaxRawSize = function() {
        return this.maxRawSize_;
    };

    NegotiateProtocolResponse.prototype.getSessionKey = function() {
        return this.sessionKey_;
    };

    NegotiateProtocolResponse.prototype.getCapabilities = function() {
        return this.capabilities_;
    };

    /*jslint bitwise: true */
    NegotiateProtocolResponse.prototype.isCapabilityOf = function(name) {
        return (this.capabilities_ & name) !== 0;
    };

    NegotiateProtocolResponse.prototype.getSystemTimeLow = function() {
        return this.systemTimeLow_;
    };

    NegotiateProtocolResponse.prototype.getSystemTimeHigh = function() {
        return this.systemTimeHigh_;
    };

    NegotiateProtocolResponse.prototype.getSystemTime = function() {
        return this.types_.getDateFromSmbTime.call(this, this.systemTimeHigh_, this.systemTimeLow_);
    };

    NegotiateProtocolResponse.prototype.getServerTimeZone = function() {
        return this.serverTimeZone_;
    };

    NegotiateProtocolResponse.prototype.getEncryptionKeyLength = function() {
        return this.encryptionKeyLength_;
    };

    NegotiateProtocolResponse.prototype.getEncryptionKey = function() {
        return this.encryptionKey_;
    };

    NegotiateProtocolResponse.prototype.getGuid = function() {
        return this.guid_;
    };

    NegotiateProtocolResponse.prototype.getSecurityBlob = function() {
        return this.securityBlob_;
    };

    NegotiateProtocolResponse.prototype.getDomainName = function() {
        return this.domainName_;
    };

    // Export

    Models.NegotiateProtocolResponse = NegotiateProtocolResponse;

})(SmbClient.Smb1.Models, SmbClient.Types, SmbClient.Constants, SmbClient.Debug);


text:
"use strict";
function _isSpace(str) {
    if (str) {
        return str.match(/^\s+$/) != null;
    } else {
        return false
    }
}
function _isEmptyArray(array) {
    if(Object.prototype.toString.call(array) === '[object Array]') {
        return array.length == 0;
    } else {
        return false;
    }
}
function _stripSpaces(str) {
    str = str.replace(/\s+/g, '');
    return str;
}
function _toLowerCase(str) {
    str = str.toLowerCase();
    return str;
}
function _stripSymbols(str) {
    str = str.replace(/\W/g, '');
    return str;
}
function _capitalizeFirst(str) {
	str = str.replace(/(^|\s)[a-z]/g, function(f){
		return f.toUpperCase();
	});
	return str;
}
function isEmpty(string) {
    return !!(string == null || _isEmptyArray(string) || _isSpace(string));
}
exports.name = function(name) {
	if(!isEmpty(name)){
		name = _capitalizeFirst(name);
		return name;
	} else {
		throw "check.name was called on something that is empty";
	}
};
exports.email = function(email) {
	if(!isEmpty(email)){
		email = _stripSpaces(email);
		email = _toLowerCase(email);
		return email;
	} else {
		throw "check.email was called on something that is empty";
	}
};
exports.phone = function(phone) {
	if(!isEmpty(phone)){
		phone = _stripSymbols(phone);
		return phone;
	} else {
		throw "check.phone was called on something that is empty";
	}
};


text:
package com.digitalpetri.opcua.stack.core.serialization;

/** Super-interface for non-builtin serializable types. */
public interface UaSerializable {
}


text:
package org.geogit.osm.cli.commands;

import static com.google.common.base.Preconditions.checkState;

import java.io.File;
import java.io.IOException;
import java.util.List;

import jline.console.ConsoleReader;

import org.geogit.api.GeoGIT;
import org.geogit.api.ObjectId;
import org.geogit.cli.AbstractCommand;
import org.geogit.cli.CLICommand;
import org.geogit.cli.CommandFailedException;
import org.geogit.cli.GeogitCLI;
import org.geogit.osm.internal.Mapping;
import org.geogit.osm.internal.OSMMapOp;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

/**
 * Creates new data in the geogit repository based on raw OSM data already in the repository.
 *
 *
 * @see OSMMapOp
 */
@Parameters(commandNames = "map", commandDescription = "Create new data in the repository, applying a mapping to the current OSM data")
public class OSMMap extends AbstractCommand implements CLICommand {

    @Parameter(description = "<file>")
    public List<String> args;

    @Parameter(names = { "--message", "-m" }, description = "The message for the commit to create")
    public String message;

    private GeoGIT geogit;

    /**
     * Executes the map command using the provided options.
     */
    @Override
    protected void runInternal(GeogitCLI cli) throws IOException {
        if (args == null || args.isEmpty() || args.size() != 1) {
            printUsage();
            throw new CommandFailedException();
        }

        checkState(cli.getGeogit().getRepository().getIndex().isClean()
                && cli.getGeogit().getRepository().getWorkingTree().isClean(),
                "Working tree and index are not clean");

        String mappingFilepath = args.get(0);

        Mapping mapping = Mapping.fromFile(mappingFilepath);

        geogit = cli.getGeogit();

        ObjectId oldTreeId = geogit.getRepository().getWorkingTree().getTree().getId();

        message = message == null ? "Applied mapping " + new File(mappingFilepath).getName()
                : message;

        ObjectId newTreeId = geogit.command(OSMMapOp.class).setMapping(mapping).setMessage(message)
                .call().getId();

        ConsoleReader console = cli.getConsole();
        if (newTreeId.equals(oldTreeId)) {
            console.println("No features matched the specified filter, or they provided no updated data.\n"
                    + "No changes have been made to the working tree");
        } else {
            // print something?
        }
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:weightSum="1">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Large Text"
        android:id="@+id/board_title"
        android:layout_weight="0.11" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/board_thumbnail"
        android:layout_margin="@dimen/abc_action_bar_icon_vertical_padding_material" />

    <CheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Keep in sync"
        android:focusable="false"
        android:id="@+id/keepSynced" />
</LinearLayout>


text:
package edu.usu.sdl.openstorefront.web.extension;

import com.fasterxml.jackson.databind.ObjectMapper;
import edu.usu.sdl.openstorefront.common.util.StringProcessor;
import edu.usu.sdl.openstorefront.core.model.ErrorInfo;
import edu.usu.sdl.openstorefront.core.view.SystemErrorModel;
import edu.usu.sdl.openstorefront.service.ServiceProxy;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.MediaType;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.StreamingResolution;
import net.sourceforge.stripes.exception.DefaultExceptionHandler;

/**
 * Translate Errors into something the front-end can handle
 *
 * @author dshurtleff
 */
public class OpenStorefrontExceptionHandler
		extends DefaultExceptionHandler
{

	public Resolution handleAll(Throwable error, HttpServletRequest request, HttpServletResponse response)
	{
		//ActionBean action = (ActionBean) request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN);

		ErrorInfo errorInfo = new ErrorInfo(error, request);

		//Strip and senstive info (See Checklist Q: 410)
		ServiceProxy serviceProxy = new ServiceProxy();
		SystemErrorModel systemErrorModel = serviceProxy.getSystemService().generateErrorTicket(errorInfo);

		final ObjectMapper objectMapper = StringProcessor.defaultObjectMapper();
		return new StreamingResolution(MediaType.APPLICATION_JSON)
		{

			@Override
			protected void stream(HttpServletResponse response) throws Exception
			{
				objectMapper.writeValue(response.getOutputStream(), systemErrorModel);
			}

		};
	}

}


text:
"""Tests for discriminator."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import tensorflow.compat.v1 as tf
from tensorflow_gan.examples.cyclegan import discriminator

class DiscriminatorTest(tf.test.TestCase):

  def _layer_output_size(self, input_size, kernel_size=4, stride=2, pad=2):
    return (input_size + pad * 2 - kernel_size) // stride + 1

  def test_four_layers(self):
    batch_size = 2
    input_size = 256

    output_size = self._layer_output_size(input_size)
    output_size = self._layer_output_size(output_size)
    output_size = self._layer_output_size(output_size)
    output_size = self._layer_output_size(output_size, stride=1)
    output_size = self._layer_output_size(output_size, stride=1)

    images = tf.ones((batch_size, input_size, input_size, 3))
    logits, end_points = discriminator.pix2pix_discriminator(
        images, num_filters=[64, 128, 256, 512])
    self.assertListEqual([batch_size, output_size, output_size, 1],
                         logits.shape.as_list())
    self.assertListEqual([batch_size, output_size, output_size, 1],
                         end_points['predictions'].shape.as_list())

  def test_four_layers_no_padding(self):
    batch_size = 2
    input_size = 256

    output_size = self._layer_output_size(input_size, pad=0)
    output_size = self._layer_output_size(output_size, pad=0)
    output_size = self._layer_output_size(output_size, pad=0)
    output_size = self._layer_output_size(output_size, stride=1, pad=0)
    output_size = self._layer_output_size(output_size, stride=1, pad=0)

    images = tf.ones((batch_size, input_size, input_size, 3))
    logits, end_points = discriminator.pix2pix_discriminator(
        images, num_filters=[64, 128, 256, 512], padding=0)
    self.assertListEqual([batch_size, output_size, output_size, 1],
                         logits.shape.as_list())
    self.assertListEqual([batch_size, output_size, output_size, 1],
                         end_points['predictions'].shape.as_list())

  def test_four_layers_wrong_paddig(self):
    batch_size = 2
    input_size = 256

    images = tf.ones((batch_size, input_size, input_size, 3))
    with self.assertRaises(TypeError):
      discriminator.pix2pix_discriminator(
          images, num_filters=[64, 128, 256, 512], padding=1.5)

  def test_four_layers_negative_padding(self):
    batch_size = 2
    input_size = 256

    images = tf.ones((batch_size, input_size, input_size, 3))
    if tf.executing_eagerly():
      exception_type = tf.errors.InvalidArgumentError
    else:
      exception_type = ValueError
    with self.assertRaises(exception_type):
      discriminator.pix2pix_discriminator(
          images, num_filters=[64, 128, 256, 512], padding=-1)

if __name__ == '__main__':
  tf.test.main()


text:
from enum import Enum

class DeploymentMode(Enum):

    incremental = "Incremental"
    complete = "Complete"


text:
package com.github.assisstion.ModulePack.collection.wrapper.restriction;

import java.util.Collection;
import java.util.List;
import java.util.ListIterator;
import java.util.function.Predicate;
import java.util.stream.Collectors;

import com.github.assisstion.ModulePack.collection.wrapper.ListWrapper;

public class RestrictionListWrapper<T> extends ListWrapper<T> implements Checker<T>{

	protected Predicate<T> checker;

	public RestrictionListWrapper(List<T> list, Predicate<T> condition){
		super(list);
		checker = condition;
	}

	@Override
	public boolean add(T t){
		if(check(t)){
			super.add(t);
		}
		return false;
	}

	@Override
	public boolean addAll(Collection<? extends T> coll){
		List<T> newList = coll.stream().filter((t) -> check(t))
				.collect(Collectors.toList());
		return super.addAll(newList);
	}

	@Override
	public boolean addAll(int index, Collection<? extends T> coll){
		List<T> newList = coll.stream().filter((t) -> check(t))
				.collect(Collectors.toList());
		return super.addAll(index, newList);
	}

	@Override
	public T set(int index, T element){
		if(check(element)){
			super.set(index, element);
		}
		return null;
	}

	@Override
	public void add(int index, T element){
		if(check(element)){
			super.add(index, element);
		}
	}

	@Override
	public ListIterator<T> listIterator(){
		return new RestrictionListIteratorWrapper<T>(get().listIterator(), getChecker());
	}

	@Override
	public ListIterator<T> listIterator(int index){
		return new RestrictionListIteratorWrapper<T>(get().listIterator(index), getChecker());
	}

	@Override
	public Predicate<T> getChecker(){
		return checker;
	}
}


text:
{-# LANGUAGE InterruptibleFFI #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module Blockcat.Binaryen.Raw where

import Foreign
import Foreign.C

newtype BinaryenIndex = BinaryenIndex
    { getBinaryenIndex :: CUInt
    } deriving (Num)

newtype BinaryenType = BinaryenType
    { getBinaryenType :: CUInt
    } deriving (Storable)

foreign import ccall interruptible "BinaryenNone" c_BinaryenNone ::
               BinaryenType

foreign import ccall interruptible "BinaryenInt32" c_BinaryenInt32
               :: BinaryenType

foreign import ccall interruptible "BinaryenInt64" c_BinaryenInt64
               :: BinaryenType

foreign import ccall interruptible "BinaryenFloat32"
               c_BinaryenFloat32 :: BinaryenType

foreign import ccall interruptible "BinaryenFloat64"
               c_BinaryenFloat64 :: BinaryenType

newtype BinaryenModuleRef = BinaryenModuleRef
    { getBinaryenModuleRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenModuleCreate"
               c_BinaryenModuleCreate :: IO BinaryenModuleRef

foreign import ccall interruptible "BinaryenModuleDispose"
               c_BinaryenModuleDispose :: BinaryenModuleRef -> IO ()

newtype BinaryenFunctionTypeRef = BinaryenFunctionTypeRef
    { getBinaryenFunctionTypeRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenAddFunctionType"
               c_BinaryenAddFunctionType ::
               BinaryenModuleRef ->
                 CString ->
                   BinaryenType ->
                     Ptr BinaryenType -> BinaryenIndex -> IO BinaryenFunctionTypeRef

newtype BinaryenLiteralRef = BinaryenLiteralRef
    { getBinaryenLiteralRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenLiteralSize"
               c_BinaryenLiteralSize :: CSize

foreign import ccall interruptible "BinaryenLiteralAlign"
               c_BinaryenLiteralAlign :: CSize

foreign import ccall interruptible "BinaryenLiteralRefInt32"
               c_BinaryenLiteralRefInt32 :: BinaryenLiteralRef -> CInt -> IO ()

foreign import ccall interruptible "BinaryenLiteralRefInt64"
               c_BinaryenLiteralRefInt64 :: BinaryenLiteralRef -> CLLong -> IO ()

foreign import ccall interruptible "BinaryenLiteralRefFloat32"
               c_BinaryenLiteralRefFloat32 ::
               BinaryenLiteralRef -> CFloat -> IO ()

foreign import ccall interruptible "BinaryenLiteralRefFloat64"
               c_BinaryenLiteralRefFloat64 ::
               BinaryenLiteralRef -> CDouble -> IO ()

foreign import ccall interruptible "BinaryenLiteralRefFloat32Bits"
               c_BinaryenLiteralRefFloat32Bits ::
               BinaryenLiteralRef -> CInt -> IO ()

foreign import ccall interruptible "BinaryenLiteralRefFloat64Bits"
               c_BinaryenLiteralRefFloat64Bits ::
               BinaryenLiteralRef -> CLLong -> IO ()

newtype BinaryenOp = BinaryenOp
    { getBinaryenOp :: CInt
    }

foreign import ccall interruptible "BinaryenClzInt32"
               c_BinaryenClzInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenCtzInt32"
               c_BinaryenCtzInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenPopcntInt32"
               c_BinaryenPopcntInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenNegFloat32"
               c_BinaryenNegFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenAbsFloat32"
               c_BinaryenAbsFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenCeilFloat32"
               c_BinaryenCeilFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenFloorFloat32"
               c_BinaryenFloorFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncFloat32"
               c_BinaryenTruncFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenNearestFloat32"
               c_BinaryenNearestFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenSqrtFloat32"
               c_BinaryenSqrtFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqZInt32"
               c_BinaryenEqZInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenClzInt64"
               c_BinaryenClzInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenCtzInt64"
               c_BinaryenCtzInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenPopcntInt64"
               c_BinaryenPopcntInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenNegFloat64"
               c_BinaryenNegFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenAbsFloat64"
               c_BinaryenAbsFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenCeilFloat64"
               c_BinaryenCeilFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenFloorFloat64"
               c_BinaryenFloorFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncFloat64"
               c_BinaryenTruncFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenNearestFloat64"
               c_BinaryenNearestFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenSqrtFloat64"
               c_BinaryenSqrtFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqZInt64"
               c_BinaryenEqZInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenExtendSInt32"
               c_BinaryenExtendSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenExtendUInt32"
               c_BinaryenExtendUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenWrapInt64"
               c_BinaryenWrapInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncSFloat32ToInt32"
               c_BinaryenTruncSFloat32ToInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncSFloat32ToInt64"
               c_BinaryenTruncSFloat32ToInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncUFloat32ToInt32"
               c_BinaryenTruncUFloat32ToInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncUFloat32ToInt64"
               c_BinaryenTruncUFloat32ToInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncSFloat64ToInt32"
               c_BinaryenTruncSFloat64ToInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncSFloat64ToInt64"
               c_BinaryenTruncSFloat64ToInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncUFloat64ToInt32"
               c_BinaryenTruncUFloat64ToInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenTruncUFloat64ToInt64"
               c_BinaryenTruncUFloat64ToInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenReinterpretFloat32"
               c_BinaryenReinterpretFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenReinterpretFloat64"
               c_BinaryenReinterpretFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertSInt32ToFloat32"
               c_BinaryenConvertSInt32ToFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertSInt32ToFloat64"
               c_BinaryenConvertSInt32ToFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertUInt32ToFloat32"
               c_BinaryenConvertUInt32ToFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertUInt32ToFloat64"
               c_BinaryenConvertUInt32ToFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertSInt64ToFloat32"
               c_BinaryenConvertSInt64ToFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertSInt64ToFloat64"
               c_BinaryenConvertSInt64ToFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertUInt64ToFloat32"
               c_BinaryenConvertUInt64ToFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenConvertUInt64ToFloat64"
               c_BinaryenConvertUInt64ToFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenPromoteFloat32"
               c_BinaryenPromoteFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenDemoteFloat64"
               c_BinaryenDemoteFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenReinterpretInt32"
               c_BinaryenReinterpretInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenReinterpretInt64"
               c_BinaryenReinterpretInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenAddInt32"
               c_BinaryenAddInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenSubInt32"
               c_BinaryenSubInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenMulInt32"
               c_BinaryenMulInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivSInt32"
               c_BinaryenDivSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivUInt32"
               c_BinaryenDivUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenRemSInt32"
               c_BinaryenRemSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenRemUInt32"
               c_BinaryenRemUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenAndInt32"
               c_BinaryenAndInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenOrInt32"
               c_BinaryenOrInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenXorInt32"
               c_BinaryenXorInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenShlInt32"
               c_BinaryenShlInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenShrUInt32"
               c_BinaryenShrUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenShrSInt32"
               c_BinaryenShrSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenRotLInt32"
               c_BinaryenRotLInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenRotRInt32"
               c_BinaryenRotRInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqInt32"
               c_BinaryenEqInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenNeInt32"
               c_BinaryenNeInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtSInt32"
               c_BinaryenLtSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtUInt32"
               c_BinaryenLtUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeSInt32"
               c_BinaryenLeSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeUInt32"
               c_BinaryenLeUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtSInt32"
               c_BinaryenGtSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtUInt32"
               c_BinaryenGtUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeSInt32"
               c_BinaryenGeSInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeUInt32"
               c_BinaryenGeUInt32 :: BinaryenOp

foreign import ccall interruptible "BinaryenAddInt64"
               c_BinaryenAddInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenSubInt64"
               c_BinaryenSubInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenMulInt64"
               c_BinaryenMulInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivSInt64"
               c_BinaryenDivSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivUInt64"
               c_BinaryenDivUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenRemSInt64"
               c_BinaryenRemSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenRemUInt64"
               c_BinaryenRemUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenAndInt64"
               c_BinaryenAndInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenOrInt64"
               c_BinaryenOrInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenXorInt64"
               c_BinaryenXorInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenShlInt64"
               c_BinaryenShlInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenShrUInt64"
               c_BinaryenShrUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenShrSInt64"
               c_BinaryenShrSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenRotLInt64"
               c_BinaryenRotLInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenRotRInt64"
               c_BinaryenRotRInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqInt64"
               c_BinaryenEqInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenNeInt64"
               c_BinaryenNeInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtSInt64"
               c_BinaryenLtSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtUInt64"
               c_BinaryenLtUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeSInt64"
               c_BinaryenLeSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeUInt64"
               c_BinaryenLeUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtSInt64"
               c_BinaryenGtSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtUInt64"
               c_BinaryenGtUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeSInt64"
               c_BinaryenGeSInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeUInt64"
               c_BinaryenGeUInt64 :: BinaryenOp

foreign import ccall interruptible "BinaryenAddFloat32"
               c_BinaryenAddFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenSubFloat32"
               c_BinaryenSubFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenMulFloat32"
               c_BinaryenMulFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivFloat32"
               c_BinaryenDivFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenCopySignFloat32"
               c_BinaryenCopySignFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenMinFloat32"
               c_BinaryenMinFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenMaxFloat32"
               c_BinaryenMaxFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqFloat32"
               c_BinaryenEqFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenNeFloat32"
               c_BinaryenNeFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtFloat32"
               c_BinaryenLtFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeFloat32"
               c_BinaryenLeFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtFloat32"
               c_BinaryenGtFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeFloat32"
               c_BinaryenGeFloat32 :: BinaryenOp

foreign import ccall interruptible "BinaryenAddFloat64"
               c_BinaryenAddFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenSubFloat64"
               c_BinaryenSubFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenMulFloat64"
               c_BinaryenMulFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenDivFloat64"
               c_BinaryenDivFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenCopySignFloat64"
               c_BinaryenCopySignFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenMinFloat64"
               c_BinaryenMinFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenMaxFloat64"
               c_BinaryenMaxFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenEqFloat64"
               c_BinaryenEqFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenNeFloat64"
               c_BinaryenNeFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLtFloat64"
               c_BinaryenLtFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenLeFloat64"
               c_BinaryenLeFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGtFloat64"
               c_BinaryenGtFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenGeFloat64"
               c_BinaryenGeFloat64 :: BinaryenOp

foreign import ccall interruptible "BinaryenPageSize"
               c_BinaryenPageSize :: BinaryenOp

foreign import ccall interruptible "BinaryenCurrentMemory"
               c_BinaryenCurrentMemory :: BinaryenOp

foreign import ccall interruptible "BinaryenGrowMemory"
               c_BinaryenGrowMemory :: BinaryenOp

foreign import ccall interruptible "BinaryenHasFeature"
               c_BinaryenHasFeature :: BinaryenOp

newtype BinaryenExpressionRef = BinaryenExpressionRef
    { getBinaryenExpressionRef :: Ptr ()
    } deriving (Storable)

foreign import ccall interruptible "BinaryenBlock" c_BinaryenBlock
               ::
               BinaryenModuleRef ->
                 CString ->
                   Ptr BinaryenExpressionRef ->
                     BinaryenIndex -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenIf" c_BinaryenIf ::
               BinaryenModuleRef ->
                 BinaryenExpressionRef ->
                   BinaryenExpressionRef ->
                     BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenLoop" c_BinaryenLoop ::
               BinaryenModuleRef ->
                 CString -> BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenBreak" c_BinaryenBreak
               ::
               BinaryenModuleRef ->
                 CString ->
                   BinaryenExpressionRef ->
                     BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenSwitch"
               c_BinaryenSwitch ::
               BinaryenModuleRef ->
                 Ptr CString ->
                   BinaryenIndex ->
                     CString ->
                       BinaryenExpressionRef ->
                         BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenCall" c_BinaryenCall ::
               BinaryenModuleRef ->
                 CString ->
                   Ptr BinaryenExpressionRef ->
                     BinaryenIndex -> BinaryenType -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenCallImport"
               c_BinaryenCallImport ::
               BinaryenModuleRef ->
                 CString ->
                   Ptr BinaryenExpressionRef ->
                     BinaryenIndex -> BinaryenType -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenCallIndirect"
               c_BinaryenCallIndirect ::
               BinaryenModuleRef ->
                 BinaryenExpressionRef ->
                   Ptr BinaryenExpressionRef ->
                     BinaryenIndex -> CString -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenGetLocal"
               c_BinaryenGetLocal ::
               BinaryenModuleRef ->
                 BinaryenIndex -> BinaryenType -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenSetLocal"
               c_BinaryenSetLocal ::
               BinaryenModuleRef ->
                 BinaryenIndex -> BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenTeeLocal"
               c_BinaryenTeeLocal ::
               BinaryenModuleRef ->
                 BinaryenIndex -> BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenLoad" c_BinaryenLoad ::
               BinaryenModuleRef ->
                 CUInt ->
                   CChar ->
                     CUInt ->
                       CUInt ->
                         BinaryenType -> BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenStore" c_BinaryenStore
               ::
               BinaryenModuleRef ->
                 CUInt ->
                   CUInt ->
                     CUInt ->
                       BinaryenExpressionRef ->
                         BinaryenExpressionRef -> BinaryenType -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenConstRef"
               c_BinaryenConstRef ::
               BinaryenModuleRef -> BinaryenLiteralRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenUnary" c_BinaryenUnary
               ::
               BinaryenModuleRef ->
                 BinaryenOp -> BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenBinary"
               c_BinaryenBinary ::
               BinaryenModuleRef ->
                 BinaryenOp ->
                   BinaryenExpressionRef ->
                     BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenSelect"
               c_BinaryenSelect ::
               BinaryenModuleRef ->
                 BinaryenExpressionRef ->
                   BinaryenExpressionRef ->
                     BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenDrop" c_BinaryenDrop ::
               BinaryenModuleRef ->
                 BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenReturn"
               c_BinaryenReturn ::
               BinaryenModuleRef ->
                 BinaryenExpressionRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenHost" c_BinaryenHost ::
               BinaryenModuleRef ->
                 BinaryenOp ->
                   CString ->
                     Ptr BinaryenExpressionRef ->
                       BinaryenIndex -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenNop" c_BinaryenNop ::
               BinaryenModuleRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenUnreachable"
               c_BinaryenUnreachable ::
               BinaryenModuleRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenExpressionPrint"
               c_BinaryenExpressionPrint :: BinaryenExpressionRef -> IO ()

newtype BinaryenFunctionRef = BinaryenFunctionRef
    { getBinaryenFunctionRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenAddFunction"
               c_BinaryenAddFunction ::
               BinaryenModuleRef ->
                 CString ->
                   BinaryenFunctionTypeRef ->
                     Ptr BinaryenType ->
                       BinaryenIndex -> BinaryenExpressionRef -> IO BinaryenFunctionRef

newtype BinaryenImportRef = BinaryenImportRef
    { getBinaryenImportRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenAddImport"
               c_BinaryenAddImport ::
               BinaryenModuleRef ->
                 CString ->
                   CString ->
                     CString -> BinaryenFunctionTypeRef -> IO BinaryenImportRef

newtype BinaryenExportRef = BinaryenExportRef
    { getBinaryenExportRef :: Ptr ()
    }

foreign import ccall interruptible "BinaryenAddExport"
               c_BinaryenAddExport ::
               BinaryenModuleRef -> CString -> CString -> IO BinaryenExportRef

foreign import ccall interruptible "BinaryenSetFunctionTable"
               c_BinaryenSetFunctionTable ::
               BinaryenModuleRef ->
                 Ptr BinaryenFunctionRef -> BinaryenIndex -> IO ()

foreign import ccall interruptible "BinaryenSetMemory"
               c_BinaryenSetMemory ::
               BinaryenModuleRef ->
                 BinaryenIndex ->
                   BinaryenIndex ->
                     CString ->
                       Ptr CString ->
                         Ptr BinaryenExpressionRef ->
                           Ptr BinaryenIndex -> BinaryenIndex -> IO ()

foreign import ccall interruptible "BinaryenSetStart"
               c_BinaryenSetStart ::
               BinaryenModuleRef -> BinaryenFunctionRef -> IO ()

foreign import ccall interruptible "BinaryenModulePrint"
               c_BinaryenModulePrint :: BinaryenModuleRef -> IO ()

foreign import ccall interruptible "BinaryenModuleValidate"
               c_BinaryenModuleValidate :: BinaryenModuleRef -> IO CInt

foreign import ccall interruptible "BinaryenModuleOptimize"
               c_BinaryenModuleOptimize :: BinaryenModuleRef -> IO ()

foreign import ccall interruptible "BinaryenModuleAutoDrop"
               c_BinaryenModuleAutoDrop :: BinaryenModuleRef -> IO ()

foreign import ccall interruptible "BinaryenModuleWrite"
               c_BinaryenModuleWrite ::
               BinaryenModuleRef -> CString -> CSize -> IO CSize

foreign import ccall interruptible "BinaryenModuleRead"
               c_BinaryenModuleRead :: CString -> CSize -> IO BinaryenModuleRef

foreign import ccall interruptible "BinaryenModuleInterpret"
               c_BinaryenModuleInterpret :: BinaryenModuleRef -> IO ()

newtype RelooperRef = RelooperRef
    { getRelooperRef :: Ptr ()
    }

newtype RelooperBlockRef = RelooperBlockRef
    { getRelooperBlockRef :: Ptr ()
    }

foreign import ccall interruptible "RelooperCreate"
               c_RelooperCreate :: IO RelooperRef

foreign import ccall interruptible "RelooperAddBlock"
               c_RelooperAddBlock ::
               RelooperRef -> BinaryenExpressionRef -> IO RelooperBlockRef

foreign import ccall interruptible "RelooperAddBranch"
               c_RelooperAddBranch ::
               RelooperBlockRef ->
                 RelooperBlockRef ->
                   BinaryenExpressionRef -> BinaryenExpressionRef -> IO ()

foreign import ccall interruptible "RelooperAddBlockWithSwitch"
               c_RelooperAddBlockWithSwitch ::
               RelooperRef ->
                 BinaryenExpressionRef ->
                   BinaryenExpressionRef -> IO RelooperBlockRef

foreign import ccall interruptible "RelooperAddBranchForSwitch"
               c_RelooperAddBranchForSwitch ::
               RelooperBlockRef ->
                 RelooperBlockRef ->
                   Ptr BinaryenIndex ->
                     BinaryenIndex -> BinaryenExpressionRef -> IO ()

foreign import ccall interruptible "RelooperRenderAndDispose"
               c_RelooperRenderAndDispose ::
               RelooperRef ->
                 RelooperBlockRef ->
                   BinaryenIndex -> BinaryenModuleRef -> IO BinaryenExpressionRef

foreign import ccall interruptible "BinaryenSetAPITracing"
               c_BinaryenSetAPITracing :: CInt -> IO ()


text:
FOUNDATION_EXPORT double Pods_HRMethodsAttributes_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_HRMethodsAttributes_TestsVersionString[];


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

-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
    <testCase name="Mage\Wishlist\Test\TestCase\AddProductToWishlistEntityTest">
        <variation name="AddProductToWishlistEntityTestVariation1" method="test">
            <data name="descriptions" xsi:type="string">Add Simple product to Wishlist</data>
            <data name="product" xsi:type="string">catalogProductSimple::default</data>
            <data name="configure" xsi:type="string">false</data>
            <constraint name="Mage\Wishlist\Test\Constraint\AssertAddProductToWishlistSuccessMessage" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInCustomerBackendWishlist" />
        </variation>
        <variation name="AddProductToWishlistEntityTestVariation2" method="test">
            <data name="descriptions" xsi:type="string">Add Virtual product to Wishlist</data>
            <data name="product" xsi:type="string">catalogProductVirtual::order_default</data>
            <data name="configure" xsi:type="string">false</data>
            <constraint name="Mage\Wishlist\Test\Constraint\AssertAddProductToWishlistSuccessMessage" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInCustomerBackendWishlist" />
        </variation>
        <variation name="AddProductToWishlistEntityTestVariation4" method="test">
            <data name="descriptions" xsi:type="string">Add Configurable product to Wishlist</data>
            <data name="product" xsi:type="string">configurableProduct::default</data>
            <data name="configure" xsi:type="string">false</data>
            <constraint name="Mage\Wishlist\Test\Constraint\AssertAddProductToWishlistSuccessMessage" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInCustomerBackendWishlist" />
        </variation>
        <variation name="AddProductToWishlistEntityTestVariation5" method="test">
            <data name="descriptions" xsi:type="string">Add Grouped product to Wishlist</data>
            <data name="product" xsi:type="string">groupedProduct::three_simple_products</data>
            <data name="configure" xsi:type="string">false</data>
            <constraint name="Mage\Wishlist\Test\Constraint\AssertAddProductToWishlistSuccessMessage" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInWishlist" />
            <constraint name="Mage\Wishlist\Test\Constraint\AssertProductIsPresentInCustomerBackendWishlist" />
        </variation>
    </testCase>
</config>


text:
package proxypref;

import android.content.SharedPreferences;

import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyFloat;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class TestUtil {
    static <T> Answer<T> answerDefault(final String name) {
        return new Answer<T>() {
            @Override
            public T answer(InvocationOnMock invocationOnMock) throws Throwable {
                return name.equals(invocationOnMock.getArguments()[0]) ? (T)invocationOnMock.getArguments()[1] : null;
            }
        };
    }

    static Answer<Map> answerMapValue(final String name, final Object value) {
        return new Answer<Map>() {
            @Override
            public Map answer(InvocationOnMock invocationOnMock) throws Throwable {
                return new HashMap<String, Object>() {{
                    put(name, value);
                }};
            }
        };
    }

    static SharedPreferences.Editor mockEditor(SharedPreferences prefMock) {
        SharedPreferences.Editor editor = mock(SharedPreferences.Editor.class);

        when(editor.putString(anyString(), anyString())).thenReturn(editor);
        when(editor.putInt(anyString(), anyInt())).thenReturn(editor);
        when(editor.putLong(anyString(), anyLong())).thenReturn(editor);
        when(editor.putFloat(anyString(), anyFloat())).thenReturn(editor);
        when(editor.putBoolean(anyString(), anyBoolean())).thenReturn(editor);
        when(editor.putStringSet(anyString(), any(Set.class))).thenReturn(editor);

        when(editor.clear()).thenReturn(editor);
        when(editor.remove(anyString())).thenReturn(editor);
        doReturn(true).when(editor).commit();

        when(prefMock.edit()).thenReturn(editor);
        return editor;
    }

    static Map mockMapValue(String key, Object value) {
        Map map = mock(Map.class);
        when(map.get(eq(key))).thenReturn(value);
        return map;
    }
}


text:
// Load plugins

var gulp = require('gulp'),
    gutil = require('gulp-util'),
    watch = require('gulp-watch'),
    prefix = require('gulp-autoprefixer'),
    minifyCSS = require('gulp-minify-css'),
    sass = require('gulp-sass'),
    myth = require('gulp-myth'),
    stylus = require('gulp-stylus'),
    rename = require('gulp-rename'),
    size = require('gulp-size'),
    csslint = require('gulp-csslint')
    browserSync = require('browser-sync'),
    browserReload = browserSync.reload;

// Use csslint without box-sizing or compatible vendor prefixes (these
// don't seem to be kept up to date on what to yell about)

gulp.task('lint', function(){
  gulp.src('./css/*.css')
    .pipe(csslint({
          'compatible-vendor-prefixes': false,
          'box-sizing': false
        }))
    .pipe(csslint.reporter());

});

// Task that compiles scss files down to good old css
gulp.task('sass', function(){
  gulp.src('./sass/colors.scss')
      .pipe(watch(function(files) {
        return files.pipe(sass())
          .pipe(prefix())
          .pipe(size({gzip: true, showFiles: true, title:'unminified colors.css'}))
          .pipe(gulp.dest('css'))
          .pipe(browserSync.reload({stream:true}));
      }));
});

// Task to minify colors.css then rename as colors.min.css

gulp.task('minify', function(){
  gulp.src('./css/colors.css')
    .pipe(minifyCSS())
    .pipe(size({gzip: true, showFiles: true, title:'minified colors.css'}))
    .pipe(rename('colors.min.css'))
    .pipe(gulp.dest('./css/'));
});

// Task that compiles css using the myth processor

gulp.task('myth', function(){
  gulp.src('./myth/*.css')
    .pipe(watch(function(files) {
      return files.pipe(myth())
      .pipe(prefix())
      .pipe(gulp.dest('./css/'));
    }));
});

// Just runs autoprefixer on the compiled css

gulp.task('prefix', function(){
  gulp.src('./css/*.css')
      .pipe(prefix())
      .pipe(gulp.dest('./css/'));
});

gulp.task('stylus', function(){
  gulp.src('./stylus/colors.styl')
      .pipe(watch(function(files) {
        return files.pipe(stylus())
        .pipe(prefix())
        .pipe(gulp.dest('./css/'));
      }));
});

// Initialize browser-sync which starts a static server also allows for
// browsers to reload on filesave
gulp.task('browser-sync', function() {
    browserSync.init(null, {
        server: {
            baseDir: "./"
        }
    });
});

gulp.task('bs-reload', function () {
    browserSync.reload();
});

/*
   DEFAULT TASK

 • Process sass and lints outputted css
 • Outputted css is run through autoprefixer
 • Runs jshint on all js files in ./js/
 • Sends updates to any files in directory to browser for
 automatic reloading

*/

gulp.task('default', function(){
    gulp.watch(['./sass/colors.scss'], function(event) {
      gulp.run('sass', 'lint');
    });
});


text:
<!DOCTYPE html>

		<meta charset="utf-8" />

		<link href="asset/css/bootstrap.css" rel="stylesheet" />
		<link rel="stylesheet" href="asset/css/dexter.min.css" />
		<link rel="stylesheet" href="asset/css/font-awesome.min.css" />

		<link rel="stylesheet" href="asset/css/prettify.css" />

 Checker Code

					CO_COMPARETO_RESULTS_MIN_VALUE

 Description

					compareTo()/compare() returns Integer.MIN_VALUE

 Severity

					Critical

 Detector / Bug Pattern

					FindHEmismatch / Co

 More Information

 In some situation, this compareTo or compare method returns
the  constant Integer.MIN_VALUE, which is an exceptionally bad practice.
  The only thing that matters about the return value of compareTo is the sign of the result.
    But people will sometimes negate the return value of compareTo, expecting that this will negate
    the sign of the result. And it will, except in the case where the value returned is Integer.MIN_VALUE.
    So just return -1 rather than Integer.MIN_VALUE.

 Bad Code

 Good Code

 CWE ID

				CWE-1001

 Code Review Asset

				N/A

 URLs

					FINDBUGS SITE  :

					STACKOVERFLOW SITE  :


text:
'use strict';

/**
 * Module dependencies.
 */
var _ = require('lodash'),
	path = require('path'),
	mongoose = require('mongoose'),
	WorkoutResult = mongoose.model('WorkoutResult'),
	errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));

/**
 * Create a Workout Result
 */
exports.create = function(req, res) {
	var workoutResult = new WorkoutResult(req.body);

	workoutResult.save(function(err) {
		if (err) {
			return res.status(400).send({
				message: errorHandler.getErrorMessage(err)
			});
		} else {
			res.jsonp(workoutResult);
		}
	});
};

exports.getResults = function(req, res) {
	console.log(req.query);
	var numResults = 20; // default to 20 results at max
	if (req.query.numResults) {
		numResults = Number(req.query.numResults); // or let user specify with numResults parameter
	}

	var query = WorkoutResult
				.find({'workout': req.workout._id})
				.populate('user')
				.select('user result')
				.sort('-result');

	query.exec(function(error, results){
		var filtered = _.map(results, function(r){
			return {
				username: r.user.username,
				result: r.result
			}
		});

		var unique = _.uniq(filtered,
				function(item){
					return item.username;
				}
		);

		var limited = _.take(unique, numResults);
		return res.jsonp(limited);
	});

};


text:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>GUI Console</title>
</head>
<body>
<meta http-equiv="Refresh" content="0; URL=gui/lodlive/?http://127.0.0.1/IaaS.owl%23IEEE_Intercloud_Testbed">
</body>
</html>