text:
<?php
$lang['rental']=__('Rental','traveler');
$lang['rentals']=__('Rentals','traveler');
//search-form.php
$lang['search_for_rental']=__('Search for rental','traveler');
$lang['rental_advance_search']=__('Advance Search','traveler');
$lang['rental_less']=__('Less','traveler');
$lang['rental_property_description']=__('Property Description','traveler');
$lang['rental_property_review']=__('Property Review','traveler');
$lang['rental_search_for_vacation_rentals']=__('Search for Vacation Rentals','traveler');
$lang['rental_advance_search']=__('Advance Search','traveler');
$lang['rental_less']=__('Less','traveler');
$lang['rental_no_review']=__('no review','traveler');
$lang['rental_1_review']=__('1 review','traveler');
$lang['rental_d_reviews']=__(' %d reviews','traveler');
$lang['rental_book_now']=__('Book Now','traveler');
$lang['rental_night']=__('night','traveler');
$lang['rental_filter']=__('Filter','traveler');
$lang['rental_filter_by']=__('Filter By:','traveler');
$lang['rental_booking_for_d']=__('Booking for %d ','traveler');
$lang['rental_nights']=__('nights','traveler');
$lang['rental_property']=__('Property','traveler');
$lang['rental_d_adult']=__('%d adult','traveler');
$lang['rental_d_adults']=__('%d adults','traveler');
$lang['rental_d_child']=__('%d child','traveler');
$lang['rental_d_children']=__('%d children','traveler');
$lang['rental_per_day']=__('per day','traveler');
$lang['rental_not_what_you_looking_for']=__('Not what you\'re looking for? ','traveler');
$lang['rental_try_your_search_again']=__('Try your search again','traveler');
$lang['rental_showing']=__('Showing','traveler');
$lang['rental_pleasant']=__('Pleasant','traveler');
$lang['rental_good']=__('Good','traveler');
$lang['rental_very_good']=__('Very Good','traveler');
$lang['rental_wonderful']=__('Wonderful','traveler');
$lang['rental_based_on_1_review']=__('based on 1 review','traveler');
$lang['rental_traveler_rating']=__('Traveler rating','traveler');
$lang['rental_exellent']=__('Excellent','traveler');
$lang['rental_average']=__('Average','traveler');
$lang['rental_poor']=__('Poor','traveler');
$lang['rental_terrible']=__('Terrible','traveler');
$lang['rental_write_a_review']=__('Write a Review','traveler');
$lang['rental_summary']=__('Summary','traveler');
$lang['rental_properties_near_d']=__('Properties Near %s','traveler');
$lang['rental_agent_mail']=__('Agent E-mail','traveler');
$lang['rental_agent_website']=__('Agent Website','traveler');
$lang['rental_check_in']=__('Check in','traveler');
$lang['rental_check_out']=__('Check out','traveler');
$lang['rental_children']=__('Children','traveler');
$lang['rental_of_5']=__('of 5','traveler');
$lang['rental_adult']=__('Adult','traveler');
$lang['check_in_and_check_out_are_required']=__('Check-in and Check-out are required','traveler');
$lang['rental_s_nights']=__('%d nights','traveler');
$lang['rental_1_night']=__('1 night','traveler');


text:
<?xml version="1.0"?>
<!DOCTYPE cairis_model PUBLIC "-//CAIRIS//DTD MODEL 1.0//EN" "https://cairis.org/dtd/cairis_model.dtd">

<cairis_model>

<cairis>
  <project_settings name="Default">
    <contributors>
      <contributor first_name="None" surname="None" affiliation="Shamal Faily" role="Scribe" />
    </contributors>
  </project_settings>
  <environment name="Default" short_code="Default">
    <definition>Default</definition>
    <asset_values>
      <none>TBC</none>
      <low>TBC</low>
      <medium>TBC</medium>
      <high>TBC</high>
    </asset_values>
  </environment>
</cairis>

<riskanalysis>
  <role name="Undefined" type="Stakeholder" short_code="UNDEF">
    <description>Undefined</description>
  </role>
</riskanalysis>

<usability>

<persona name="Rick" type="Primary" assumption_persona="FALSE" image="Rick_portrait.jpg" >
 <!-- Image source: https://www.flickr.com/photos/savidgefamily/6962111611 -->
 <activities>Rick is a clean-water plant operator, responsible for ensuring that water processed through the plant is in line with specified set-points.  Rick's area of responsibility extend outside of the confines of the plant to include checking on pumping stations, which feed water into the plant's nearby reservoir.

During his working shifts (he works a 5 + 1 continental shift), Rick frequently checks readings on his SCADA workstation, takes water samples at various locations around the plant, and responds to alarms raised by the SCADA system; if necessary this involves investigating problems, and -- if no remedial tasks are possible -- calling someone out to investigate further.

At the start of every shift, Rick checks AJS to see what work he is scheduled to carry out.  He usually updates AJS based on the work he carried out before the end of his shift.  Rick also maintains a paper work diary, which is updated after carrying out specific work or responding to problems.  This, together with the status white board, is also useful for explaining any on-going issues when handing over to the next shift.  </activities>
  <attitudes>Rick isn't particularly concerned about people trying to hack into the SCADA system he uses.  "The only way the SCADA will get infected", Rick says, "is by an instrument tech plugging a virus infected laptop into it".

Rick is aware of Information Security communiques on InfoPortal, but doesn't see how this is relevant to him.  "We don't have laptops", says Rick, "and we don't leave site, so we don't leave anything in cars".  Rick is, however, aware of Information Security controls.  Rick knows that logout policies keep intruders from getting access to his workstation (although he thinks the logout period is too short given his environment), and he knows he can only access certain pumping sites via the telemetry system.

Although Rick can call an instrument tech for many problems, experience has taught him not to expect much from the ACME ICT support during a night shift.  "What's the point of calling up to say you can't login at night if all you get is a reference number", Rick complains, "that won't help me start my pumps now!"  Although Rick knows he can call out an instrument tech to help, he is also conscious that they are out most evenings, and might not appreciate a call-out for a corporate ICT problem.</attitudes>
  <aptitudes>Rick has been a plant operator for over 10 years.  Although the exact procedures need to run his plant are documented in a works manual, he doesn't need to refer to it.  "I haven't read the works manual in years", Rick says.

This experience does not stay in Rick's head. When problems have occurred, he raises these during team meetings, and any lessons learned sometimes find their way into the SCADA system as new functionality.  Rick is aware of the new EnterpriseSCADA developments and possible improvements to the HMI and start-up procedure.  Although not fully in the loop about what is going on, he hopes that, like the current system, there will be productivity improvements without an adverse impact.

Rick uses the SCADA's trend monitoring facilities as a indication of possible problems.  "If the trends freeze or flat-line", Rick says, "I need to go out and take a look at what's wrong".  Because problems occur daily, and he is often on his own, Rick can still control the plant using panel PCs at remote locations around the plant.</aptitudes>
  <motivations>Because the water quality can change over a matter of minutes, Rick's ethos is that you need to be ready for anything.  Because of this, checking certain parameters and pieces of kit is an important discipline, as is logging important events in the works diary and on the status board; these aid communication to other shift members, and the eventual piecing together of the elements of an event.

Although information security doesn't phase Rick too much, personal security does.  Potentially facing off a scrap metal thief is a big worry for Rick. "The police don't respond to intruder alarms at a nearby pumping station any more due to false alarms", says Rick.  "Because of this, we've been told not to go out to these places on our own.   We have a lone-worker system when people call us when we get to a particular station, but what happens if we get problems on the way?"</motivations>
  <skills>Rick has a basic operating knowledge of Windows; enough to carry out his day-to-day routines, check his email, and navigate the main sections of InfoPortal.

Rick isn't a power-user; he acknowledges that younger "whizz kids" are much more adept at using PCs than he is.  Consequently, he only uses a sub-set of the desktop icons currently on his desktop.  "I don't know what these other applications do", Rick says,"I've tried clicking on one and it just gives me a Data Protection Warning.  I guess this means I'm not authorised to use it."</skills>
  <intrinsic>None</intrinsic>
  <contextual>None</contextual>
<persona_environment name="Default" is_direct="TRUE">
  <persona_role name="Undefined" />
  <narrative>Nothing stipulated</narrative>
</persona_environment>
</persona>

<external_document name="big security worry GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>big security worry GT concept</description>
</external_document>
<external_document name="Alarm handling GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Alarm handling GT concept</description>
</external_document>
<external_document name="Authorisation restriction GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Authorisation restriction GT concept</description>
</external_document>
<external_document name="Business compliance GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Business compliance GT concept</description>
</external_document>
<external_document name="Corporate interface GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Corporate interface GT concept</description>
</external_document>
<external_document name="Equipment GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Equipment GT concept</description>
</external_document>
<external_document name="External agencies GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>External agencies GT concept</description>
</external_document>
<external_document name="Hardware checks GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Hardware checks GT concept</description>
</external_document>
<external_document name="Hazards GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Hazards GT concept</description>
</external_document>
<external_document name="ICT non-support GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>ICT non-support GT concept</description>
</external_document>
<external_document name="InfoSec communication GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>InfoSec communication GT concept</description>
</external_document>
<external_document name="InfoSec indifference GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>InfoSec indifference GT concept</description>
</external_document>
<external_document name="Insider knowledge GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Insider knowledge GT concept</description>
</external_document>
<external_document name="Interim Systems GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Interim Systems GT concept</description>
</external_document>
<external_document name="Island mindset GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Island mindset GT concept</description>
</external_document>
<external_document name="Limited support knowledge GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Limited support knowledge GT concept</description>
</external_document>
<external_document name="Local standards GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Local standards GT concept</description>
</external_document>
<external_document name="Logout policy GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Logout policy GT concept</description>
</external_document>
<external_document name="One-man site GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>One-man site GT concept</description>
</external_document>
<external_document name="Operational contexts GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Operational contexts GT concept</description>
</external_document>
<external_document name="Personal Security GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Personal Security GT concept</description>
</external_document>
<external_document name="Process impact GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Process impact GT concept</description>
</external_document>
<external_document name="Process Innovation GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Process Innovation GT concept</description>
</external_document>
<external_document name="Sample collection GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Sample collection GT concept</description>
</external_document>
<external_document name="Scope of responsibility GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Scope of responsibility GT concept</description>
</external_document>
<external_document name="Site knowledge GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Site knowledge GT concept</description>
</external_document>
<external_document name="Site threats GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Site threats GT concept</description>
</external_document>
<external_document name="Trend monitoring GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Trend monitoring GT concept</description>
</external_document>
<external_document name="Unexplained feature GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Unexplained feature GT concept</description>
</external_document>
<external_document name="Unlikely threats GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Unlikely threats GT concept</description>
</external_document>
<external_document name="Water GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Water GT concept</description>
</external_document>
<external_document name="Work routine GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Work routine GT concept</description>
</external_document>
<external_document name="Work shifts GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Work shifts GT concept</description>
</external_document>
<external_document name="Works diary GT concept" version="1" date="August 2010" authors="Shamal Faily">
  <description>Works diary GT concept</description>
</external_document>

<document_reference name="Callouts occur for anything other than a basic trip." contributor="Shamal Faily" document="Alarm handling GT concept">
  <excerpt>Basic trips can be manually reset but anything more complicated warrants a call-out.</excerpt>
</document_reference>
<document_reference name="Alarms can be overriden with permission" contributor="Shamal Faily" document="Alarm handling GT concept">
  <excerpt>Alarms can be overriden but only with permission from Process.</excerpt>
</document_reference>
<document_reference name="Some event alarms are annoying rather than informative" contributor="Shamal Faily" document="Alarm handling GT concept">
  <excerpt>Alarms come through for certain events rather than problems which are annoying.</excerpt>
</document_reference>
<document_reference name="Role restrictions" contributor="Shamal Faily" document="Authorisation restriction GT concept">
  <excerpt>Depending on what you are authorised to do - certain buttons for things like starting and stopping pumps will be greyed out.</excerpt>
</document_reference>
<document_reference name="Line manager site authorisation" contributor="Shamal Faily" document="Authorisation restriction GT concept">
  <excerpt>Can only access sites they have been authorised to; permission for authorisation changes need to be sought from the line manager.</excerpt>
</document_reference>
<document_reference name="Work reports are filed" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Work reports are filed and sent to ACME monthly.</excerpt>
</document_reference>
<document_reference name="Everything is logged" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Everything that happens is logged.</excerpt>
</document_reference>
<document_reference name="Corporate windows logout policy" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Policy for locking Windows down is corporate.</excerpt>
</document_reference>
<document_reference name="Logs are part of MS" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Logs are recorded in the Management System</excerpt>
</document_reference>
<document_reference name="MS activities during start of day shift." contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Management System activities are carried out during the first hours of a day shift.</excerpt>
</document_reference>
<document_reference name="Everything has a MS procedure" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Everything has a procedure in the Management System.</excerpt>
</document_reference>
<document_reference name="The works diary is a controlled document." contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>The works diary is a controlled document.</excerpt>
</document_reference>
<document_reference name="Jobs inputted at the end of a shift" contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Jobs tend to be input at the end of a shift.</excerpt>
</document_reference>
<document_reference name="MS workaround for intruder alarms." contributor="Shamal Faily" document="Business compliance GT concept">
  <excerpt>Lack of police response to intruder alarms led to two-man requirement for alarm response.</excerpt>
</document_reference>
<document_reference name="Periodic national security alerts" contributor="Shamal Faily" document="big security worry GT concept">
  <excerpt>Regular emails are received about things like the Iraqi Wars and terrorism; it then goes quite for a while until the next event.</excerpt>
</document_reference>
<document_reference name="Annual police meetings" contributor="Shamal Faily" document="big security worry GT concept">
  <excerpt>Annual security meetings at Stepford when the police come down because it is a key site.</excerpt>
</document_reference>
<document_reference name="Tasks entered into AJS are captured by WMS" contributor="Shamal Faily" document="Corporate interface GT concept">
  <excerpt>Tasks are entered into Asset Job System are captured by Work Management System.</excerpt>
</document_reference>
<document_reference name="Users identified by WMS numbers" contributor="Shamal Faily" document="Corporate interface GT concept">
  <excerpt>Users are identified by unique WMS numbers.</excerpt>
</document_reference>
<document_reference name="AJS shows current jobs" contributor="Shamal Faily" document="Corporate interface GT concept">
  <excerpt>AJS indicates how many jobs you have.</excerpt>
</document_reference>
<document_reference name="Contact details on Outlook" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>You can get all the contact details you need from outlook.</excerpt>
</document_reference>
<document_reference name="Communal PC for checking email" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>A communal PC is used for checking mail.</excerpt>
</document_reference>
<document_reference name="Panel PCs around plant can run plant" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>Panel PCs are used to check things while checking on a delivery.</excerpt>
</document_reference>
<document_reference name="HMI passwords" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>HMIs have passwords associated with them.</excerpt>
</document_reference>
<document_reference name="Clients rather than HMIs" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>The new system moves towards clients rather than HMIs.</excerpt>
</document_reference>
<document_reference name="SCADA PCs are site-specific industrial PCs." contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>SCADA PCs are site-specific industrial PCs.</excerpt>
</document_reference>
<document_reference name="SCADA authentication via non ACME credentials" contributor="Shamal Faily" document="Equipment GT concept">
  <excerpt>Uses non ACME passwords to log onto the SCADA and pumping station.</excerpt>
</document_reference>
<document_reference name="Environmental Agency carry out river monitoring" contributor="Shamal Faily" document="External agencies GT concept">
  <excerpt>The Environmental Agency carry out their own river monitoring.</excerpt>
</document_reference>
<document_reference name="Out-of-spec alarms precipitate TIS call-outs" contributor="Shamal Faily" document="External agencies GT concept">
  <excerpt>Out of spec alarms are picked up Telemetry Information System; these lead to a technician call out; independent sampling; log checking.</excerpt>
</document_reference>
<document_reference name="Flooding worse case" contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>Worse case scenario on a sewage site is a flood.</excerpt>
</document_reference>
<document_reference name="Massive and uncontrollable water input" contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>It is not like a factory: it is a massive system with tonnes of debris that hits you all in one go.</excerpt>
</document_reference>
<document_reference name="Pumping decisions rain based" contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>Decisions to pump are based on the rain forecast.</excerpt>
</document_reference>
<document_reference name="Bad weather can lead to power dips." contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>Bad weather can lead to power dips.</excerpt>
</document_reference>
<document_reference name="Large water tanks conduct electricity" contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>Large water tanks conduct electricity</excerpt>
</document_reference>
<document_reference name="Failures often occur when seasons change." contributor="Shamal Faily" document="Hazards GT concept">
  <excerpt>Failures often occur when seasons change. </excerpt>
</document_reference>
<document_reference name="Readings are taken from SCADA screens." contributor="Shamal Faily" document="Hardware checks GT concept">
  <excerpt>SCADA screens are checked to take readings about chemical dosing; iron levels; pH etc.</excerpt>
</document_reference>
<document_reference name="Hardware is checked daily" contributor="Shamal Faily" document="Hardware checks GT concept">
  <excerpt>Hardware equipment is checked daily</excerpt>
</document_reference>
<document_reference name="Hacker aware" contributor="Shamal Faily" document="InfoSec communication GT concept">
  <excerpt>Has read warning about people trying to hack machine on InfoPortal.</excerpt>
</document_reference>
<document_reference name="Physical and login security" contributor="Shamal Faily" document="InfoSec indifference GT concept">
  <excerpt>Once you are through the gate then security is the operator login.</excerpt>
</document_reference>
<document_reference name="PC and SCADA security" contributor="Shamal Faily" document="InfoSec indifference GT concept">
  <excerpt>The are 2 forms of security: PC and SCADA</excerpt>
</document_reference>
<document_reference name="Corporate wifi insecurity" contributor="Shamal Faily" document="InfoSec indifference GT concept">
  <excerpt>The corporate wifi is not perceived to be secure as the access code is written down on a wall.</excerpt>
</document_reference>
<document_reference name="InfoSec communiques irrelevant" contributor="Shamal Faily" document="InfoSec indifference GT concept">
  <excerpt>Messages about leaving things and laptops in a car are not a problem; [we] do not go off site.</excerpt>
</document_reference>
<document_reference name="Hacking indifference" contributor="Shamal Faily" document="InfoSec indifference GT concept">
  <excerpt>Not worried about people trying to hack the SCADA systems.</excerpt>
</document_reference>
<document_reference name="Fluorescent passport" contributor="Shamal Faily" document="Insider knowledge GT concept">
  <excerpt>Wearing a fluorescent vest gets you anywhere.</excerpt>
</document_reference>
<document_reference name="Thief knowledge comes from insiders" contributor="Shamal Faily" document="Insider knowledge GT concept">
  <excerpt>Thieves are not known but the source of their information is thought to be internal.</excerpt>
</document_reference>
<document_reference name="Incompatible networks" contributor="Shamal Faily" document="Island mindset GT concept">
  <excerpt>The old and new SCADA networks are incompatible.</excerpt>
</document_reference>
<document_reference name="Site sufficiency" contributor="Shamal Faily" document="Island mindset GT concept">
  <excerpt>Apart from periodic access to a document or contact details - everything an operator needs is on site.</excerpt>
</document_reference>
<document_reference name="Infection only from engineers" contributor="Shamal Faily" document="Island mindset GT concept">
  <excerpt>A system only gets infected if an engineer connects their own infected laptop into it.</excerpt>
</document_reference>
<document_reference name="Stand-alone SCADA" contributor="Shamal Faily" document="Island mindset GT concept">
  <excerpt>Systems are stand-alone because they are not connected a network.</excerpt>
</document_reference>
<document_reference name="Untimely logout annoyance" contributor="Shamal Faily" document="ICT non-support GT concept">
  <excerpt>It is annoying to nip downstairs and have to log back in when you come back.</excerpt>
</document_reference>
<document_reference name="Lack of night ICT support" contributor="Shamal Faily" document="ICT non-support GT concept">
  <excerpt>Why have night support if all you get is a logged reference number; you cannot hand the problem over to someone else.</excerpt>
</document_reference>
<document_reference name="No out-of-office facility " contributor="Shamal Faily" document="ICT non-support GT concept">
  <excerpt>Managers can set out-of-office messages; plant operators cannot.</excerpt>
</document_reference>
<document_reference name="Account lockout callout" contributor="Shamal Faily" document="ICT non-support GT concept">
  <excerpt>An account lock-out at night necessitates calling someone out to log them back in to carry out operations.</excerpt>
</document_reference>
<document_reference name="Construction security" contributor="Shamal Faily" document="Interim Systems GT concept">
  <excerpt>Security guards are in place while construction takes place.</excerpt>
</document_reference>
<document_reference name="Migration pending resources" contributor="Shamal Faily" document="Interim Systems GT concept">
  <excerpt>Old PC applications will be migrated to SCADA when time and money is available.</excerpt>
</document_reference>
<document_reference name="Shift based logouts" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>People want a shift based auto-logout feature.</excerpt>
</document_reference>
<document_reference name="No SCADA logouts" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>No-one logs out of the current SCADA environment.</excerpt>
</document_reference>
<document_reference name="Short auto logout" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>Automatic logout occurs after a minute or two of inactivity.</excerpt>
</document_reference>
<document_reference name="Current login indicator" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>Corner of SCADA panel indicates who is currently logged.</excerpt>
</document_reference>
<document_reference name="Inactivity based logout" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>Automatic logout occurs if you are not doing work for any length of time.</excerpt>
</document_reference>
<document_reference name="Reboot locking workaround" contributor="Shamal Faily" document="Logout policy GT concept">
  <excerpt>System can be rebooted if someone has logged in; you cannot log them out.</excerpt>
</document_reference>
<document_reference name="Standards evolved over years" contributor="Shamal Faily" document="Local standards GT concept">
  <excerpt>Standards have been setup over the years.</excerpt>
</document_reference>
<document_reference name="Uncertainty about EnterpriseSCADA ability to support general operations." contributor="Shamal Faily" document="Limited support knowledge GT concept">
  <excerpt>Uncertainty about EnterpriseSCADA capabilities towards supporting general operations.</excerpt>
</document_reference>
<document_reference name="Concern about lack of training on EnterpriseSCADA." contributor="Shamal Faily" document="Limited support knowledge GT concept">
  <excerpt>Lack of training on new systems past warranty period a concern.</excerpt>
</document_reference>
<document_reference name="Little knowledge about long-term EnterpriseSCADA impact" contributor="Shamal Faily" document="Limited support knowledge GT concept">
  <excerpt>Not enough information on longer-term impact has been filtered down.</excerpt>
</document_reference>
<document_reference name="Bespoke systems harder to understand and support." contributor="Shamal Faily" document="Limited support knowledge GT concept">
  <excerpt>Bespoke systems have problems that it takes a while to understand how it has been programmed.</excerpt>
</document_reference>
<document_reference name="Only some sites are manned" contributor="Shamal Faily" document="Operational contexts GT concept">
  <excerpt>Some sites are manned; others are unmanned.</excerpt>
</document_reference>
<document_reference name="Specs for clean and waste water are different" contributor="Shamal Faily" document="Operational contexts GT concept">
  <excerpt>Sewage plants have different specs to cleanwater plants.</excerpt>
</document_reference>
<document_reference name="More time is spent in the control room at night" contributor="Shamal Faily" document="Operational contexts GT concept">
  <excerpt>More time is spent in the control room during the twilight hours.</excerpt>
</document_reference>
<document_reference name="Some plant operations are cheaper at night." contributor="Shamal Faily" document="Operational contexts GT concept">
  <excerpt>Pumps are run from some districts at night because the electricity is cheaper.</excerpt>
</document_reference>
<document_reference name="Fixes problems identified by SCADA" contributor="Shamal Faily" document="One-man site GT concept">
  <excerpt>Goes out to fix something he sees is wrong on the SCADA.</excerpt>
</document_reference>
<document_reference name="Manual intervention hard with one person." contributor="Shamal Faily" document="One-man site GT concept">
  <excerpt>If the system freezes - can work directly off the pumps but difficult with just one person.</excerpt>
</document_reference>
<document_reference name="Plant can be operated away from the control room if necessary." contributor="Shamal Faily" document="One-man site GT concept">
  <excerpt>Can run things from the other side of the plant; this is necessary when you are on your own.</excerpt>
</document_reference>
<document_reference name="Security is concern when working on your own." contributor="Shamal Faily" document="One-man site GT concept">
  <excerpt>Working on a one-man site is a security concern.</excerpt>
</document_reference>
<document_reference name="Few SCADA to EnterpriseSCADA process changes" contributor="Shamal Faily" document="Process impact GT concept">
  <excerpt>Few process changes expected when old SCADA systems replaced with EnterpriseSCADA.</excerpt>
</document_reference>
<document_reference name="Process problems occur daily." contributor="Shamal Faily" document="Process impact GT concept">
  <excerpt>Process problems occur daily.</excerpt>
</document_reference>
<document_reference name="Anything could happen" contributor="Shamal Faily" document="Process impact GT concept">
  <excerpt>Anything could happen: pumps could fail; water quality can change within 10 minutes</excerpt>
</document_reference>
<document_reference name="Theft causes pumping station failure" contributor="Shamal Faily" document="Process impact GT concept">
  <excerpt>Stealing parts and cutting cables can cause pumping station failures.</excerpt>
</document_reference>
<document_reference name="Customisable logout periods" contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>Logout periods can be setup as part of EnterpriseSCADA</excerpt>
</document_reference>
<document_reference name="HMI usability improvements" contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>The new SCADA system is an improvement because there are only slight differences to the MMI.</excerpt>
</document_reference>
<document_reference name="Quick and automatic startup" contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>The workstation has been setup so as soon as Windows starts then so does EnterpriseSCADA (as a service); no user interaction is needed.</excerpt>
</document_reference>
<document_reference name="Alarm pager " contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>In the past: a Chlorine alarm was setup by configuring the LPT to a pager.</excerpt>
</document_reference>
<document_reference name="Efficient functionality development" contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>Have become slicker at developing more functionality to perform more operations.</excerpt>
</document_reference>
<document_reference name="Room for improvement" contributor="Shamal Faily" document="Process Innovation GT concept">
  <excerpt>There is always scope to improve and automate as we go along.</excerpt>
</document_reference>
<document_reference name="Personal threats" contributor="Shamal Faily" document="Personal Security GT concept">
  <excerpt>Personal experience of being threatened when called out late at night and challenging intruders.</excerpt>
</document_reference>
<document_reference name="Lone worker vulnerability" contributor="Shamal Faily" document="Personal Security GT concept">
  <excerpt>Lone Working system is based on calling up someone when they get to a station; it does not help if you get problems on the way.</excerpt>
</document_reference>
<document_reference name="No alone out-of-hours visits" contributor="Shamal Faily" document="Personal Security GT concept">
  <excerpt>Never go alone when visiting a nearby site out-of-hours</excerpt>
</document_reference>
<document_reference name="Water is sampled throughout the works" contributor="Shamal Faily" document="Sample collection GT concept">
  <excerpt>All aspects of the water down in the works is sampled.</excerpt>
</document_reference>
<document_reference name="Manual checks determine who to call out." contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Looks at drive problems to determine who to call out.</excerpt>
</document_reference>
<document_reference name="Alarms designed around past experience" contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Software people asked to set up alarms based on past problems forgetting about alarms.</excerpt>
</document_reference>
<document_reference name="Records piece things together" contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Records are kept to help piece things together when things go wrong.</excerpt>
</document_reference>
<document_reference name="Experience contributes to asset management decisions." contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Experience about what goes wrong contributes to asset purchase decisions via AJS.</excerpt>
</document_reference>
<document_reference name="Familiarity with colour scheme standards." contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>People coming in from different plant are familiar with colour schemes.</excerpt>
</document_reference>
<document_reference name="Trouble-shooting driven by known task problems." contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Knowledge about coagulant problems leads to particular tasks being carried out e.g. flushing lines; to get everything back to normal.</excerpt>
</document_reference>
<document_reference name="Checking certain things is a discipline" contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Checking certain things e.g. coagulant levels is a discipline.</excerpt>
</document_reference>
<document_reference name="Works manual is internalised" contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Works manual has been internalised.</excerpt>
</document_reference>
<document_reference name="Plant knowledge gained by frequent call-outs." contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>People who get called out often know their way around the plant.</excerpt>
</document_reference>
<document_reference name="Status board communicates problems" contributor="Shamal Faily" document="Site knowledge GT concept">
  <excerpt>Status board is used to communicate problems with bits of kit.</excerpt>
</document_reference>
<document_reference name="Processes checked against spec" contributor="Shamal Faily" document="Scope of responsibility GT concept">
  <excerpt>Check the process and quality of final effluent meets critical parameters with EA specs.</excerpt>
</document_reference>
<document_reference name="Site kept running at optimum efficiency" contributor="Shamal Faily" document="Scope of responsibility GT concept">
  <excerpt>Keep site running at optimum efficiency</excerpt>
</document_reference>
<document_reference name="Water entering plant checked against spec" contributor="Shamal Faily" document="Scope of responsibility GT concept">
  <excerpt>Make sure water is in-spec coming into the plant.</excerpt>
</document_reference>
<document_reference name="Tasks are circadian." contributor="Shamal Faily" document="Scope of responsibility GT concept">
  <excerpt>Mainly monitoring.  By day; taking and ordering deliveries; noticing; checking and reacting to alarms.</excerpt>
</document_reference>
<document_reference name="Only relevant sites are monitored" contributor="Shamal Faily" document="Scope of responsibility GT concept">
  <excerpt>Only pump stations relevant to the plant are monitored.</excerpt>
</document_reference>
<document_reference name="Vandalism assessed and mitigated" contributor="Shamal Faily" document="Site threats GT concept">
  <excerpt>Vandalism has already been assessed and mitigated.</excerpt>
</document_reference>
<document_reference name="Copper theft" contributor="Shamal Faily" document="Site threats GT concept">
  <excerpt>Sites have been broken into to steal earth connections and put through mains to get at copper.</excerpt>
</document_reference>
<document_reference name="Thieves steal anything" contributor="Shamal Faily" document="Site threats GT concept">
  <excerpt>Thieves will steal anything.</excerpt>
</document_reference>
<document_reference name="Land-rover theft" contributor="Shamal Faily" document="Site threats GT concept">
  <excerpt>A few land-rovers have been stolen at Waterdeep.</excerpt>
</document_reference>
<document_reference name="Trends identify plant problems" contributor="Shamal Faily" document="Trend monitoring GT concept">
  <excerpt>Trends are used to identify plant problems.</excerpt>
</document_reference>
<document_reference name="Instruments manually checked if trends flatline" contributor="Shamal Faily" document="Trend monitoring GT concept">
  <excerpt>Instruments are manually checked if the trends flatline.</excerpt>
</document_reference>
<document_reference name="Checks take place at certain times of the day" contributor="Shamal Faily" document="Trend monitoring GT concept">
  <excerpt>Checks are monitored throughout the works at certain times during the day.</excerpt>
</document_reference>
<document_reference name="Drifting trends indicate problems" contributor="Shamal Faily" document="Trend monitoring GT concept">
  <excerpt>Trends drifting off are an indication that something has gone out of sync.</excerpt>
</document_reference>
<document_reference name="Capturing who change what and why is useful" contributor="Shamal Faily" document="Unexplained feature GT concept">
  <excerpt>Useful to capture who has made what changes and why.</excerpt>
</document_reference>
<document_reference name="Not certain where some computers have come from" contributor="Shamal Faily" document="Unexplained feature GT concept">
  <excerpt>Not certain where some computers have come from but these are used for checking email and documents.</excerpt>
</document_reference>
<document_reference name="Many desktop short-cuts do not get used." contributor="Shamal Faily" document="Unexplained feature GT concept">
  <excerpt>Most short-cuts and applications on the desktop have been around a while and do not get used.</excerpt>
</document_reference>
<document_reference name="Non-authorised applications cannot be run" contributor="Shamal Faily" document="Unexplained feature GT concept">
  <excerpt>Not being able to run applications means not authorised to use it.</excerpt>
</document_reference>
<document_reference name="Extreme scenarios" contributor="Shamal Faily" document="Unlikely threats GT concept">
  <excerpt>Scenarios of corrupt or missing files taking out a workstation are a bit extreme.</excerpt>
</document_reference>
<document_reference name="Different processes and teams for incoming water flow" contributor="Shamal Faily" document="Water GT concept">
  <excerpt>Water flows in and is separated into different processes; dealt with by different teams</excerpt>
</document_reference>
<document_reference name="Water scheme is geographically big" contributor="Shamal Faily" document="Water GT concept">
  <excerpt>The scheme covers where water is sourced 40 miles away; it has a long way to get to the works.</excerpt>
</document_reference>
<document_reference name="Levels are logged" contributor="Shamal Faily" document="Works diary GT concept">
  <excerpt>Levels are recorded in a log.</excerpt>
</document_reference>
<document_reference name="Logs are a paper trail" contributor="Shamal Faily" document="Works diary GT concept">
  <excerpt>Logs are a paper trail.</excerpt>
</document_reference>
<document_reference name="Notes are easier to read and hand-over" contributor="Shamal Faily" document="Works diary GT concept">
  <excerpt>Easier to write things on notes.  Also easier for person handed over to to just read the logs.</excerpt>
</document_reference>
<document_reference name="Only general work and failures are logged" contributor="Shamal Faily" document="Works diary GT concept">
  <excerpt>Supposed to write down everything but not enough pages; any general work carried out is logged - together with failures.</excerpt>
</document_reference>
<document_reference name="Carries out tasks and records set-point readings" contributor="Shamal Faily" document="Work routine GT concept">
  <excerpt>Looks at tasks needed to be achieved in a day and set-points to be collected and recorded.</excerpt>
</document_reference>
<document_reference name="Specific jobs are day shift related" contributor="Shamal Faily" document="Work routine GT concept">
  <excerpt>Specific jobs are assigned to the day shift e.g. ordering chemicals</excerpt>
</document_reference>
<document_reference name="Night shift tasks differ slightly from day." contributor="Shamal Faily" document="Work routine GT concept">
  <excerpt>Night shift tasks may be similar but slight different due to SAS sampling</excerpt>
</document_reference>
<document_reference name="Operators know what they need to do." contributor="Shamal Faily" document="Work routine GT concept">
  <excerpt>Operators come in and know what work they need to do.</excerpt>
</document_reference>
<document_reference name="People move around between shifts" contributor="Shamal Faily" document="Work shifts GT concept">
  <excerpt>People are moved around sites between shifts.</excerpt>
</document_reference>

<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Often" >
  <definition>Personal safety is an infosec hygiene factor</definition>
  <grounds type="document" reference="Personal threats" />
  <grounds type="document" reference="Lone worker vulnerability" />
  <warrant type="document" reference="InfoSec communiques irrelevant" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Usually" >
  <definition>Personal safety is more than just compliance</definition>
  <grounds type="document" reference="No alone out-of-hours visits" />
  <warrant type="document" reference="MS workaround for intruder alarms." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Always" >
  <definition>Following MS is part of the daily work routine.</definition>
  <grounds type="document" reference="MS activities during start of day shift." />
  <warrant type="document" reference="The works diary is a controlled document." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Motivations" modal_qualifier="Usually" >
  <definition>Feel unsafe challenging intruders</definition>
  <grounds type="document" reference="Copper theft" />
  <grounds type="document" reference="Thieves steal anything" />
  <warrant type="document" reference="Personal threats" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Often" >
  <definition>Thieves do not care about their impact</definition>
  <grounds type="document" reference="Vandalism assessed and mitigated" />
  <grounds type="document" reference="Copper theft" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Motivations" modal_qualifier="Always" >
  <definition>Need to communicate and log to be ready for anything</definition>
  <grounds type="document" reference="Records piece things together" />
  <grounds type="document" reference="Status board communicates problems" />
  <warrant type="document" reference="Anything could happen" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>Managers need to authorise what they can and cannot do</definition>
  <grounds type="document" reference="Role restrictions" />
  <warrant type="document" reference="Line manager site authorisation" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Occasionally" >
  <definition>Cannot see how big security problems relate to infosec communications.</definition>
  <grounds type="document" reference="Physical and login security" />
  <grounds type="document" reference="Corporate wifi insecurity" />
  <warrant type="document" reference="Periodic national security alerts" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Probably" >
  <definition>SCADA isolation makes hacking unlikely</definition>
  <grounds type="document" reference="Hacking indifference" />
  <grounds type="document" reference="Infection only from engineers" />
  <warrant type="document" reference="Stand-alone SCADA" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Always" >
  <definition>Logout policies should be built around security needs.</definition>
  <grounds type="document" reference="Shift based logouts" />
  <grounds type="document" reference="Short auto logout" />
  <warrant type="document" reference="Physical and login security" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Probably" >
  <definition>Standard migration subject to resources</definition>
  <grounds type="document" reference="Migration pending resources" />
  <warrant type="document" reference="Hacking indifference" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Generally" >
  <definition>Accidents happen but hacking scenarios are extreme.</definition>
  <grounds type="document" reference="Extreme scenarios" />
  <warrant type="document" reference="Hacking indifference" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Generally" >
  <definition>Aware of hacking warnings but scenarios are extreme</definition>
  <grounds type="document" reference="Extreme scenarios" />
  <grounds type="document" reference="Hacker aware" />
  <warrant type="document" reference="Hacking indifference" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Often" >
  <definition>Design decisions built around past experience</definition>
  <grounds type="document" reference="Alarms designed around past experience" />
  <grounds type="document" reference="Familiarity with colour scheme standards." />
  <warrant type="document" reference="Room for improvement" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Hopefully" >
  <definition>Hoping for productivity improvements without adverse impact</definition>
  <grounds type="document" reference="HMI usability improvements" />
  <grounds type="document" reference="Quick and automatic startup" />
  <warrant type="document" reference="Few SCADA to EnterpriseSCADA process changes" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Often" >
  <definition>ICT support not contextual</definition>
  <grounds type="document" reference="Untimely logout annoyance" />
  <grounds type="document" reference="Lack of night ICT support" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Occasionally" >
  <definition>Liases with TIS technicians and the Environmental Agency</definition>
  <grounds type="document" reference="Environmental Agency carry out river monitoring" />
  <grounds type="document" reference="Out-of-spec alarms precipitate TIS call-outs" />
  <warrant type="document" reference="Anything could happen" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Occasionally" >
  <definition>Process decisions may be weather based.</definition>
  <grounds type="document" reference="Pumping decisions rain based" />
  <grounds type="document" reference="Failures often occur when seasons change." />
  <warrant type="document" reference="Massive and uncontrollable water input" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Generally" >
  <definition>Area of responsibility is large and unpredictable</definition>
  <grounds type="document" reference="Water scheme is geographically big" />
  <grounds type="document" reference="Process problems occur daily." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Always" >
  <definition>Frequently control plan outside the control room</definition>
  <grounds type="document" reference="Plant can be operated away from the control room if necessary." />
  <warrant type="document" reference="Process problems occur daily." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Attitudes" modal_qualifier="Generally" >
  <definition>Concern about EnterpriseSCADA uncertainty</definition>
  <grounds type="document" reference="Uncertainty about EnterpriseSCADA ability to support general operations." />
  <grounds type="document" reference="Bespoke systems harder to understand and support." />
  <warrant type="document" reference="Process problems occur daily." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Generally" >
  <definition>Standards have been internalised</definition>
  <grounds type="document" reference="Standards evolved over years" />
  <warrant type="document" reference="Works manual is internalised" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Often" >
  <definition>Unknown applications are not authorised</definition>
  <grounds type="document" reference="Many desktop short-cuts do not get used." />
  <grounds type="document" reference="Non-authorised applications cannot be run" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Motivations" modal_qualifier="" >
  <definition>Event logging helps efficiency</definition>
  <grounds type="document" reference="Experience contributes to asset management decisions." />
  <grounds type="document" reference="Trouble-shooting driven by known task problems." />
  <warrant type="document" reference="Site kept running at optimum efficiency" />
  <warrant type="document" reference="Checking certain things is a discipline" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>Processes regularly checked against spec</definition>
  <grounds type="document" reference="Processes checked against spec" />
  <grounds type="document" reference="Water entering plant checked against spec" />
  <warrant type="document" reference="Operators know what they need to do." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Generally" >
  <definition>Routine varies by time of day</definition>
  <grounds type="document" reference="Specific jobs are day shift related" />
  <grounds type="document" reference="Night shift tasks differ slightly from day." />
  <warrant type="document" reference="Some plant operations are cheaper at night." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>Readings periodically taken from SCADA</definition>
  <grounds type="document" reference="Readings are taken from SCADA screens." />
  <grounds type="document" reference="Carries out tasks and records set-point readings" />
  <warrant type="document" reference="Operators know what they need to do." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>React to alarms raised by SCADA</definition>
  <grounds type="document" reference="Callouts occur for anything other than a basic trip." />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>General work and events written to Work Diary</definition>
  <grounds type="document" reference="Notes are easier to read and hand-over" />
  <grounds type="document" reference="Only general work and failures are logged" />
  <warrant type="document" reference="Everything is logged" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>Samples are taken throughout the work and recorded</definition>
  <grounds type="document" reference="Water is sampled throughout the works" />
  <warrant type="document" reference="Carries out tasks and records set-point readings" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Aptitudes" modal_qualifier="Usually" >
  <definition>Trends regularly checked to spot problems</definition>
  <grounds type="document" reference="Checks take place at certain times of the day" />
  <grounds type="document" reference="Drifting trends indicate problems" />
  <warrant type="document" reference="Trends identify plant problems" />
</persona_characteristic>
<persona_characteristic persona="Rick" behavioural_variable="Activities" modal_qualifier="Always" >
  <definition>Scheduled tasks issued by AJS</definition>
  <grounds type="document" reference="Tasks entered into AJS are captured by WMS" />
  <warrant type="document" reference="Carries out tasks and records set-point readings" />
</persona_characteristic>

</usability>
</cairis_model>

redpajama_set_name: RedPajamaGithub


text:
package org.javafunk.funk;

import org.javafunk.funk.functors.functions.NullaryFunction;

import static org.javafunk.funk.Eagerly.any;
import static org.javafunk.funk.Exceptions.nullPointerFactory;
import static org.javafunk.funk.Predicates.equalTo;

public class Checks {
    public static <T> T returnOrThrowIfNull(T value, NullaryFunction<? extends RuntimeException> exceptionFactory) {
        return orThrowIf(value, value == null, exceptionFactory);
    }

    public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty(
            T value, NullaryFunction<? extends RuntimeException> exceptionFactory) {
        return orThrowIf(
                value,
                !value.iterator().hasNext(),
                exceptionFactory);
    }

    public static <S, T extends Iterable<S>> T returnOrThrowIfContainsNull(T iterable) {
        return orThrowIf(
                iterable,
                any(iterable, equalTo(null)),
                nullPointerFactory());
    }

    private static <T> T orThrowIf(T value, boolean condition, NullaryFunction<? extends RuntimeException> exceptionFactory) {
        throwIf(condition, exceptionFactory);
        return value;
    }

    private static void throwIf(boolean condition, NullaryFunction<? extends RuntimeException> exceptionFactory) {
        if (condition) throw exceptionFactory.call();
    }
}


text:
/***********************************************************************
    created:	3/2/2005
    author:		Paul D Turner
*************************************************************************/
/***************************************************************************
 *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
 *
 *   Permission is hereby granted, free of charge, to any person obtaining
 *   a copy of this software and associated documentation files (the
 *   "Software"), to deal in the Software without restriction, including
 *   without limitation the rights to use, copy, modify, merge, publish,
 *   distribute, sublicense, and/or sell copies of the Software, and to
 *   permit persons to whom the Software is furnished to do so, subject to
 *   the following conditions:
 *
 *   The above copyright notice and this permission notice shall be
 *   included in all copies or substantial portions of the Software.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *   OTHER DEALINGS IN THE SOFTWARE.
 ***************************************************************************/
#ifndef _CEGUISpinner_h_
#define _CEGUISpinner_h_

#include "../Window.h"

namespace CEGUI
{
/*!
\brief
    Base class for the Spinner widget.

    The spinner widget has a text area where numbers may be entered
    and two buttons which may be used to increase or decrease the
    value in the text area by a user specified amount.
*/
class CEGUIEXPORT Spinner : public Window
{
public:

    // For easier changing or templating in the future
    using value_type = double;

    //! \brief Enumerated type specifying possible input and/or display modes for the spinner.
    enum class TextInputMode : int
    {
        FloatingPoint,  //!< Floating point decimal.
        Integer,        //!< Integer decimal.
        Hexadecimal,    //!< Hexadecimal.
        Octal,          //!< Octal.
        Invalid = -1    //!< Used internally for correct initial setup.
    };

    /*************************************************************************
        Events system constants
    *************************************************************************/
    static const String WidgetTypeName;                 //!< Window factory name
    static const String EventNamespace;                 //!< Namespace for global events
    /** Event fired when the spinner current value changes.
        * Handlers are passed a const WindowEventArgs reference with
        * WindowEventArgs::window set to the Spinner whose current value has
        * changed.
        */
    static const String EventValueChanged;
    /** Event fired when the minimum spinner value is changed.
        * Handlers are passed a const WindowEventArgs reference with
        * WindowEventArgs::windows set to the Spinner whose minimum value has
        * been changed.
        */
    static const String EventMinimumValueChanged;
    /** Event fired when the maximum spinner value is changed.
        * Handlers are passed a const WindowEventArgs reference with
        * WindowEventArgs::window set to the Spinner whose maximum value has
        * been changed.
        */
    static const String EventMaximumValueChanged;
    /** Event fired when the spinner step value is changed.
        * Handlers area passed a const WindowEventArgs reference with
        * WindowEventArgs::window set to the Spinner whose step value has
        * changed.
        */
    static const String EventStepChanged;
    /** Event fired when the spinner text input & display mode is changed.
        * Handlers are passed a const WindowEventArgs reference with
        * WindowEventArgs::window set to the Spinner whose text mode has been
        * changed.
        */
    static const String EventTextInputModeChanged;

    /*************************************************************************
        Component widget name strings
    *************************************************************************/
    static const String EditboxName;          //!< Widget name for the editbox thumb component.
    static const String IncreaseButtonName;   //!< Widget name for the increase button component.
    static const String DecreaseButtonName;   //!< Widget name for the decrease button component.

    Spinner(const String& type, const String& name);

    //! \copydoc Window::initialiseComponents
    void initialiseComponents() override;

    //! \brief Return the current spinner value.
    value_type getCurrentValue() const { return d_currentValue; }

    //! \brief Return the current minimum limit value for the Spinner.
    value_type getMinimumValue() const { return d_minValue; }

    //! \brief Return the current maximum limit value for the Spinner.
    value_type getMaximumValue() const { return d_maxValue; }

    //! \brief Return the value added to the spinner vaue when the up / down buttons are clicked.
    value_type getStepSize() const { return d_stepSize; }

    //! \brief Return the number of decimal places for the string representation.
    int getPrecision() const { return d_precision; }

    //! \brief Return the current text input / display mode setting.
    TextInputMode getTextInputMode() const { return d_inputMode; }

    //! \brief Return the fraction of the current value between min (0) and max (1).
    float getValueFraction() const { return static_cast<float>(d_currentValue - d_minValue) / static_cast<float>(d_maxValue - d_minValue); }

    /*!
    \brief
        Set the current spinner value.

    \param value
        value to be assigned to the Spinner.
    */
    void setCurrentValue(value_type value);

    /*!
    \brief
        Set the spinner minimum value.

    \param minValue
        The minimum value to be allowed by the spinner.
    */
    void setMinimumValue(value_type minValue);

    /*!
    \brief
        Set the spinner maximum value.

    \param maxValue
        The maximum value to be allowed by the spinner.
    */
    void setMaximumValue(value_type maxValue);

    /*!
    \brief
        Set the current step value.

    \param step
        The value added to be the spinner value when the
        up / down buttons are clicked.
    */
    void setStepSize(value_type step);

    /*!
    \brief
        Set precision (number of decimal places)

    \param val
        The floating point precision using by the spinner.
    */
    void setPrecision(int val);

    /*!
    \brief
        Set the spinner input / display mode.

    \param mode
        One of the TextInputMode enumerated values indicating the text
        input / display mode to be used by the spinner.
    */
    void setTextInputMode(TextInputMode mode);

protected:
    /*************************************************************************
        Constants
    *************************************************************************/
    static const String FloatValidator;      //!< Validator regex used for floating point mode.
    static const String IntegerValidator;    //!< Validator regex used for decimal integer mode.
    static const String HexValidator;        //!< Validator regex used for hexadecimal mode.
    static const String OctalValidator;      //!< Validator regex used for octal mode.

    /*************************************************************************
        Protected Implementation Methods
    *************************************************************************/
    /*!
    \brief
        Returns the numerical representation of the current editbox text.

    \return
        value that is the numerical equivalent of the editbox text.

    \exception InvalidRequestException  thrown if the text can not be converted.
    */
    virtual value_type getValueFromText() const;

    /*!
    \brief
        Returns the textual representation of the current spinner value.

    \return
        String object that is equivalent to the the numerical value of the spinner.
    */
    virtual String getTextFromValue() const;

    /*!
    \brief
        Return a pointer to the 'increase' PushButtoncomponent widget for
        this Spinner.

    \return
        Pointer to a PushButton object.

    \exception UnknownObjectException
        Thrown if the increase PushButton component does not exist.
    */
    PushButton* getIncreaseButton() const;

    /*!
    \brief
        Return a pointer to the 'decrease' PushButton component widget for
        this Spinner.

    \return
        Pointer to a PushButton object.

    \exception UnknownObjectException
        Thrown if the 'decrease' PushButton component does not exist.
    */
    PushButton* getDecreaseButton() const;

    /*!
    \brief
        Return a pointer to the Editbox component widget for this Spinner.

    \return
        Pointer to a Editbox object.

    \exception UnknownObjectException
        Thrown if the Editbox component does not exist.
    */
    Editbox* getEditbox() const;

    /*************************************************************************
        Overrides for Event handler methods
    *************************************************************************/
    void onFontChanged(WindowEventArgs& e) override;
    void onTextChanged(WindowEventArgs& e) override;
    void onActivated(ActivationEventArgs& e) override;
    void onScroll(ScrollEventArgs& e) override;
    void onKeyDown(KeyEventArgs& e) override;

    /*************************************************************************
        New Event handler methods
    *************************************************************************/
    /*!
    \brief
        Method called when the spinner value changes.

    \param e
        WindowEventArgs object containing any relevant data.
    */
    virtual void onValueChanged(WindowEventArgs& e);

    /*!
    \brief
        Method called when the minimum value setting changes.

    \param e
        WindowEventArgs object containing any relevant data.
    */
    virtual void onMinimumValueChanged(WindowEventArgs& e);

    /*!
    \brief
        Method called when the maximum value setting changes.

    \param e
        WindowEventArgs object containing any relevant data.
    */
    virtual void onMaximumValueChanged(WindowEventArgs& e);

    /*!
    \brief
        Method called when the step value changes.

    \param e
        WindowEventArgs object containing any relevant data.
    */
    virtual void onStepChanged(WindowEventArgs& e);

    /*!
    \brief
        Method called when the text input/display mode is changed.

    \param e
        WindowEventArgs object containing any relevant data.
    */
    virtual void onTextInputModeChanged(WindowEventArgs& e);

    /*************************************************************************
        Internal event listener methods
    *************************************************************************/
    bool handleIncreaseButton(const EventArgs& e);
    bool handleDecreaseButton(const EventArgs& e);
    bool handleEditTextChange(const EventArgs& e);

    /*************************************************************************
        Data Fields
    *************************************************************************/
    value_type    d_currentValue = 1.0;                 //!< Numerical copy of the text in d_editbox.
    value_type    d_minValue = -32768.0;                //!< Minimum value for spinner.
    value_type    d_maxValue = 32767.0;                 //!< Maximum value for spinner.
    value_type    d_stepSize = 1.0;                     //!< Step size value used y the increase & decrease buttons.
    int           d_precision = 6;                      //!< precision (number of decimal places)
    TextInputMode d_inputMode = TextInputMode::Invalid; //!< Current text display/input mode.

private:

    void addSpinnerProperties();
    void updateEditboxText();
};

template<>
class PropertyHelper<Spinner::TextInputMode>
{
public:
    typedef Spinner::TextInputMode return_type;
    typedef return_type safe_method_return_type;
    typedef Spinner::TextInputMode pass_type;
    typedef String string_return_type;

    static const String& getDataTypeName()
    {
        static const String type("TextInputMode");
        return type;
    }

    static return_type fromString(const String& str)
    {
        if (str == "FloatingPoint")
            return Spinner::TextInputMode::FloatingPoint;
        else if (str == "Hexadecimal")
            return Spinner::TextInputMode::Hexadecimal;
        else if (str == "Octal")
            return Spinner::TextInputMode::Octal;
        else if (str == "Invalid")
            return Spinner::TextInputMode::Invalid;
        else
            return Spinner::TextInputMode::Integer;
    }

    static string_return_type toString(pass_type val)
    {
        switch (val)
        {
            case Spinner::TextInputMode::FloatingPoint: return "FloatingPoint";
            case Spinner::TextInputMode::Integer: return "Integer";
            case Spinner::TextInputMode::Hexadecimal: return "Hexadecimal";
            case Spinner::TextInputMode::Octal: return "Octal";
            case Spinner::TextInputMode::Invalid: return "Invalid";
            default:
            {
                assert(false && "Unknown Text Input Mode");
                return "FloatingPoint";
            }
        }
    }
};

} // End of  CEGUI namespace section

#endif	// end of guard _CEGUISpinner_h_


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Remotion.Linq.Collections;
using Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation.PredefinedTransformations;
using Remotion.Linq.Utilities;

namespace Remotion.Linq.Parsing.ExpressionTreeVisitors.Transformation
{
  /// <summary>
  /// Manages registration and lookup of <see cref="IExpressionTransformer{T}"/> objects, and converts them to
  /// weakly typed <see cref="ExpressionTransformation"/> instances. Use this class together with <see cref="TransformingExpressionTreeVisitor"/>
  /// in order to apply the registered transformers to an <see cref="Expression"/> tree.
  /// </summary>
  public class ExpressionTransformerRegistry : IExpressionTranformationProvider
  {
    /// <summary>
    /// Creates an <see cref="ExpressionTransformerRegistry"/> with the default transformations provided by this library already registered.
    /// New transformers can be registered by calling <see cref="Register{T}"/>.
    /// </summary>
    /// <returns> A default <see cref="ExpressionTransformerRegistry"/>.</returns>
    /// <remarks>
    /// Currently, the default registry contains:
    /// <list type="bullet">
    /// <item><see cref="VBCompareStringExpressionTransformer"/></item>
    /// <item><see cref="VBInformationIsNothingExpressionTransformer"/></item>
    /// <item><see cref="InvocationOfLambdaExpressionTransformer"/></item>
    /// <item><see cref="NullableValueTransformer"/></item>
    /// <item><see cref="KeyValuePairNewExpressionTransformer"/></item>
    /// <item><see cref="DictionaryEntryNewExpressionTransformer"/></item>
    /// <item><see cref="TupleNewExpressionTransformer"/></item>
    /// </list>
    /// </remarks>
    public static ExpressionTransformerRegistry CreateDefault ()
    {
      var registry = new ExpressionTransformerRegistry();
      registry.Register (new VBCompareStringExpressionTransformer ());
      registry.Register (new VBInformationIsNothingExpressionTransformer ());
      registry.Register (new InvocationOfLambdaExpressionTransformer ());
      registry.Register (new NullableValueTransformer ());

      registry.Register (new KeyValuePairNewExpressionTransformer());
      registry.Register (new DictionaryEntryNewExpressionTransformer());
      registry.Register (new TupleNewExpressionTransformer());

      return registry;
    }

    private readonly MultiDictionary<ExpressionType, ExpressionTransformation> _transformations =
        new MultiDictionary<ExpressionType, ExpressionTransformation>();

    private readonly List<ExpressionTransformation> _genericTransformations = new List<ExpressionTransformation>();

    public int RegisteredTransformerCount
    {
      get { return _transformations.CountValues(); }
    }

    public ExpressionTransformation[] GetAllTransformations (ExpressionType expressionType)
    {
      return _transformations[expressionType].ToArray();
    }

    public IEnumerable<ExpressionTransformation> GetTransformations (Expression expression)
    {
      ArgumentUtility.CheckNotNull ("expression", expression);

      IList<ExpressionTransformation> matchingTransformations;
      _transformations.TryGetValue (expression.NodeType, out matchingTransformations);

      if (matchingTransformations != null)
        return matchingTransformations.Concat (_genericTransformations);
      else
        return _genericTransformations;
    }

    /// <summary>
    /// Registers the specified <see cref="IExpressionTransformer{T}"/> for the transformer's
    /// <see cref="IExpressionTransformer{T}.SupportedExpressionTypes"/>. If <see cref="IExpressionTransformer{T}.SupportedExpressionTypes"/>
    /// returns <see langword="null" />, the <paramref name="transformer"/> is registered as a generic transformer which will be applied to all
    /// <see cref="Expression"/> nodes.
    /// </summary>
    /// <typeparam name="T">The type of expressions handled by the <paramref name="transformer"/>. This should be a type implemented by all
    /// expressions identified by <see cref="IExpressionTransformer{T}.SupportedExpressionTypes"/>. For generic transformers, <typeparamref name="T"/>
    /// must be <see cref="Expression"/>.</typeparam>
    /// <param name="transformer">The transformer to register.</param>
    /// <remarks>
    /// <para>
    /// The order in which transformers are registered is the same order on which they will later be applied by
    /// <see cref="TransformingExpressionTreeVisitor"/>. When more than one transformer is registered for a certain <see cref="ExpressionType"/>,
    /// each of them will get a chance to transform a given <see cref="Expression"/>, until the first one returns a new <see cref="Expression"/>.
    /// At that point, the transformation will start again with the new <see cref="Expression"/> (and, if the expression's type has changed, potentially
    /// different transformers).
    /// </para>
    /// <para>
    /// When generic transformers are registered, they act as if they had been registered for all <see cref="ExpressionType"/> values (including
    /// custom ones). They will be applied in the order registered, but only after all respective specific transformers have run (without modifying
    /// the expression, which would restart the transformation process with the new expression as explained above).
    /// </para>
    /// <para>
    /// When an <see cref="IExpressionTransformer{T}"/> is registered for an incompatible <see cref="ExpressionType"/>, this is not detected until
    /// the transformer is actually applied to an <see cref="Expression"/> of that <see cref="ExpressionType"/>.
    /// </para>
    /// </remarks>
    public void Register<T> (IExpressionTransformer<T> transformer) where T: Expression
    {
      ArgumentUtility.CheckNotNull ("transformer", transformer);

      ExpressionTransformation transformation = expr => TransformExpression (expr, transformer);

      if (transformer.SupportedExpressionTypes == null)
      {
        if (typeof (T) != typeof (Expression))
        {
          var message = string.Format (
              "Cannot register an IExpressionTransformer<{0}> as a generic transformer. Generic transformers must implement "
              + "IExpressionTransformer<Expression>.",
              typeof (T).Name);
          throw new ArgumentException (message, "transformer");
        }

        _genericTransformations.Add (transformation);
      }
      else
      {
        foreach (var expressionType in transformer.SupportedExpressionTypes)
          _transformations.Add (expressionType, transformation);
      }
    }

    private static Expression TransformExpression<T> (Expression expression, IExpressionTransformer<T> transformer) where T: Expression
    {
      T castExpression;
      try
      {
        castExpression = (T) expression;
      }
      catch (InvalidCastException ex)
      {
        var message =
            string.Format (
                "A '{0}' with node type '{1}' cannot be handled by the IExpressionTransformer<{2}>. The transformer was probably registered for "
                + "a wrong ExpressionType.",
                expression.GetType().Name,
                expression.NodeType,
                typeof (T).Name);
        throw new InvalidOperationException (message, ex);
      }
      return transformer.Transform (castExpression);
    }
  }
}


text:
class MessageSelf < Message
  validates :text,
            :presence => true,
            format: { with: /\A[^\n]+\Z/ }
end


text:
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;

namespace Samples
{
	public sealed class Program
	{
		public static void Main(string[] args) => CreateWebHostBuilder(args).Build().Run();

		public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args).UseStartup<Startup>();
	}
}


text:
package export

import (
	"github.com/watermint/toolbox/domain/dropbox/api/dbx_auth"
	"github.com/watermint/toolbox/domain/dropbox/api/dbx_conn"
	"github.com/watermint/toolbox/domain/dropbox/model/mo_file"
	"github.com/watermint/toolbox/domain/dropbox/model/mo_path"
	"github.com/watermint/toolbox/domain/dropbox/service/sv_file_content"
	"github.com/watermint/toolbox/essentials/file/es_filemove"
	"github.com/watermint/toolbox/essentials/log/esl"
	mo_path2 "github.com/watermint/toolbox/essentials/model/mo_path"
	"github.com/watermint/toolbox/essentials/model/mo_string"
	"github.com/watermint/toolbox/infra/control/app_control"
	"github.com/watermint/toolbox/infra/recipe/rc_exec"
	"github.com/watermint/toolbox/infra/recipe/rc_recipe"
	"github.com/watermint/toolbox/infra/report/rp_model"
	"github.com/watermint/toolbox/quality/recipe/qtr_endtoend"
	"path/filepath"
)

type Doc struct {
	rc_recipe.RemarkExperimental
	Peer         dbx_conn.ConnScopedIndividual
	LocalPath    mo_path2.FileSystemPath
	DropboxPath  mo_path.DropboxPath
	OperationLog rp_model.RowReport
	Format       mo_string.OptionalString
}

func (z *Doc) Exec(c app_control.Control) error {
	l := c.Log()
	if err := z.OperationLog.Open(); err != nil {
		return err
	}

	export, path, err := sv_file_content.NewExport(z.Peer.Client()).Export(z.DropboxPath, sv_file_content.ExportFormat(z.Format.Value()))
	if err != nil {
		return err
	}
	dest := filepath.Join(z.LocalPath.Path(), export.ExportName)
	if err := es_filemove.Move(path.Path(), dest); err != nil {
		l.Debug("Unable to move file to specified path",
			esl.Error(err),
			esl.String("downloaded", path.Path()),
			esl.String("destination", dest),
		)
		return err
	}

	z.OperationLog.Row(export)

	return nil
}

func (z *Doc) Test(c app_control.Control) error {
	return rc_exec.ExecMock(c, &Doc{}, func(r rc_recipe.Recipe) {
		m := r.(*Doc)
		m.LocalPath = qtr_endtoend.NewTestFileSystemFolderPath(c, "export-doc")
		m.DropboxPath = qtr_endtoend.NewTestDropboxFolderPath("file-export-doc")
	})
}

func (z *Doc) Preset() {
	z.Peer.SetScopes(dbx_auth.ScopeFilesContentRead)
	z.OperationLog.SetModel(
		&mo_file.Export{},
		rp_model.HiddenColumns(
			"path_lower",
			"id",
			"revision",
			"content_hash",
			"export_hash",
		),
	)
}


text:
<!DOCTYPE html>

	<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<title>Carousel - prog</title>


text:
(function (global, factory) {
  if (typeof define === "function" && define.amd) {
    define(["foo"], factory);
  } else if (typeof exports !== "undefined") {
    factory(require("foo"));
  } else {
    var mod = {
      exports: {}
    };
    factory(global.foo);
    global.input = mod.exports;
  }
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) {
  "use strict";

  _foo["default imports"];
});


text:
package util

import (
	"bytes"
	"crypto/rand"
	"testing"

	"v.io/v23/vom"
	"v.io/x/ref/test/testutil"
)

func TestMacaroon(t *testing.T) {
	principal := testutil.NewPrincipal("correct")
	incorrectPrincipal := testutil.NewPrincipal("incorrect")
	input := randBytes(t)

	m, err := NewMacaroon(principal, input)
	if err != nil {
		t.Errorf("NewMacaroon failed: %v", err)
	}

	// Test incorrect key.
	decoded, err := m.Decode(incorrectPrincipal)
	if err == nil {
		t.Errorf("m.Decode should have failed")
	}
	if decoded != nil {
		t.Errorf("decoded value should be nil when decode fails")
	}

	// Test correct key.
	if decoded, err = m.Decode(principal); err != nil {
		t.Errorf("m.Decode should have succeeded")
	}
	if !bytes.Equal(decoded, input) {
		t.Errorf("decoded value should equal input")
	}
}

func TestBadMacaroon(t *testing.T) {
	p := testutil.NewPrincipal("correct")

	mValid, err := NewMacaroon(p, []byte("Hello"))
	if err != nil {
		t.Fatalf("NewMacaroon failed: %v", err)
	}

	// Modify the data, but keep the Signature.
	raw, _ := b64decode(string(mValid))
	var msg MacaroonMessage
	if err := vom.Decode(raw, &msg); err != nil {
		t.Fatalf("vom.Decode failed: %v", err)
	}
	msg.Data = []byte("World")
	v, err := vom.Encode(msg)
	if err != nil {
		t.Fatalf("vom.Encode failed: %v", err)
	}
	mBadData := Macaroon(b64encode(v))

	// Restore data, but change the Signature.
	msg.Data = []byte("Hello")
	msg.Sig.R[0] += 1

	if v, err = vom.Encode(msg); err != nil {
		t.Fatalf("vom.Encode failed: %v", err)
	}
	mBadSig := Macaroon(b64encode(v))

	tests := []Macaroon{
		mValid,         // valid
		mValid + "!!!", // invalid base64
		mValid[:5],     // truncated
		mBadData,       // modified data
		mBadSig,        // modified signature
		"",             // zero value
	}

	// Make sure that "valid" is indeed valid!
	if data, err := tests[0].Decode(p); err != nil || data == nil {
		t.Fatalf("Bad test data: Got (%v, %v), want (<non-empty>, nil)", data, err)
	}
	// And all others are not:
	for idx, test := range tests[1:] {
		if _, err := test.Decode(p); err == nil {
			t.Errorf("Should have failed to decode invalid macaroon #%d", idx)
		}
	}
}

func randBytes(t *testing.T) []byte {
	b := make([]byte, 16)
	if _, err := rand.Read(b); err != nil {
		t.Fatalf("bytes creation failed: %v", err)
	}
	return b
}


text:
<?php /* Smarty version Smarty-3.1.11, created on 2013-05-25 17:13:45
         compiled from "/var/www/hermes.sztaki.hu/hermes/moduls/templates/default/MainAnnotation.tpl" */ ?>
<?php /*%%SmartyHeaderCode:746085704514c9f6c7886d1-49483932%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' =>
  array (
    'c08212fc5fccd39980d0088c8a8b30fe9c32bd1a' =>
    array (
      0 => '/var/www/hermes.sztaki.hu/hermes/moduls/templates/default/MainAnnotation.tpl',
      1 => 1369494673,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '746085704514c9f6c7886d1-49483932',
  'function' =>
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_514c9f6c7892d5_20527535',
  'variables' =>
  array (
    'ConfigDir' => 0,
    'ownprojects' => 0,
    'p' => 0,
    'files' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_514c9f6c7892d5_20527535')) {function content_514c9f6c7892d5_20527535($_smarty_tpl) {?>

		<input type="button" class="btn btn-primary" href="#openArticleModal"
			data-toggle="modal" value="Open article" />
		<input type="button" class="btn btn-primary" href="#changeProjectModal"
			data-toggle="modal" value="Change project" />

Current

Relation

Info

					 Annotations on the selected text:

					Relations for the selected text:

					Informations about the current article:

	<?php echo $_smarty_tpl->getSubTemplate (($_smarty_tpl->tpl_vars['ConfigDir']->value).("/moduls/templates/default/ArticleViwer.tpl"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">×</button>

Add article to tabs...

				Click on a row to open an article from the selected project:

		Close

		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">×</button>

Select project...

		<select id="selected-project-selector">
			<?php  $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['p']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['ownprojects']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['p']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
				 <option value="<?php echo $_smarty_tpl->tpl_vars['p']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['p']->value['name'];?>
::[<?php echo count($_smarty_tpl->tpl_vars['files']->value[$_smarty_tpl->tpl_vars['p']->value['id']]);?>
 file(s)]</option>
			<?php } ?>
	 	</select>

		Select
		Close

		<button type="button" class="close" data-dismiss="modal"
			aria-hidden="true">×</button>

Article details...

		<form class="form-horizontal">

        		Title

        			<input type="text" name="tab_title" id="tab_title" placeholder="Title"/>

        <textarea name="tab_content" rows="10" class="input-xxlarge" readonly id="tab_content"></textarea>
      </form>

		Open article
		Open article and close
		Close

<?php }} ?>


text:
<?php

namespace Respect\Validation\Exceptions;

class KeyException extends AttributeException
{
    public static $defaultTemplates = [
        self::MODE_DEFAULT => [
            self::NOT_PRESENT => 'Key {{name}} must be present',
            self::INVALID => 'Key {{name}} must be valid',
        ],
        self::MODE_NEGATIVE => [
            self::NOT_PRESENT => 'Key {{name}} must not be present',
            self::INVALID => 'Key {{name}} must not be valid',
        ],
    ];
}


text:
using content::WebContents;
using content::WebUIMessageHandler;

namespace chromeos {

BluetoothPairingUI::BluetoothPairingUI(content::WebUI* web_ui)
    : WebDialogUI(web_ui),
      core_handler_(new options::CoreChromeOSOptionsHandler()),
      bluetooth_handler_(new options::BluetoothOptionsHandler()) {
  base::DictionaryValue localized_strings;

  web_ui->AddMessageHandler(core_handler_);
  core_handler_->set_handlers_host(this);
  core_handler_->GetLocalizedValues(&localized_strings);

  web_ui->AddMessageHandler(bluetooth_handler_);
  bluetooth_handler_->GetLocalizedValues(&localized_strings);

  content::WebUIDataSource* source =
      content::WebUIDataSource::Create(chrome::kChromeUIBluetoothPairingHost);
  source->AddLocalizedStrings(localized_strings);
  source->SetJsonPath("strings.js");
  source->SetDefaultResource(IDR_BLUETOOTH_PAIR_DEVICE_HTML);
  source->DisableContentSecurityPolicy();

  Profile* profile = Profile::FromWebUI(web_ui);
  content::WebUIDataSource::Add(profile, source);
}

BluetoothPairingUI::~BluetoothPairingUI() {
  // Uninitialize all registered handlers. The base class owns them and it will
  // eventually delete them.
  core_handler_->Uninitialize();
  bluetooth_handler_->Uninitialize();
}

void BluetoothPairingUI::InitializeHandlers() {
  core_handler_->InitializeHandler();
  bluetooth_handler_->InitializeHandler();
  core_handler_->InitializePage();
  bluetooth_handler_->InitializePage();
}

}  // namespace chromeos


text:
package com.gazbert.patterns.behavioural.observer.jdkobserver.bots;

import com.gazbert.patterns.behavioural.observer.jdkeventing.MarketType;
import com.gazbert.patterns.behavioural.observer.jdkobserver.Market;

import java.math.BigDecimal;
import java.util.Observable;
import java.util.Observer;

/**
 * This would not exist in real world. Here because I'm too lazy to type same code for each bot.
 *

 * Uses java.util.Observer.
 *

 *
 * @author gazbert
 */
abstract class AbstractTradingBot implements Observer {

    /**
     * USD GBP market bid price
     */
    private BigDecimal latestUsdGbpMarketBidPrice = new BigDecimal("0.60");

    /**
     * USD EUR market bid price
     */
    private BigDecimal latestUsdEurMarketBidPrice = new BigDecimal("0.73");

    public BigDecimal getLatestUsdGbpMarketBidPrice() {
        return latestUsdGbpMarketBidPrice;
    }

    public BigDecimal getLatestUsdEurMarketBidPrice() {
        return latestUsdEurMarketBidPrice;
    }

    /**
     * We let JDK do the work this time...
     */
    @Override
    public void update(Observable observable, Object obj) {

        final Market market = ((Market) observable);

        // Bleurgh! but you get the idea...
        if (market.getMarketType() == MarketType.USD_GBP) {
            latestUsdGbpMarketBidPrice = market.getLastBidPrice();
        } else if (market.getMarketType() == MarketType.USD_EUR) {
            latestUsdEurMarketBidPrice = market.getLastBidPrice();
        }
    }
}


text:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*                                                                       */
/*    This file is part of the HiGHS linear optimization suite           */
/*                                                                       */
/*    Written and engineered 2008-2020 at the University of Edinburgh    */
/*                                                                       */
/*    Available as open-source under the MIT License                     */
/*                                                                       */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file lp_data/HConst.h
 * @brief Constants for HiGHS
 * @author Julian Hall, Ivet Galabova, Qi Huangfu and Michael Feldmeier
 */
#ifndef LP_DATA_HCONST_H_
#define LP_DATA_HCONST_H_

#include <limits>
#include <string>

const int HIGHS_CONST_I_INF = std::numeric_limits<int>::max();
const double HIGHS_CONST_INF = std::numeric_limits<double>::infinity();
const double HIGHS_CONST_TINY = 1e-14;
const double HIGHS_CONST_ZERO = 1e-50;
const std::string off_string = "off";
const std::string choose_string = "choose";
const std::string on_string = "on";
const int HIGHS_THREAD_LIMIT = 8;  // 32;

enum HighsDebugLevel {
  HIGHS_DEBUG_LEVEL_MIN = 0,
  HIGHS_DEBUG_LEVEL_NONE = HIGHS_DEBUG_LEVEL_MIN,  // 0
  HIGHS_DEBUG_LEVEL_CHEAP,                         // 1
  HIGHS_DEBUG_LEVEL_COSTLY,                        // 2
  HIGHS_DEBUG_LEVEL_EXPENSIVE,                     // 3
  HIGHS_DEBUG_LEVEL_MAX = HIGHS_DEBUG_LEVEL_EXPENSIVE
};

enum class HighsDebugStatus {
  NOT_CHECKED = -1,
  OK,
  SMALL_ERROR,
  WARNING,
  LARGE_ERROR,
  ERROR,
  EXCESSIVE_ERROR,
  LOGICAL_ERROR,
};

enum class HighsOptionType { BOOL = 0, INT, DOUBLE, STRING };

enum class HighsInfoType { INT = 1, DOUBLE };

enum OptionOffChooseOn { OPTION_OFF = -1, OPTION_CHOOSE, OPTION_ON };

/** SCIP/HiGHS Objective sense */
enum class ObjSense { MINIMIZE = 1, MAXIMIZE = -1 };

enum SolverOption {
  SOLVER_OPTION_SIMPLEX = -1,
  SOLVER_OPTION_CHOOSE,
  SOLVER_OPTION_IPM
};

enum PrimalDualStatus {
  STATUS_NOTSET = -1,
  STATUS_MIN = STATUS_NOTSET,
  STATUS_NO_SOLUTION,
  STATUS_UNKNOWN,
  STATUS_INFEASIBLE_POINT,
  STATUS_FEASIBLE_POINT,
  STATUS_MAX = STATUS_FEASIBLE_POINT
};

const std::string FILENAME_DEFAULT = "";

// Need to allow infinite costs to pass SCIP LPI unit tests
const bool allow_infinite_costs = true;

// Primal/dual statuses and corresponding HighsModelStatus
// values. Note that if dual infeasibility is identified, then the
// prototype primal code is used to distinguish PRIMAL_DUAL_INFEASIBLE
// from PRIMAL_UNBOUNDED. If this fails, then HiGHS may just return
// DUAL_INFEASIBLE
//
//           | Du Infeas    | Du Feas   | Du UnBd
// Pr Infeas | PR_DU_INFEAS | PR_INFEAS | PR_INFEAS
// Pr Feas   | PR_UNBD      | OPTIMAL   |   N/A
// Pr Unbd   | PR_UNBD      |     N/A   |   N/A
//
// Dual infeasibility is recognised by infeasibility at dual phase 1 optimality
// (and implied by primal unboundedness)
//
// Dual feasibility is recognised by feasibility at dual phase 1 optimality or
// primal phase 2 optimality
//
// Dual unboundedness is recognised by unboundedness in dual phase 2
//
// Primal infeasibility is recognised by infeasibility at primal phase 1
// optimality (and implied by dual unboundedness)
//
// Primal feasibility is recognised by feasibility at primal phase 1 optimality
// or dual phase 2 optimality
//
// Primal unboundedness is recognised by unboundedness in primal phase 2
//

enum class HighsModelStatus {
  // NB Add new status values to the end so that int cast of status
  // values is unchanged, since enums are not preserved in some
  // interfaces
  NOTSET = 0,
  HIGHS_MODEL_STATUS_MIN = NOTSET,
  LOAD_ERROR,
  MODEL_ERROR,
  PRESOLVE_ERROR,
  SOLVE_ERROR,
  POSTSOLVE_ERROR,
  MODEL_EMPTY,
  PRIMAL_INFEASIBLE,
  PRIMAL_UNBOUNDED,
  OPTIMAL,
  REACHED_DUAL_OBJECTIVE_VALUE_UPPER_BOUND,
  REACHED_TIME_LIMIT,
  REACHED_ITERATION_LIMIT,
  PRIMAL_DUAL_INFEASIBLE,
  DUAL_INFEASIBLE,
  HIGHS_MODEL_STATUS_MAX = DUAL_INFEASIBLE
};

/** SCIP/CPLEX-like HiGHS basis status for columns and rows. */
enum class HighsBasisStatus {
  LOWER =
      0,  // (slack) variable is at its lower bound [including fixed variables]
  BASIC,  // (slack) variable is basic
  UPPER,  // (slack) variable is at its upper bound
  ZERO,   // free variable is non-basic and set to zero
  NONBASIC,  // nonbasic with no specific bound information - useful for users
             // and postsolve
  SUPER      // Super-basic variable: non-basic and either free and
             // nonzero or not at a bound. No SCIP equivalent
};

#endif /* LP_DATA_HCONST_H_ */


text:
namespace djinni {

// This is only a helper, trying to use it as member/param will fail
template<class Ratio>
struct DurationPeriod;

using Duration_h = DurationPeriod<std::ratio<3600>>;
using Duration_min = DurationPeriod<std::ratio<60>>;
using Duration_s = DurationPeriod<std::ratio<1>>;
using Duration_ms = DurationPeriod<std::milli>;
using Duration_us = DurationPeriod<std::micro>;
using Duration_ns = DurationPeriod<std::nano>;

template<class Rep, class Period>
struct Duration;

template<class Rep, class Ratio>
struct Duration<Rep, DurationPeriod<Ratio>> {
    using CppType = std::chrono::duration<typename Rep::CppType, Ratio>;
    using CsType = System::TimeSpan;

    using Ticks = std::chrono::duration<int64_t, std::ratio<1, 10000000>>;

    static CppType ToCpp(CsType dt) {
        return std::chrono::duration_cast<CppType>(Ticks(dt.Ticks));
    }
    static CsType FromCpp(CppType dt) {
        auto ms = std::chrono::duration_cast<Ticks>(dt).count();
        return System::TimeSpan::FromTicks(ms);
    }
};

}


text:
using System.Windows;
using KiriKiriTranslator.ViewModel;

namespace KiriKiriTranslator
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        /// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            Closing += (s, e) => ViewModelLocator.Cleanup();
        }
    }
}