input
stringlengths
10
828
output
stringlengths
5
107
public void test hash code map m transactional bidi tree map make map local test node nodes make local nodes for int k 0 k nodes length k m put nodes k get key nodes k map m1 transactional bidi tree map make map for int k nodes length 1 k 0 k m1 put nodes k get key nodes k assert equals m hash code m1 hash code
test hash code method
private object get data final int index return index key data key data value
get the specified data
private void set left final node k v node final int index if index key left node key node else left node value node
set this nodes left node
private void set right final node k v node final int index if index key right node key node else right node value node
set this nodes right node
private void set parent final node k v node final int index if index key parent node key node else parent node value node
set this nodes parent node
private void swap colors final node k v node final int index swap colors old hacker s trick if index key black color key node black color key node black color key black color key black color key node black color key else black color value node black color value node black color value black color value black color value node black color value
exchange colors with another node
private boolean is black final int index return index key black color key black color value
is this node black
private boolean is red final int index return index key black color key black color value
is this node red
private void set black final int index if index key black color key true else black color value true
make this node black
private void set red final int index if index key black color key false else black color value false
make this node red
private void copy color final node k v node final int index if index key black color key node black color key else black color value node black color value
make this node the same color as another
private string format item string s int len if s length len if s index of 1 string subscript s substring s index of s last index of 1 if subscript length len return s substring 0 len subscript length subscript else return s substring 0 len else return s substring 0 len else if s length len return s substring 0 len else return s
format a variable name or value s into a field of length len
private string collection to string collection string c string s iterator string it c iterator while it has next s s format item it next variable width return s
transform a collection of variables to a string
public object get modified element return modified
returns the object that was modified
public import manager get import manager return this application get import manager
just a convenience method same as get application
public void init iworkbench workbench istructured selection selection this workbench workbench this selection selection set window title bpmn editor plugin instance get string ui wizard label set default page image descriptor extended image registry instance get image descriptor bpmn editor plugin instance get image full wizban new bpmn
this just records the information
protected eobject create initial model eclass e class eclass bpmn package get eclassifier initial object creation page get initial object name eobject root object bpmn factory create e class return root object
create a new model
public void contribute to tool bar itool bar manager tool bar manager tool bar manager add new separator bpmn settings tool bar manager add new separator bpmn additions
this adds separators for editor additions to the tool bar
protected boolean validate page if super validate page make sure the file ends in bpmn string required ext bpmn editor plugin instance get string ui bpmn editor filename extension string entered ext new path get file name get file extension if entered ext null entered ext equals required ext set error message bpmn editor plugin instance get string warn filename extension new object required ext return false else return true else return false
the framework calls this to see if the file is correct
public void menu about to show imenu manager menu manager super menu about to show menu manager menu manager submenu manager null submenu manager new menu manager bpmn editor plugin instance get string ui create child menu item populate manager submenu manager create child actions null menu manager insert before edit submenu manager submenu manager new menu manager bpmn editor plugin instance get string ui create sibling menu item populate manager submenu manager create sibling actions null menu manager insert before edit submenu manager
this populates the pop up menu before it appears
protected string get label string type name try return bpmn edit plugin instance get string ui type name type catch missing resource exception mre bpmn editor plugin instance log mre return type name
returns the label for the specified type name
protected void handle activate recompute the read only state if editing domain get resource to read only map null editing domain get resource to read only map clear refresh any actions that may become enabled or disabled set selection get selection if removed resources is empty if handle dirty conflict get site get page close editor bpmn editor this false bpmn editor this dispose else removed resources clear changed resources clear saved resources clear else if changed resources is empty changed resources remove all saved resources handle changed resources changed resources clear saved resources clear
handles activation of the editor or its associated views
public diagnostic analyze resource problems resource resource exception exception if resource get errors is empty resource get warnings is empty basic diagnostic basic diagnostic new basic diagnostic diagnostic error org bpmn editor 0 get string ui create model error message resource get uri new object exception null object resource exception basic diagnostic merge ecore util compute diagnostic resource true return basic diagnostic else if exception null return new basic diagnostic diagnostic error org bpmn editor 0 get string ui create model error message resource get uri new object exception else return diagnostic ok instance
returns a dignostic describing the errors and warnings listed in the resource
public iproperty sheet page get property sheet page if property sheet page null property sheet page new extended property sheet page editing domain public void set selection to viewer list selection bpmn editor this set selection to viewer selection bpmn editor this set focus public void set action bars iaction bars action bars super set action bars action bars get action bar contributor share global actions this action bars property sheet page set property source provider new adapter factory content provider adapter factory return property sheet page
this accesses a cached version of the property sheet
public adapter create andgateway adapter return null
creates a new adapter for an object of class
public adapter create bpmndiagram adapter return null
creates a new adapter for an object of class
public adapter create complex gateway adapter return null
creates a new adapter for an object of class
public adapter create connecting object adapter return null
creates a new adapter for an object of class
public adapter create embedded sub process adapter return null
creates a new adapter for an object of class
public adapter create flow object adapter return null
creates a new adapter for an object of class
public adapter create gateway adapter return null
creates a new adapter for an object of class
public adapter create graphical element adapter return null
creates a new adapter for an object of class
public adapter create independent sub process adapter return null
creates a new adapter for an object of class
public adapter create lane adapter return null
creates a new adapter for an object of class
public adapter create loop attributes adapter return null
creates a new adapter for an object of class
public adapter create standard loop adapter return null
creates a new adapter for an object of class
public adapter create manual task adapter return null
creates a new adapter for an object of class
public adapter create message flow adapter return null
creates a new adapter for an object of class
public adapter create multi instance loop adapter return null
creates a new adapter for an object of class
public adapter create orgateway adapter return null
creates a new adapter for an object of class
public adapter create pool adapter return null
creates a new adapter for an object of class
protected connection create connection figure view view view get model sequence flow model sequence flow view get element graphical element source model get source int decor get decoration type model get condition type source return new sequence flow figure decor
creates figure for this edit part
private int get decoration type condition type type graphical element source switch type get value case condition type default return sequence flow figure backslash decoration case condition type expression if source instanceof gateway return sequence flow figure no decoration else return sequence flow figure diamond decoration default return sequence flow figure no decoration
choose the source decoration based in the condition type and the source element
public adapter create receive task adapter return null
creates a new adapter for an object of class
public adapter create reference sub process adapter return null
creates a new adapter for an object of class
public adapter create reference task adapter return null
creates a new adapter for an object of class
public adapter create script task adapter return null
creates a new adapter for an object of class
protected connection create connection figure return new message flow figure
creates figure for this edit part
public adapter create send task adapter return null
creates a new adapter for an object of class
public adapter create sequence flow adapter return null
creates a new adapter for an object of class
public adapter create service task adapter return null
creates a new adapter for an object of class
public adapter create sub process adapter return null
creates a new adapter for an object of class
public adapter create swim lane adapter return null
creates a new adapter for an object of class
public adapter create text annotation adapter return null
creates a new adapter for an object of class
public adapter create message receiver adapter return null
creates a new adapter for an object of class
public adapter create message sender adapter return null
creates a new adapter for an object of class
public adapter create xorevent gateway adapter return null
creates a new adapter for an object of class
public adapter create xorgateway adapter return null
creates a new adapter for an object of class
protected node figure create node figure node figure figure create node plate figure set layout manager new stack layout ifigure shape create node shape figure add shape ifigure contents pool figure shape get figure pool contents figure content pane setup content pane contents return figure
creates figure for this edit part
public adapter create properties container adapter return null
creates a new adapter for an object of class
public adapter create none event adapter return null
creates a new adapter for an object of class
public adapter create timer event adapter return null
creates a new adapter for an object of class
public adapter create rule event adapter return null
creates a new adapter for an object of class
public adapter create link event adapter return null
creates a new adapter for an object of class
public adapter create multiple event adapter return null
creates a new adapter for an object of class
public adapter create error event adapter return null
creates a new adapter for an object of class
public adapter create cancel event adapter return null
creates a new adapter for an object of class
public adapter create terminate event adapter return null
creates a new adapter for an object of class
public adapter create compensation event adapter return null
creates a new adapter for an object of class
protected connection create connection figure view view view get model association model association view get element return new association figure model get direction
creates figure for this edit part
public adapter create model folder adapter return null
creates a new adapter for an object of class
public adapter create model view item adapter return null
creates a new adapter for an object of class
public adapter create processes folder adapter return null
creates a new adapter for an object of class
public adapter create properties folder adapter return null
creates a new adapter for an object of class
public adapter create participants folder adapter return null
creates a new adapter for an object of class
public adapter create assignments folder adapter return null
creates a new adapter for an object of class
protected boolean is equal string new text return get feature as text equals new text
determine if the provided string value is an equal representation of the
protected void set fixture assignment fixture this fixture fixture
sets the fixture for this assignment test case
private assignment get fixture return fixture
returns the fixture for this assignment test case
protected void set up throws exception set fixture bpmn factory e instance create assignment
begin user doc
private reference task get fixture return reference task fixture
returns the fixture for this reference task test case
private andgateway get fixture return andgateway fixture
returns the fixture for this and gateway test case
private service task get fixture return service task fixture
returns the fixture for this service task test case
private event get fixture return fixture
returns the fixture for this event test case
private embedded sub process get fixture return embedded sub process fixture
returns the fixture for this embedded sub process test case
protected void set up throws exception set fixture bpmn factory e instance create embedded sub process
begin user doc
private sub process get fixture return sub process fixture
returns the fixture for this sub process test case
private flow object get fixture return flow object fixture
returns the fixture for this flow object test case
private user task get fixture return user task fixture
returns the fixture for this user task test case
private group get fixture return group fixture
returns the fixture for this group test case
private connecting object get fixture return connecting object fixture
returns the fixture for this connecting object test case
protected void set fixture participant fixture this fixture fixture
sets the fixture for this participant test case
private participant get fixture return fixture
returns the fixture for this participant test case
private transaction get fixture return fixture
returns the fixture for this transaction test case
private reference sub process get fixture return reference sub process fixture
returns the fixture for this reference sub process test case
private xorevent gateway get fixture return xorevent gateway fixture
returns the fixture for this xor event gateway test case
private receive task get fixture return receive task fixture
returns the fixture for this receive task test case
private intermediate event get fixture return intermediate event fixture
returns the fixture for this intermediate event test case
private message flow get fixture return message flow fixture
returns the fixture for this message flow test case
protected void set fixture rule fixture this fixture fixture
sets the fixture for this rule test case