diff --git "a/train.csv" "b/train.csv" new file mode 100644--- /dev/null +++ "b/train.csv" @@ -0,0 +1,81051 @@ +s_text,s_id,t_text,t_id,label +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Only registered subscribers shall be allowed to establish traces.,102,1 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A user shall register as a subscriber.,103,1 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On registration a subscriber shall register itself under the control of a subscribermanager,104,1 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On registration a subscriber shall register itself under the control of a subscribermanager,104,1 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,1 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,1 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Each artifact shall be placed under the control of a subscribermanager,106,1 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Each artifact shall be placed under the control of a subscribermanager,106,1 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall be able to delete subscriptions.,107,1 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,1 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,1 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,1 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,1 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,1 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A subscribermanager shall manage traces for one or more artifacts.,112,1 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A subscribermanager shall manage traces for one or more artifacts.,112,1 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,1 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,1 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall store information for evolutionary events in an eventlog.,114,1 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall be able to construct speculative queries using a GUI.,115,1 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall immediately process speculative events.,116,1 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall re execute the model using the speculative values.,117,1 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,1 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall restore the executable model to its prior state.,119,1 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The prototype system shall utilize a driver to trigger events.,120,1 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include adding new requirements.,121,1 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include decomposing one requirement into two or more requirements.,122,1 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,1 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include modifying a requirement.,124,1 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include deleting a requirement.,125,1 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include merging requirements.,126,1 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall receive event messages when a requirement changes.,127,1 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On receipt of an event message the eventserver shall record the event in an eventlog.,128,1 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,1 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall differentiate between evolutionary and speculative events.,130,1 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,1 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,For speculative events; the eventserver shall construct a composite event message.,132,1 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,1 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,1 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,1 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall send the customized message to each impacted executable model.,136,1 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,1 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,1 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall update related artifacts according to the information contained in the event messages.,138,1 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,1 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,1 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,1 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,1 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,1 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,1 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,1 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,1 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,1 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,1 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,1 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,1 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,1 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,1 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,1 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,1 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,1 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,1 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,1 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,1 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,1 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,1 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,1 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,1 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,1 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,1 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,1 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,1 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,1 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A user shall register as a subscriber.,103,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,For speculative events; the eventserver shall construct a composite event message.,132,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall restore the executable model to its prior state.,119,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include deleting a requirement.,125,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall send the customized message to each impacted executable model.,136,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Only registered subscribers shall be allowed to establish traces.,102,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall be able to delete subscriptions.,107,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,For speculative events; the eventserver shall construct a composite event message.,132,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The prototype system shall utilize a driver to trigger events.,120,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Only registered subscribers shall be allowed to establish traces.,102,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A user shall register as a subscriber.,103,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall immediately process speculative events.,116,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall send the customized message to each impacted executable model.,136,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include adding new requirements.,121,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The prototype system shall utilize a driver to trigger events.,120,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall be able to delete subscriptions.,107,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall send the customized message to each impacted executable model.,136,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include merging requirements.,126,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include merging requirements.,126,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall be able to construct speculative queries using a GUI.,115,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,For speculative events; the eventserver shall construct a composite event message.,132,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall re execute the model using the speculative values.,117,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include deleting a requirement.,125,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include merging requirements.,126,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include merging requirements.,126,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A user shall register as a subscriber.,103,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include modifying a requirement.,124,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include modifying a requirement.,124,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A user shall register as a subscriber.,103,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall re execute the model using the speculative values.,117,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall immediately process speculative events.,116,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,For speculative events; the eventserver shall construct a composite event message.,132,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Only registered subscribers shall be allowed to establish traces.,102,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include modifying a requirement.,124,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A user shall register as a subscriber.,103,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The prototype system shall utilize a driver to trigger events.,120,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A user shall register as a subscriber.,103,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall immediately process speculative events.,116,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall be able to construct speculative queries using a GUI.,115,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall be able to construct speculative queries using a GUI.,115,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include modifying a requirement.,124,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include modifying a requirement.,124,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Each artifact shall be placed under the control of a subscribermanager,106,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall re execute the model using the speculative values.,117,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall restore the executable model to its prior state.,119,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include merging requirements.,126,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall receive event messages when a requirement changes.,127,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include modifying a requirement.,124,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include deleting a requirement.,125,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall immediately process speculative events.,116,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include modifying a requirement.,124,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include modifying a requirement.,124,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The prototype system shall utilize a driver to trigger events.,120,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall immediately process speculative events.,116,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include deleting a requirement.,125,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include deleting a requirement.,125,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include modifying a requirement.,124,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include modifying a requirement.,124,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include modifying a requirement.,124,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include adding new requirements.,121,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The prototype system shall utilize a driver to trigger events.,120,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall be able to delete subscriptions.,107,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Each artifact shall be placed under the control of a subscribermanager,106,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Each artifact shall be placed under the control of a subscribermanager,106,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include modifying a requirement.,124,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Only registered subscribers shall be allowed to establish traces.,102,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall be able to construct speculative queries using a GUI.,115,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include modifying a requirement.,124,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include adding new requirements.,121,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A user shall register as a subscriber.,103,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,For speculative events; the eventserver shall construct a composite event message.,132,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include modifying a requirement.,124,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall send the customized message to each impacted executable model.,136,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall be able to delete subscriptions.,107,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include adding new requirements.,121,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall re execute the model using the speculative values.,117,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A user shall register as a subscriber.,103,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,For speculative events; the eventserver shall construct a composite event message.,132,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall be able to delete subscriptions.,107,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall restore the executable model to its prior state.,119,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Only registered subscribers shall be allowed to establish traces.,102,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Only registered subscribers shall be allowed to establish traces.,102,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include modifying a requirement.,124,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall restore the executable model to its prior state.,119,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include adding new requirements.,121,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The prototype system shall utilize a driver to trigger events.,120,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include deleting a requirement.,125,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall send the customized message to each impacted executable model.,136,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include adding new requirements.,121,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Only registered subscribers shall be allowed to establish traces.,102,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall re execute the model using the speculative values.,117,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include modifying a requirement.,124,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Only registered subscribers shall be allowed to establish traces.,102,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Only registered subscribers shall be allowed to establish traces.,102,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include merging requirements.,126,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Each artifact shall be placed under the control of a subscribermanager,106,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall re execute the model using the speculative values.,117,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Only registered subscribers shall be allowed to establish traces.,102,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include adding new requirements.,121,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include adding new requirements.,121,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall restore the executable model to its prior state.,119,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include deleting a requirement.,125,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall receive event messages when a requirement changes.,127,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Only registered subscribers shall be allowed to establish traces.,102,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include modifying a requirement.,124,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,For speculative events; the eventserver shall construct a composite event message.,132,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include adding new requirements.,121,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,For speculative events; the eventserver shall construct a composite event message.,132,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Each artifact shall be placed under the control of a subscribermanager,106,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall be able to delete subscriptions.,107,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A user shall register as a subscriber.,103,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall send the customized message to each impacted executable model.,136,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall re execute the model using the speculative values.,117,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A user shall register as a subscriber.,103,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The prototype system shall utilize a driver to trigger events.,120,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include deleting a requirement.,125,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include merging requirements.,126,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall receive event messages when a requirement changes.,127,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include deleting a requirement.,125,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall receive event messages when a requirement changes.,127,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall restore the executable model to its prior state.,119,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Each artifact shall be placed under the control of a subscribermanager,106,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include deleting a requirement.,125,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include adding new requirements.,121,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall restore the executable model to its prior state.,119,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A user shall register as a subscriber.,103,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,For speculative events; the eventserver shall construct a composite event message.,132,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A user shall register as a subscriber.,103,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include merging requirements.,126,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall be able to delete subscriptions.,107,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include adding new requirements.,121,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A user shall register as a subscriber.,103,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include modifying a requirement.,124,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall re execute the model using the speculative values.,117,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include merging requirements.,126,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include adding new requirements.,121,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall be able to construct speculative queries using a GUI.,115,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include deleting a requirement.,125,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Only registered subscribers shall be allowed to establish traces.,102,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include merging requirements.,126,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include deleting a requirement.,125,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include adding new requirements.,121,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,For speculative events; the eventserver shall construct a composite event message.,132,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include modifying a requirement.,124,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall send the customized message to each impacted executable model.,136,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A user shall register as a subscriber.,103,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include deleting a requirement.,125,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include modifying a requirement.,124,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include merging requirements.,126,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A user shall register as a subscriber.,103,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include deleting a requirement.,125,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall be able to construct speculative queries using a GUI.,115,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include merging requirements.,126,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The prototype system shall utilize a driver to trigger events.,120,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A user shall register as a subscriber.,103,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The prototype system shall utilize a driver to trigger events.,120,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include merging requirements.,126,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Each artifact shall be placed under the control of a subscribermanager,106,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall receive event messages when a requirement changes.,127,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall receive event messages when a requirement changes.,127,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The prototype system shall utilize a driver to trigger events.,120,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include merging requirements.,126,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall restore the executable model to its prior state.,119,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The prototype system shall utilize a driver to trigger events.,120,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include modifying a requirement.,124,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include adding new requirements.,121,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall immediately process speculative events.,116,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The prototype system shall utilize a driver to trigger events.,120,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A user shall register as a subscriber.,103,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Only registered subscribers shall be allowed to establish traces.,102,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include adding new requirements.,121,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include merging requirements.,126,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall re execute the model using the speculative values.,117,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall be able to delete subscriptions.,107,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A user shall register as a subscriber.,103,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A user shall register as a subscriber.,103,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include merging requirements.,126,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall receive event messages when a requirement changes.,127,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The prototype system shall utilize a driver to trigger events.,120,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,For speculative events; the eventserver shall construct a composite event message.,132,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include deleting a requirement.,125,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall be able to construct speculative queries using a GUI.,115,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall immediately process speculative events.,116,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall be able to construct speculative queries using a GUI.,115,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall be able to delete subscriptions.,107,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall immediately process speculative events.,116,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include adding new requirements.,121,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The prototype system shall utilize a driver to trigger events.,120,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The prototype system shall utilize a driver to trigger events.,120,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall restore the executable model to its prior state.,119,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall be able to delete subscriptions.,107,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall send the customized message to each impacted executable model.,136,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,For speculative events; the eventserver shall construct a composite event message.,132,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,For speculative events; the eventserver shall construct a composite event message.,132,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall be able to delete subscriptions.,107,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include deleting a requirement.,125,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall restore the executable model to its prior state.,119,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include merging requirements.,126,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall be able to delete subscriptions.,107,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall be able to construct speculative queries using a GUI.,115,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Only registered subscribers shall be allowed to establish traces.,102,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include deleting a requirement.,125,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include deleting a requirement.,125,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall receive event messages when a requirement changes.,127,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall send the customized message to each impacted executable model.,136,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Only registered subscribers shall be allowed to establish traces.,102,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall restore the executable model to its prior state.,119,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include deleting a requirement.,125,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Each artifact shall be placed under the control of a subscribermanager,106,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall be able to delete subscriptions.,107,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall re execute the model using the speculative values.,117,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall be able to delete subscriptions.,107,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall be able to delete subscriptions.,107,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Only registered subscribers shall be allowed to establish traces.,102,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include adding new requirements.,121,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall re execute the model using the speculative values.,117,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Only registered subscribers shall be allowed to establish traces.,102,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall re execute the model using the speculative values.,117,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Each artifact shall be placed under the control of a subscribermanager,106,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall send the customized message to each impacted executable model.,136,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall be able to delete subscriptions.,107,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall be able to construct speculative queries using a GUI.,115,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall receive event messages when a requirement changes.,127,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall be able to delete subscriptions.,107,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,For speculative events; the eventserver shall construct a composite event message.,132,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall be able to delete subscriptions.,107,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall restore the executable model to its prior state.,119,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Only registered subscribers shall be allowed to establish traces.,102,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall receive event messages when a requirement changes.,127,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include deleting a requirement.,125,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include merging requirements.,126,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall immediately process speculative events.,116,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall send the customized message to each impacted executable model.,136,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A user shall register as a subscriber.,103,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Each artifact shall be placed under the control of a subscribermanager,106,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include merging requirements.,126,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include deleting a requirement.,125,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include adding new requirements.,121,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include merging requirements.,126,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall receive event messages when a requirement changes.,127,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall receive event messages when a requirement changes.,127,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include decomposing one requirement into two or more requirements.,122,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall be able to construct speculative queries using a GUI.,115,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include merging requirements.,126,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Each artifact shall be placed under the control of a subscribermanager,106,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall receive event messages when a requirement changes.,127,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall send the customized message to each impacted executable model.,136,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A user shall register as a subscriber.,103,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include adding new requirements.,121,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall restore the executable model to its prior state.,119,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include modifying a requirement.,124,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Each artifact shall be placed under the control of a subscribermanager,106,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include adding new requirements.,121,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include adding new requirements.,121,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall immediately process speculative events.,116,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A user shall register as a subscriber.,103,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A user shall register as a subscriber.,103,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall send the customized message to each impacted executable model.,136,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include merging requirements.,126,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The prototype system shall utilize a driver to trigger events.,120,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall be able to construct speculative queries using a GUI.,115,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall restore the executable model to its prior state.,119,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall restore the executable model to its prior state.,119,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"65 ""About Dialog + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include merging requirements.,126,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The prototype system shall utilize a driver to trigger events.,120,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include adding new requirements.,121,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include deleting a requirement.,125,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall be able to delete subscriptions.,107,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Only registered subscribers shall be allowed to establish traces.,102,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A user shall register as a subscriber.,103,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The prototype system shall utilize a driver to trigger events.,120,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall receive event messages when a requirement changes.,127,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"62 ""Call Back + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall restore the executable model to its prior state.,119,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall receive event messages when a requirement changes.,127,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall be able to delete subscriptions.,107,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall be able to construct speculative queries using a GUI.,115,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include deleting a requirement.,125,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall immediately process speculative events.,116,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include deleting a requirement.,125,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"78 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include adding new requirements.,121,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall restore the executable model to its prior state.,119,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall receive event messages when a requirement changes.,127,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include modifying a requirement.,124,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall immediately process speculative events.,116,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,For speculative events; the eventserver shall construct a composite event message.,132,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall be able to construct speculative queries using a GUI.,115,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include merging requirements.,126,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall be able to delete subscriptions.,107,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall immediately process speculative events.,116,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall send the customized message to each impacted executable model.,136,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall receive event messages when a requirement changes.,127,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include modifying a requirement.,124,0 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall be able to delete subscriptions.,107,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall re execute the model using the speculative values.,117,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall restore the executable model to its prior state.,119,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall manage traces for one or more artifacts.,112,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall be able to construct speculative queries using a GUI.,115,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The prototype system shall utilize a driver to trigger events.,120,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall manage traces for one or more artifacts.,112,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall be able to delete subscriptions.,107,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall send the customized message to each impacted executable model.,136,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include adding new requirements.,121,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall differentiate between evolutionary and speculative events.,130,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,For speculative events; the eventserver shall construct a composite event message.,132,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,For speculative events; the eventserver shall construct a composite event message.,132,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"88 ""Event Model + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include decomposing one requirement into two or more requirements.,122,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall re execute the model using the speculative values.,117,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall update related artifacts according to the information contained in the event messages.,138,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall be able to delete subscriptions.,107,0 +"70 ""Notification Processing + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0