diff --git "a/train.csv" "b/train.csv" --- "a/train.csv" +++ "b/train.csv" @@ -6159,148 +6159,318 @@ private void RightListClicked(MouseEvent e){ 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 -"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: 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 -"47 ""Impact Report +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: 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 +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 +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 +"62 ""Call Back -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +private Hash table requirementDescTable = new Hash table(); - private JPanel driver Inner Panel = null ; + private Hash table constraintDescTable = new Hash table(); - private JPanel impact Panel = null ; - private JPanel impact Inner P + private Hash table performanceModelTable = new Hash table(); - public Impact Report () - { + private PerformanceModel performance model= null - super ("""" Search Result GUI """"); - container = get Content Pane (); + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - set Size ( 800 , 250 ); - panel = new JPanel (); +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public static void main ( String [] args ) +public void insertValuesInDataBase() { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - Impact Report im = new Impact Report (); - - } - public Vector search Date () + public void createExecuteString() { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) + +public void parseImpactReport(String str) { - pair Vector = new Vector (); +Connection conn = null; - query String Combo . remove All Items (); +Statement stmt = null; - query String Combo . add Item ("""" Select Query String """"); +Vector constraintsVector = null; +Vector driversVector = null; - Socket server ; - String line = new String (); +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 +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,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +"80 ""Requirement - // Select Actions +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - 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 ); - } - } +public Requirement() {// empty constructor - // Button Actions +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +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 +"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: 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 +"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 +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 +"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: 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 +"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; +} - if ( pair - . get +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public void impact Report ( String id ) + 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: 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: 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 +"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 - // super ("""" Impact Report """"); - container = get Content Pane (); + 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 - set Size ( 1020 , 740 ); - this . query ID = id ; + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - System . out . println ("""" Impact Report Constructor ..... ID """" + +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 +"88 ""Event Model - public Vector get Constraint From Data Base () +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; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - try - { - server = new Socket ( server IP , 1701 ); +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - if ( server . is Connected () ) - { - Buffered +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - public Vector get Driver From Data Base () +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 ((((( - Vector v = new Vector (); - Socket server ; - String line = new String (); + protected void BuildEvent(){} - 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 -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 + 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 "74 ""database @@ -6403,812 +6573,523 @@ 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 +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 +"66 ""Config Dialog -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 ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - 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 closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } +// 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 -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - if ( server . is Connected () ) - { - Buffered R +// 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 +"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); - 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 +/** +* 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 -public JPanel get Panel () + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { - 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 -"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 -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 -"73 ""Constraints - -String id; - String name; - double value; - String logic; +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + /** +* 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: 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 +"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: 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 +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 +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 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 +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 +"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: 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 +"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 +"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; - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - + public void run() + { - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + 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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +public Requirement() +{ +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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: 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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - /** -* 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: 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: 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 -"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;/ +// 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 - 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 +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: 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 +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,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,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 +"71 ""Requirement -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -String sName, sReqno, sModule, sKey1, sKey2; -try +public Requirement() { - 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() +public Object clone() throws CloneNotSupportedException { - return errMsg; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public boolean Contains(String ContextString, String SearchString) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -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 -"90 ""Merge Model +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 +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 +"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 +"92 ""New Model -public MergeModel(EBT em) - { +public NewModel(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 +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} 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 -"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 -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; // +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 +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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; -public void identifyPerformanceModels() + //EventParser Constructor + // initializes the Database connection + public EventParser() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void pullInformationFromDoors() + public void updateEvent(String str, String ID) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public void insertValuesInDataBase() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public void createExecuteString() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public void parseImpactReport(String str) +//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 -Connection conn = null; - -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -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 -"94 ""Refine Model +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: 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; -public RefineModel(EBT em) +public Symbol( char tok, int line ) { -super( em); - } +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - // Construct Visual model for Merge Event -public void BuildEvent() + +public Balance( Reader inStream ) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +errors = 0; +tok = new Tokenizer( inStream ); } -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: 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 -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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -super( em); - } +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -// Construct Visual model for Merge Event -public void BuildEvent() + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +if( opSym. token == '(' && clSym. token != ')' || -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 -"53 ""Performance Model + /** + * 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 +"77 ""Model Driver -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +String msg=""""""""; - private long queryID = 0; +public ModelDriver(String text) + { +this. msg = text; +init(); + } - public static int count = 0; - public PerformanceModel(String name, long queryID) + 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: 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 +"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 +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 +"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; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); } - public Vector getConstraints() + + public String toString() { -return constraintVector; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public Vector getDrivers() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return driverVector; +return id; } - public String getName() + + /** +* Returns the name. +* @return String +*/ + public String getName() { return name; } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return valueFrom; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + public double getValueTo() { -return this. driverVector. contains( driver); +return valueTo; } - public void addConstraint(ConstraintsDescription constraint) + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -this. constraintVector. add( constraint); +this. id = id; } - 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() + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -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: 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: 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 -"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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); +this. name = name; } -// 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() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -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 -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 -"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: 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 -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 -"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 -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 -"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: 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 -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 -"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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); +this. valueFrom = valueFrom; } - // 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: 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 -"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) + public void setValueTo( double value) { -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 -"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); +this. valueTo = valueTo; }"" -",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 -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 +",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 +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 "88 ""Event Model @@ -7324,151 +7205,284 @@ 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 -"90 ""Merge Model +",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 +"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); -public MergeModel(EBT em) +/** +* 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() { -super( em); - MinimumNoRects = 3; +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 +"82 ""Tokenizer - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public StringBuffer GenerateEvent() +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -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 -"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 +return currentLine; +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * 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( ) ) +{ - 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 + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -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 +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ +for( ; nextChar( ); result += ch ) - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + /** + * 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 - 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 +/** + * 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 ) { } +} - 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 +/** + * 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 -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -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 -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 -"65 ""About Dialog +private void skip -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 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +/** + * 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -// 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 + // 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 +{ -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -// 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 + +// 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 +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: 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: 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: 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 +"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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -7500,1683 +7514,1254 @@ 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 -"60 ""Thread Pool +",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: 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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; -/** -* 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); + 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() + { -/** -* 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 + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +public String getNextID() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() +public String searchDate() { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) { -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: 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 -"51 ""Driver Inner Panel +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -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) { + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + 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 +"47 ""Impact Report -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 -"86 ""EB Shape +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -public EBShape( int xpos, int ypos, Color col) + public Impact Report () { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + super ("""" Search Result GUI """"); - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + container = get Content Pane (); + set Size ( 800 , 250 ); - public boolean match( int mx, int my) - { -return true; - } + panel = new JPanel (); + panel . set Layout ( null ); - public int GetX() - { -return x; - } + this . server IP = + JOption Pane + . show In - public int GetY() + public static void main ( String [] args ) { -return y; - } - public Color GetC() -{ -return c; - } + Impact Report im = new Impact Report (); - public String GetReqno() - { -return requirement No; } - public String GetProject() + + public Vector search Date () { -return ProjectName; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public String GetModule() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -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 -"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 + pair Vector = new Vector (); - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); + query String Combo . remove All Items (); -addWindowListener( new WindowAdapter() -{ + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + // Select Actions -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification + 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 ); + } + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + // Button Actions -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N +public void action Performed ( Action Event e ) { -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 + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + Pair pair = ( Pair ) pair Vector . get ( i ); - m_Deleterequirement List. remove(0); + if ( pair + . get -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + public void impact Report ( String id ) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req + // super ("""" Impact Report """"); -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + container = get Content Pane (); + set Size ( 1020 , 740 ); - // 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 - + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -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 -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 -"62 ""Call Back + public Vector get Constraint From Data Base () + { -private Hash table requirementDescTable = new Hash table(); + Vector v = new Vector (); - private Hash table constraintDescTable = new Hash table(); + Socket server ; + String line = new String (); - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - 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() + public Vector get Driver From Data Base () { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + Vector v = new Vector (); -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + 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 +"73 ""Constraints +String id; + String name; + double value; + String logic; - public void createExecuteString() - { + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public void parseImpactReport(String str) - { -Connection conn = null; + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -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: 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - 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 + /** +* 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; + } -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + /** +* 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: 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 +"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: 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: 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 +"73 ""Constraints -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +String id; + String name; + double value; + String logic; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - 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 -"93 ""Obsolete Model + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public ObsoleteModel(EBT em) -{ -super( em); + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } -// 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 + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -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 -"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,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"93 ""Obsolete Model + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } -public ObsoleteModel(EBT em) -{ -super( em); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } -// 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 + /** +* 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; + } -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 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + /** +* 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 +"89 ""Event Line + +protected int top, left, right, bottom; -public StringBuffer GenerateEvent() +public EventLine ( int t, int l, int r, int b) { -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 -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: 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 -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 -"50 ""Driver Description +top = t; +left = l; +right = r; +bottom = b; +} -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 int GetT() { return top;} +public int GetL() { return left;} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +public int GetR() { return right;} -this. projectName = projec +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 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 +"65 ""About Dialog -public String getChangedAttribute() - { -return changedAttribute; - } +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 +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 +"66 ""Config Dialog - public String getDescription() - { -return description; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() - { -return modulePath; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public String getProjectName() - { -return projectName; - } - public String getRequirementID() - { -return requirementID; - } +// 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 - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public void setDescription(String description) - { -this. description = description; - } +// 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +/** + * 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; - 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() - { + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + + /** + * 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 +"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 -public int hashCode() + performance model Handler(String msg) { -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: 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 -"60 ""Thread Pool +this. strES = msg; + } -/** -* 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); + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -/** -* 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++) +//Re-execut +public String generateReport() { -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 + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + public void saveModel( int id) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +// save current model +database. saveCurrentModel( id); } -}"" -",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: 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 -"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 void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + 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 +"64 ""DOORs Thread Pool -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + //@param argsNo arguments are used. + public static void main(String args[]) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +public Requirement() { -setVisible ( false); -dispose (); } - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -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: 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 -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 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: 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: 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 -"74 ""database + 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: 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: 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 +"61 ""Worker Thread -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +/** +* True if this thread is currently processing. + */ +public boolean busy; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - /** - * Construct a connection object. - * @param Returns an object of type Connection +/** + * The constructor. + * + * @param o the thread pool */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +WorkerThread(ThreadPool o) { - Class. fo +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; /** -* 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 +* 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. */ - public int get + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - /** -* 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 +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public void saveCurrentModel( int graphId) + synchronized public void waitBegin() { -conn = this. getConnect +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e /** -* 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 +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - 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) + synchronized public void workerBegin() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +_ activeThreads++; +_ started = true; +notify(); + } -public void solveStructureEquation() + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +_ activeThreads--; +notify(); + } -public void getTrackVariableName() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +_ 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; -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 + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - public Vector getImpactReport() + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -//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 -"62 ""Call Back + super ("""" Search Result GUI """"); -private Hash table requirementDescTable = new Hash table(); + container = get Content Pane (); - private Hash table constraintDescTable = new Hash table(); + set Size ( 800 , 250 ); - private Hash table performanceModelTable = new Hash table(); + panel = new JPanel (); - private PerformanceModel performance model= null + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In - public void parseSpeculateInformation(String str) + public static void main ( String [] args ) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + Impact Report im = new Impact Report (); -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + } -public void pullInformationFromDoors() + public Vector search Date () { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public void insertValuesInDataBase() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + pair Vector = new Vector (); + query String Combo . remove All Items (); - public void createExecuteString() - { + query String Combo . add Item ("""" Select Query String """"); -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + Socket server ; + String line = new String (); -public void parseImpactReport(String str) - { + // Select Actions -Connection conn = null; + public void action Performed ( Action Event e ) + { -Statement stmt = null; + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -Vector constraintsVector = null; -Vector driversVector = null; + // Button Actions -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 -"66 ""Config Dialog +public void action Performed ( Action Event e ) { -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -// 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 (); -} + public void impact Report ( String id ) + { -// 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 -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 -"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;/ + // super ("""" Impact Report """"); + container = get Content Pane (); - 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 + set Size ( 1020 , 740 ); -// 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 + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + public Vector get Constraint From Data Base () { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + Vector v = new Vector (); - // 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. + Socket server ; + String line = new String (); - public void Dispatch + try + { + server = new Socket ( server IP , 1701 ); - public String getErrorMessage() - { - return errMsg; - } + if ( server . is Connected () ) + { + Buffered - public boolean Contains(String ContextString, String SearchString) + + public Vector get Driver From Data Base () { -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 -"79 ""performance model Handler + Vector v = new Vector (); -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + Socket server ; + String line = new String (); - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - 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: 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 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - performance model Handler(String msg) + public static int count = 0; + + public PerformanceModel(String name, long queryID) { -this. strES = msg; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public void messageParser() + public Vector getConstraints() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + public String getName() + { +return name; + } -//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 void setName(String name) + { +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - public void saveModel( int id) + public void addConstraint(ConstraintsDescription constraint) { -// save current model -database. saveCurrentModel( id); +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); } - 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -public chartoken; -public int theLine; + dd = (DriverDescription) this. driverVector. get( i) -public Symbol( char tok, int line ) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + 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 +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 +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 +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 +"90 ""Merge Model -/** - * 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; +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) + // Construct Visual model for Merge Event +public void BuildEvent() { -if( opSym. token == '(' && clSym. token != ')' || - + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - /** - * 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: 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 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +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 +"83 ""Variable - // database and eventserver information - S +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 - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -try +this. id = id; +this. type = type; +this. -public static void main(String args[]) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -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 +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -// 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"""" +//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 - private void saveMenuItemActionPerformed (ActionEvent evt) +public String toString() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the id. +* @return int +*/ + public String getId() { -exitApplication(); +return id; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -openEventsMenuItemActionPerformed( evt); +return logic; } - // 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) + /** +* Returns the name. +* @return String +*/ + public String getName() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +return name; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } -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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -public Requirement() {// empty constructor + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -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: 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 -"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 + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() -{ + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -/ 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 -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 -"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); + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +",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 +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 +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: 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 +"89 ""Event Line -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +protected int top, left, right, bottom; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public EventLine ( int t, int l, int r, int b) { -owner = o; +top = t; +left = l; +right = r; +bottom = b; } -/** - * 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 -"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 -"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 +public int GetT() { return top;} +public int GetL() { return left;} - //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. +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 +"73 ""Constraints -//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 +String id; + String name; + double value; + String logic; -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ + Constraints(String id, String name, double value, String logic){ this. id = id; -this. type = type; this. name = name; this. value = value; -this. logic - +this. logic = logic; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } @@ -9185,8 +8770,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -9195,12 +8779,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -9218,8 +8800,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -9243,265 +8824,147 @@ this. name = name; */ 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P + public Impact Report () + { - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + super ("""" Search Result GUI """"); + container = get Content Pane (); - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + set Size ( 800 , 250 ); + panel = new JPanel (); - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In - /** -* 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: 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 -"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 static void main ( String [] args ) + { -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + Impact Report im = new Impact Report (); + } -public Object clone() throws CloneNotSupportedException + + public Vector search Date () { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public void ParseEvent(String TextLine) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { - 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 + pair Vector = new Vector (); - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + query String Combo . remove All Items (); -if ( m_Eve + query String Combo . add Item ("""" Select Query String """"); -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 -"73 ""Constraints + Socket server ; + String line = new String (); -String id; - String name; - double value; - String logic; + // Select Actions - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + 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 ); + } + } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + // Button Actions - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - /** -* 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; - } + public void impact Report ( String id ) + { - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + // super ("""" Impact Report """"); + container = get Content Pane (); - /** -* 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 -"86 ""EB Shape + set Size ( 1020 , 740 ); + this . query ID = id ; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + System . out . println ("""" Impact Report Constructor ..... ID """" + -public EBShape( int xpos, int ypos, Color col) + public Vector get Constraint From Data Base () { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + Vector v = new Vector (); - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + Socket server ; + String line = new String (); - public boolean match( int mx, int my) - { -return true; - } + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - public int GetX() - { -return x; - } - public int GetY() + public Vector get Driver From Data Base () { -return y; - } - - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } + Vector v = new Vector (); - public String GetProject() - { -return ProjectName; - } + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - 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 + 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 "77 ""Model Driver String msg=""""""""; @@ -9520,58 +8983,342 @@ 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: 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 -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 -"83 ""Variable +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: 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; -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 +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +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 +"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[]) { -this. id = id; -this. type = type; -this. +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 +"82 ""Tokenizer -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +/** + * 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 +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 +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 +"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() { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ +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 +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: 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 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ this. id = id; -this. type = type; this. name = name; this. value = value; -this. logic - +this. logic = logic; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } @@ -9580,8 +9327,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -9590,12 +9336,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -9613,8 +9357,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -9638,226 +9381,355 @@ this. name = name; */ 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 +"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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - /** -* 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; - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +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 - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +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++ - /** -* 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 -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 -"74 ""database + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + 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 - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + 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 - /** - * 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 +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - /** -* 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 +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 +"90 ""Merge Model - /** -* 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) +public MergeModel(EBT em) { -conn = this. getConnect +super( em); + MinimumNoRects = 3; + } -/** -* 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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - /** -* 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 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 +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: 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 +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 +"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 +"92 ""New Model -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 NewModel(EBT em) +{ +super( em); + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -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 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 +"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 +"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 +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 +"64 ""DOORs Thread Pool - 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 -"71 ""Requirement +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() -{ -} + //@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 +"90 ""Merge Model -public Object clone() throws CloneNotSupportedException + +public MergeModel(EBT em) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +super( em); + MinimumNoRects = 3; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -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: 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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +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: 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 +"90 ""Merge Model + + +public MergeModel(EBT em) + { super( em); + MinimumNoRects = 3; } -// Construct Visual model for Merge Event + // 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 +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent 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 -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: 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: 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 +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 +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 +"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 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 +"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 +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 +"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 "55 ""eventserver Threadstatic private int count = 0; private int taskNumber; protected Done done; @@ -9932,186 +9804,88 @@ 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 -"76 ""Evaluator +",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 +"81 ""subscribermanager -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= +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; -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 + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] + // 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 { -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -private static class Token +// 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 { -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 -"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) + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +// 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 +"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; -} -public void sendImpactReportToEventServer(String text) + + DOORsThread(ServerSocket ss) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + theServer = ss; + count++; + taskNumber = count; + } -// 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) + while( true) { -// 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 -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 -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: 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 + 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 "63 ""Doors Thread static private int count = 0; @@ -10141,7 +9915,10 @@ static private int count = 0; 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 +",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 +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: 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 +"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 "81 ""subscribermanager Socket aSocket; @@ -10192,296 +9969,7 @@ 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 -"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 -"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 -"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 -"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 -"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 -"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 +",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 "88 ""Event Model @@ -10597,243 +10085,155 @@ 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 -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 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +",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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +// 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 - /** -* 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 +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -/** -* 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 +// 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: 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: 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 +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 +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: 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 +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 +"53 ""Performance Model +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + private long queryID = 0; + public static int count = 0; - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public PerformanceModel(String name, long queryID) { -_ activeThreads--; -notify(); +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public Vector getConstraints() { -_ 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 -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 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +return constraintVector; } + public Vector getDrivers() + { +return driverVector; + } - // 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); + public String getName() + { +return name; } + public void setName(String name) + { +this. name = name; + } - // Construct Visual model for Merge Event -public void BuildEvent() + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -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 -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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); +else + this. driverVector. add( driver); } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - protected void paintComponent(Graphics g) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -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 -"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 + dd = (DriverDescription) this. driverVector. get( i) -public Notification_Event() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - + cd = (ConstraintsDescription) this -public Object clone() throws CloneNotSupportedException + public long getQueryID() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - +return this. queryID; + } - public void ParseEvent(String TextLine) + public void setQueryID( long id) { - 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 - +this. queryID = id; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String toString() { -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: 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 -"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 +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 "94 ""Refine Model public RefineModel(EBT em) @@ -10855,245 +10255,404 @@ 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 -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 -"79 ""performance model Handler +",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 +"47 ""Impact Report -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +private String server IP = """" local host """"; + private JPanel center Panel = null ; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - performance model Handler(String msg) - { -this. strES = msg; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P - public void messageParser() + public Impact Report () { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + super ("""" Search Result GUI """"); -//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; + container = get Content Pane (); + set Size ( 800 , 250 ); -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + panel = new JPanel (); + panel . set Layout ( null ); - public void saveModel( int id) + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -// save current model -database. saveCurrentModel( id); - } + Impact Report im = new Impact Report (); - 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 -"89 ""Event Line -protected int top, left, right, bottom; + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); -public int GetT() { return top;} + query String Combo . remove All Items (); -public int GetL() { return left;} + query String Combo . add Item ("""" Select Query String """"); -public int GetR() { return right;} + Socket server ; + String line = new String (); -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 -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: 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + // Select Actions -public Requirement() -{ -} + public void action Performed ( Action Event e ) + { -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - 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 -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: 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +public void action Performed ( Action Event e ) { - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d + if ( submit Button == e . get Source ()) { - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); + for ( int i = 0 ; i < pair Vector . size (); i ++) { -addWindowListener( new WindowAdapter() -{ + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - 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 + public void impact Report ( String id ) { -Notification + // super ("""" Impact Report """"); -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + container = get Content Pane (); + set Size ( 1020 , 740 ); -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N + this . query ID = id ; -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 + System . out . println ("""" Impact Report Constructor ..... ID """" + -void DeleteRelatedEvents() + public Vector get Constraint From Data Base () { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - m_Deleterequirement List. remove(0); + Vector v = new Vector (); + Socket server ; + String line = new String (); -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 + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -void UpdateDisplayList() + + + public Vector get Driver From Data Base () { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + Vector v = new Vector (); - // 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 + 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 +"65 ""About Dialog -private boolean Analyze_CheckSubscription(String str) +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 +"92 ""New Model + +public NewModel(EBT em) { -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 -"60 ""Thread Pool +super( em); + } -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** + + // 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 +"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: 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 +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 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 +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 +"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 +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 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** * The backlog of assignments, which are waiting * for the thread pool. */ @@ -11155,156 +10714,24 @@ for ( int i=0; i< threads. length; i++) { 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 -"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 -"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; - } +",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 +"54 ""eventserver - public String createKey() +public static void (String args[]) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { +p -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 -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 +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 +"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 "79 ""performance model Handler String strES; // string received from eventserver @@ -11360,284 +10787,287 @@ database. injectVariables( id, variable); // 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 -"90 ""Merge Model +",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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -public MergeModel(EBT em) + 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 ) { -super( em); - MinimumNoRects = 3; - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - // 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: 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 -"52 ""Pair + public String get Description () { + return this . description ; + } -private String queryID; - private String queryString; + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - public Pair(String queryID, String queryString) { + public String get Project Name () { + return this . project Name ; + } -this. queryID = queryID; -this. queryString = queryString; + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; } - public String getQueryID() { -return this. queryID; + public String get Value () { + return this . value ; } - public String getQueryString() { -return this. queryString; + public void set Description ( String description ) { + this . description = description ; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public void set Logic ( String logic ) { + this . logic = logic ; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + 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 ; + } - }"" -",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 -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: 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 -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 -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 -"69 ""Notification Event + public void set Units ( String units ) { + this . units = units ; + } -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 void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } - 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 set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -if ( m_Eve + public String to String () { -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: 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 -"54 ""eventserver + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -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 -"93 ""Obsolete Model +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 ObsoleteModel(EBT em) -{ -super( em); - } +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 +"65 ""About Dialog -// 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 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 +"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 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 -"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; +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -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: 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 -"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 +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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 +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 +"52 ""Pair - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +private String queryID; + private String queryString; -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 Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -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 String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } - 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 void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } - 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 String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - 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 + }"" +",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 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 +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 +"93 ""Obsolete Model +public ObsoleteModel(EBT em) +{ +super( em); + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +// 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 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 -"63 ""Doors Thread -static private int count = 0; +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 +"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; - - DOORsThread(ServerSocket ss) + EventServerThread(ServerSocket ss) { theServer = ss; count++; taskNumber = count; - } - - - public void run() + ep = new EventParser(); + } public void run() { while( true) @@ -11646,167 +11076,200 @@ static private int count = 0; { 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 -"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 ; +PrintWriter output = new P - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +public String getNextID() { - - 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 +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public static void main ( String [] args ) +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - Impact Report im = new Impact Report (); - } +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public Vector search Date () + public String getConstraintFromDataBase(String queryID) { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - 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 ) + 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 +"76 ""Evaluator - pair Vector = new Vector (); +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= - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +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 - Socket server ; - String line = new String (); +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 - // Select Actions - public void action Performed ( Action Event e ) - { +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 { - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +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 -public void action Performed ( Action Event e ) { +/** + * 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 - if ( submit Button == e . get Source ()) { +/** + * 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 - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - if ( pair - . get + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public void impact Report ( String id ) - { +/** + * 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 - // super ("""" Impact Report """"); - container = get Content Pane (); +/* + * 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 - set Size ( 1020 , 740 ); - this . query ID = id ; + /** + * 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. - System . out . println ("""" Impact Report Constructor ..... ID """" + +/** + * 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 Vector get Constraint From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); +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: 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 +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: 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: 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 +"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 - 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: 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 -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 -"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 +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 "58 ""Subscribed Model private String SubscriberName; @@ -11832,3275 +11295,3362 @@ 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 -"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 +",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 +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: 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 +"51 ""Driver Inner Panel - public Speculate Gui () - { +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - super ("" Speculate GUI ""); + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - container = get Content Pane (); +panel = new JPanel(); - set Size ( 800 , 600 ); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 +"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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; - // Submit Listener +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - send Query TO Server (); - } +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - if ( e . get Source () == fetch Button ) { +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: 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 +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 +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 +"90 ""Merge Model - System . out . println ("" Fetch Button Pressed +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - void send Query TO Server () - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +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 +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 +"63 ""Doors Thread - socket = new Socket ( ip , Port No ); +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + DOORsThread(ServerSocket ss) { + theServer = ss; + count++; + taskNumber = count; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + public void run() + { - String project Name = this . proj Name Text . get + 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: 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 +"90 ""Merge Model - public static void main ( String [] args ) +public MergeModel(EBT em) { - 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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ super( em); + MinimumNoRects = 3; } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + 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 -"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 +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 +"79 ""performance model Handler - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public static void main(String args[]) + performance model Handler(String msg) { -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 - +this. strES = msg; + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public void messageParser() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try +//Re-execut +public String generateReport() { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public void saveModel( int id) { -openEventsMenuItemActionPerformed( evt); +// save current model +database. saveCurrentModel( id); } - // 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(); + 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 +"64 ""DOORs Thread Pool -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 -"54 ""eventserver +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public static void (String args[]) + + //@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( int i=0; i<4; i++) - { -p + 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 +"76 ""Evaluator -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 -"48 ""Constraint Inner Panel +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 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 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[ ] +{ -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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 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 +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 - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { +/** + * 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 - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +/** + * 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 -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 -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 -"62 ""Call Back +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -private Hash table requirementDescTable = new Hash table(); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); +/** + * 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 - private PerformanceModel performance model= null +/* + * 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 - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + /** + * 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. -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +/** + * 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 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 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 +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 +"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 void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + 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 parseImpactReport(String str) +public void getIP Server( String serverIP) { +this. serverIP = serverIP; + } -Connection conn = null; -Statement stmt = null; + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; +public void drawModel() +{ +repaint(); +} -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 -"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; +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - 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 +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -public String getNextID() - { -try +public void Clicked ( int x, int y) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -public String searchDate() +public void CheckNotifyStatus() { -String dateString = new String(); -Vector dateVector = new Vector(); -try +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + protected void BuildEvent(){} - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + protected void AddLine( int t, int l, int r, int b) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try +protected void AddEventRect( int x, int y, int colorStatus) { - 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 -"85 ""Decompose Model +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even -public DecomposeModel(EBT em) +public String getrequirement Text(String r, String p, String m) { -super( em); -MinimumNoRects = 3; +return new String(""""requirementwill go here""""); } - // Construct Visual model for Merge Event -public void BuildEvent() + public StringBuffer GenerateEvent() { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public StringBuffer GenerateEvent() + protected void paintComponent(Graphics g) { -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 -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 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 -"92 ""New Model - -public NewModel(EBT em) +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) { -super( em); - } - +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 +"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;/ - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + 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 -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 -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: 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 -"76 ""Evaluator +// 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 -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= +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -private static class Precedence +String sName, sReqno, sModule, sKey1, sKey2; +try { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + System. o -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ + // 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. -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + public void Dispatch -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 String getErrorMessage() + { + return errMsg; + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -/** - * 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 +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: 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 +"67 ""Event Detail Dialog -/** - * 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 +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 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 +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -/** - * 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 +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} -/* - * 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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - /** - * 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. +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 +"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); /** - * 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. +* 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 - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { 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 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + Connection conn; + ResultSet rs; + Statement stmt; -public void ParseRequirement(String TextLine) + // 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) { - 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 -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 -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 -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 -"71 ""Requirement + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ -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 +public void sendImpactReportToEventServer(String text) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -public void ParseRequirement(String TextLine) + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { - 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 -"69 ""Notification Event +// 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 +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 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: 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 +"94 ""Refine Model -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 RefineModel(EBT em) +{ +super( em); + } -public Notification_Event() + // Construct Visual model for Merge Event +public void BuildEvent() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + 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 +"50 ""Driver Description -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - 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 + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -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 -"62 ""Call Back +this. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; + } -private Hash table requirementDescTable = new Hash table(); + public String getDescription() + { +return description; + } - private Hash table constraintDescTable = new Hash table(); + public String getFromAttribute() + { +return fromAttribute; + } - private Hash table performanceModelTable = new Hash table(); + public String getModulePath() + { +return modulePath; + } - private PerformanceModel performance model= null + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - public void parseSpeculateInformation(String str) + public String getToAttribute() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -public void identifyPerformanceModels() + public void setDescription(String description) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -public void pullInformationFromDoors() + public void setModulePath(String modulePath) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public void insertValuesInDataBase() + public void setRequirementID(String requirementID) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 void createExecuteString() + 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() { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void parseImpactReport(String str) +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 +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 +"58 ""Subscribed Model -Connection conn = null; - -Statement stmt = null; +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -Vector constraintsVector = null; -Vector driversVector = null; +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -ConstraintsDescription constraint = null; +public String GetSubscriberName() { return SubscriberName;} -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 -"73 ""Constraints +public String GetSubscriberReqno() { return SubscriberReqno;} -String id; - String name; - double value; - String logic; +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +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 +"88 ""Event Model - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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); - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +public void drawModel() +{ +repaint(); +} - /** -* 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; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - /** -* 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 -"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; +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 - DOORsThread(ServerSocket ss) +public void CheckNotifyStatus() { - theServer = ss; - count++; - taskNumber = count; - } +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public void run() - { + protected void BuildEvent(){} - 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 -"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 + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -this. id = id; -this. type = type; -this. +Even -//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 +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -//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 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,For speculative events; the eventserver shall construct a composite event message.,132,0 +"78 ""Notification Event -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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(); +} - /** -* Returns the id. -* @return int -*/ - public String getId() +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -return id; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public void ParseEvent(String TextLine) { -return logic; - } +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - /** -* Returns the name. -* @return String -*/ - public String getName() +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; +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 +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 +"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(); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + +//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; } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { + 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: 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 +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 +"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; + } + /** -* Sets the value. -* @param value The value to set +* Returns the id. +* @return int */ - public void setValue( double value) { -this. value = value; + public String getId() + { +return id; } /** -* Returns the speculateValue. -* @return double +* Returns the name. +* @return String */ - public double getSpeculateValue() { -return speculateValue; + public String getName() + { +return name; } /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set +* Returns the value. +* @return double */ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + public double getValueFrom() + { +return valueFrom; } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; + public double getValueTo() + { +return valueTo; } /** -* Sets the type. -* @param type The type to set +* Sets the id. +* @param id The id to set */ - public void setType(String type) { -this. type = type; + public void setId(String id) + { +this. id = id; } - /** -* Returns the project_ path. -* @return String + ** +* Sets the name. +* @param name The name to set */ - public String getProject_ path() { -return project_ path; + public void setName(String name) + { +this. name = name; } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set + ** +* Sets the value. +* @param value The value 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: 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 -"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= + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -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 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 +"92 ""New Model -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +public NewModel(EBT em) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +super( em); + } -private static class Token + // Construct Visual model for Merge Event +public void BuildEvent() { -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; +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -/** - * 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 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 +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: 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 +"52 ""Pair -/** - * 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 +private String queryID; + private String queryString; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + } + public String getQueryID() { +return this. queryID; + } -/** - * 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 + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -/* - * 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 + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - /** - * 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. + }"" +",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 +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 +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 +"private JPanel center Panel = null ; -/** - * 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. - */ + 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 () + { -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 -"63 ""Doors Thread + super ("" Speculate GUI ""); -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + container = get Content Pane (); + set Size ( 800 , 600 ); - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public void run() - { + // Submit Listener - 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 -"87 ""EBT + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + send Query TO Server (); + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + if ( e . get Source () == fetch Button ) { - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + System . out . println ("" Fetch Button Pressed - public boolean mouseDown( java. awt.Evente, int x, int y) + void send Query TO Server () { - return true; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - 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()); -} + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -public void mouseExited( java. awt. event.MouseEvente){} + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -public void mousePressed( java. awt. event.MouseEvente){} + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public void mouseReleased( java. awt. event.MouseEvente){} + String [] attribute = { "" Value "", "" Attribute "" }; -public void mouseEntered( java. awt. event.MouseEvente){} + String project Name = this . proj Name Text . get -public void paint(Graphics g) {} -public void update(Graphics g) {} + 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: 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 +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: 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 +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 +"49 ""Constraints Description - public JSplitPane getSplitPane() -{ -return splitPane; -} +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 void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -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 -"47 ""Impact Report + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -private String server IP = """" local host """"; - private JPanel center Panel = null ; + } - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + public String get Description () { + return this . description ; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public String get Logic () { + return this . logic ; + } - public Impact Report () - { + public String get Module Path () { + return this . module Path ; + } - super ("""" Search Result GUI """"); + public String get Project Name () { + return this . project Name ; + } - container = get Content Pane (); + public String get Requirement ID () { + return this . requirement ID ; + } - set Size ( 800 , 250 ); + public String get Units () { + return this . units ; + } - panel = new JPanel (); + public String get Value () { + return this . value ; + } - panel . set Layout ( null ); + public void set Description ( String description ) { + this . description = description ; + } - this . server IP = - JOption Pane - . show In + public void set Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - public static void main ( String [] args ) - { + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } - Impact Report im = new Impact Report (); + 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 Vector search Date () - { + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { + public String get Attribute () { + return this . attribute ; + } - pair Vector = new Vector (); + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - query String Combo . remove All Items (); + public String get Performance Model Name () { + return this . performance Model Name ; + } - query String Combo . add Item ("""" Select Query String """"); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - Socket server ; - String line = new String (); + 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 """" - // Select Actions +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 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 ); - } - } +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 +"74 ""database - // Button Actions +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public void action Performed ( Action Event e ) { + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + /** + * 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 - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get + /** +* 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 - public void impact Report ( String id ) + /** +* 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 - // super ("""" Impact Report """"); - container = get Content Pane (); +/** +* 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 - set Size ( 1020 , 740 ); + /** +* 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 - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +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 Vector get Constraint From Data Base () +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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +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 - try - { - server = new Socket ( server IP , 1701 ); + 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 +"91 ""Modify Model - if ( server . is Connected () ) - { - Buffered +public ModifyModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public Vector get Driver From Data Base () - { - Vector v = new Vector (); +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + 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 +"91 ""Modify Model - 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 -"70 ""Notification Processing +public ModifyModel(EBT em) +{ +super( em); + } -// 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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() +public StringBuffer GenerateEvent() { - public void windowClosing(WindowEvent evt) - { -try +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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 + protected void paintComponent(Graphics g) { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +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 +"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 -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -exitApplication(); - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - // action for """"Open Events"""" in popup menu +// action for """"Open First Record"""" 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) + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -if (! listModel. isEmpty()) +int index = eventList. getSelectedIndex(); +if ( index != -1) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + try { -new AboutDialog ( this, true). show(); - } - +N -void UpdateDisplayList() +void DeleteEvent(String SubscriberName, String EventID) { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; try { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + int i, j=-1; + for ( i=0; i< events. size(); i++) { - "" -",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 -"82 ""Tokenizer +Notification_Event nEvt = (Notification_Event) events. get( i); +i -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +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 -/** - * 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( ) ) +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 - /** - * 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( ) +private boolean Analyze_CheckSubscription(String str) { -String result = """""""" + ch; +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 +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 +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 +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 +"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;/ -for( ; nextChar( ); result += ch ) + 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 - /** - * 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 +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * 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--; +String sName, sReqno, sModule, sKey1, sKey2; try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} +{ + 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. -/** - * 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 + public void Dispatch -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public String getErrorMessage() + { + return errMsg; + } -private void skip + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -/** - * 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: 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: 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 -"77 ""Model Driver +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 +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 +"56 ""Event Parser -String msg=""""""""; +private Connection conn; + private ResultSet rs; + private Statement stmt; -public ModelDriver(String text) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -this. msg = text; -init(); - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void init() + public void updateEvent(String str, String ID) { -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 -"79 ""performance model Handler +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -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 +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - performance model Handler(String msg) - { -this. strES = msg; - } - public void messageParser() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -//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; +//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 int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - public void saveModel( int id) +public void impactReport(String str) { -// save current model -database. saveCurrentModel( id); - } +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 +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 +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: 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 +"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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - 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: 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 -"62 ""Call Back + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public void parseSpeculateInformation(String str) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -public void identifyPerformanceModels() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N -public void pullInformationFromDoors() +void DeleteEvent(String SubscriberName, String EventID) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -public void insertValuesInDataBase() +void DeleteRelatedEvents() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +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 -public void parseImpactReport(String str) +void UpdateDisplayList() { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -Connection conn = null; -Statement stmt = null; + // 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 -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 -"95 ""Text Model +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 +"89 ""Event Line -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +protected int top, left, right, bottom; -public TextModel(EBT e) + +public EventLine ( int t, int l, int r, int b) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +top = t; +left = l; +right = r; +bottom = b; +} - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +public int GetT() { return top;} -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +public int GetL() { return left;} -public void ShowInfo( int CE) +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 +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 +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 +"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: 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: 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: 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 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} +super( em); + } -public void drawModel() + +// Construct Visual model for Merge Event +public void BuildEvent() { -repaint(); -} + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -protected void paintComponent(Graphics g) +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: 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 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) { - super. paintComponent( g); +super( em); +MinimumNoRects = 3; + } -if (HideMsg == true) + + // Construct Visual model for Merge Event +public void BuildEvent() { - 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 -"82 ""Tokenizer + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + +public StringBuffer GenerateEvent() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; /** - * Gets current line number. - * @return current line number. + * The thread pool that this object belongs to. */ -public int getLineNumber( ) -{ -return currentLine; -} +public ThreadPool owner; /** - * Gets error count. - * @return error count. + * The constructor. + * + * @param o the thread pool */ -public int getErrorCount( ) +WorkerThread(ThreadPool o) { -return errors; +owner = o; } /** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants + * Scan for and execute tasks. */ -public char getNextOpenClose( ) +public void run() { -while( nextChar( ) ) +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 +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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public Impact Report () + { -for( ; nextChar( ); result += ch ) + super ("""" Search Result GUI """"); + container = get Content Pane (); + set Size ( 800 , 250 ); - /** - * 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 + panel = new JPanel (); + panel . set Layout ( null ); -/** - * 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 ) { } -} + this . server IP = + JOption Pane + . show In -/** - * 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 + public static void main ( String [] args ) + { + Impact Report im = new Impact Report (); -/** - * 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 + public Vector search Date () + { -/** - * 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 -"89 ""Event Line - -protected int top, left, right, bottom; + 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 ) + { -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + pair Vector = new Vector (); + query String Combo . remove All Items (); -public int GetT() { return top;} + query String Combo . add Item ("""" Select Query String """"); -public int GetL() { return left;} + Socket server ; + String line = new String (); -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: 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 -"49 ""Constraints Description + // Select Actions -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + public void action Performed ( Action Event e ) + { - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - 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 void action Performed ( Action Event e ) { - } + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - public String get Description () { - return this . description ; - } + Pair pair = ( Pair ) pair Vector . get ( i ); - public String get Logic () { - return this . logic ; - } + if ( pair + . get - 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 void impact Report ( String id ) + { - public String get Units () { - return this . units ; - } + // super ("""" Impact Report """"); - public String get Value () { - return this . value ; - } + container = get Content Pane (); - public void set Description ( String description ) { - this . description = description ; - } + set Size ( 1020 , 740 ); - public void set Logic ( String logic ) { - this . logic = logic ; - } + this . query ID = id ; - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + System . out . println ("""" Impact Report Constructor ..... ID """" + - 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 Vector get Constraint From Data Base () + { - public void set Units ( String units ) { - this . units = units ; - } + Vector v = new Vector (); - public void set Value ( String units ) { - this . value = units ; - } + Socket server ; + String line = new String (); - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + try + { + server = new Socket ( server IP , 1701 ); - public String get Attribute () { - return this . attribute ; - } + if ( server . is Connected () ) + { + Buffered - 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 Vector get Driver From Data Base () + { - public String to String () { + Vector v = new Vector (); - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -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 + 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 +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= -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: 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 -"73 ""Constraints -String id; - String name; - double value; - String logic; +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[ ] +{ - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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 { - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +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 - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +/** + * 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 - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +/** + * 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + +/* + * 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 /** -* 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: 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 -"49 ""Constraints Description + * 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. -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 ; +/** + * 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 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 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: 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 +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 +"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 String get Description () { - return this . description ; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +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 String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } +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 void set Logic ( String logic ) { - this . logic = logic ; - } +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 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 double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + 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 void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + 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 void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } +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 +"92 ""New Model - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; +public NewModel(EBT em) +{ +super( em); } - 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 """" + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -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 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 +"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 +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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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 -"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: 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: 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 -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 -"61 ""Worker Thread -/** -* True if this thread is currently processing. - */ -public boolean busy; +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +// 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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; + +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 +"91 ""Modify Model -/** - * Scan for and execute tasks. - */ -public void run() +public ModifyModel(EBT em) { -Runnable target = null; +super( em); + } -do -{ -target = owner. getAssignment(); -if ( target!=null) + + // Construct Visual model for Merge Event +public void BuildEvent() { - 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 -"65 ""About Dialog + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -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 -"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 StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) + 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 +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 +"53 ""Performance Model -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public static int count = 0; + + public PerformanceModel(String name, long queryID) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + public Vector getConstraints() + { +return constraintVector; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + 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)) { -setVisible ( false); -dispose (); } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -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 -"88 ""Event Model + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -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 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 EventModel(EBT e) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public void getIP Server( String serverIP) + public void setQueryID( long id) { -this. serverIP = serverIP; +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 +"95 ""Text Model - public void ClearVectors() +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) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + // 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 drawModel() + public void showText(EBShape sh) { -repaint(); -} + // 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 drawModel(EBShape sh) +public void ShowInfo( int CE) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); } - -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public void drawModel() { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } +repaint(); } -public void Clicked ( int x, int y) +protected void paintComponent(Graphics g) { -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) + super. paintComponent( g); + +if (HideMsg == true) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + 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 +"82 ""Tokenizer -public void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - protected void BuildEvent(){} +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - protected void AddLine( int t, int l, int r, int b) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -EventLines. addElement( new EventLine( t, l, r, b)); +return errors; } -protected void AddEventRect( int x, int y, int colorStatus) +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) { -if ( colorStatus == 1) +while( nextChar( ) ) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even -public String getrequirement Text(String r, String p, String m) + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -return new String(""""requirementwill go here""""); - } +return Character. isJavaIdentifierPart( ch ); +} - public StringBuffer GenerateEvent() +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - 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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** + * 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 -public Requirement() {// empty constructor +/** + * 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 ) { } } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +/** + * 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 - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -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 -"75 ""Driver +private void skip -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; - } +/** + * 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: 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 +"51 ""Driver Inner Panel - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +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 +"65 ""About Dialog - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +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 +"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 +"63 ""Doors Thread - public double getValueTo() +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) { -return valueTo; + theServer = ss; + count++; + taskNumber = count; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void run() { -this. id = id; - } + 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 +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 +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 +"54 ""eventserver - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public static void (String args[]) { -this. name = name; - } +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 +"77 ""Model Driver +String msg=""""""""; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public ModelDriver(String text) { -this. valueFrom = valueFrom; +this. msg = text; +init(); } - public void setValueTo( double value) + public void init() { -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 -"52 ""Pair +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 +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 +"48 ""Constraint Inner Panel -private String queryID; - private String queryString; +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 - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + if ( server . is Connected () ) + { + Buffered R - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + 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 ; }"" -",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: 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 -"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 -"86 ""EB Shape +",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 +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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public EBShape( int xpos, int ypos, Color col) + performance model Handler(String msg) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. strES = msg; } - - public void Updaterequirement Info(String rno, String pname, String mname) + public void messageParser() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public boolean match( int mx, int my) - { -return true; - } +//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 GetX() - { -return x; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public int GetY() + public void saveModel( int id) { -return y; - } - - public Color GetC() -{ -return c; +// save current model +database. saveCurrentModel( id); } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - - public String GetModule() - { -return ModulePath; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",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: 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 -"93 ""Obsolete Model +",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 +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 +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 +"89 ""Event Line -public ObsoleteModel(EBT em) -{ -super( em); - } +protected int top, left, right, bottom; -// Construct Visual model for Merge Event -public void BuildEvent() +public EventLine ( int t, int l, int r, int b) { - 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 -"52 ""Pair - -private String queryID; - private String queryString; +top = t; +left = l; +right = r; +bottom = b; +} - public Pair(String queryID, String queryString) { +public int GetT() { return top;} -this. queryID = queryID; -this. queryString = queryString; +public int GetL() { return left;} - } +public int GetR() { return right;} - public String getQueryID() { -return this. queryID; - } +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 +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 +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 +"77 ""Model Driver - public String getQueryString() { -return this. queryString; - } +String msg=""""""""; - public void setQueryID(String queryID) { -this. queryID = queryID ; +public ModelDriver(String text) + { +this. msg = text; +init(); } - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + 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: 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 +"74 ""database - }"" -",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 -"80 ""Requirement +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public Requirement() {// empty constructor + /** + * 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 -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + /** +* 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 - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** +* 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 -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 -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: 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 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 -"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; +/** +* 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 - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + /** +* 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 -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +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 - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +public void setCalculatedValues() { - 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: 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 -"62 ""Call Back +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 -private Hash table requirementDescTable = new Hash table(); + 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: 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 +"79 ""performance model Handler - private Hash table constraintDescTable = new Hash table(); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - private Hash table performanceModelTable = new Hash table(); + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - private PerformanceModel performance model= null + performance model Handler(String msg) + { +this. strES = msg; + } - public void parseSpeculateInformation(String str) + public void messageParser() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -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 -"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 -"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) - { +//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; -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public String getDescription() - { -return description; - } - public String getFromAttribute() + public void saveModel( int id) { -return fromAttribute; +// save current model +database. saveCurrentModel( id); } - public String getModulePath() - { -return modulePath; - } - public String getProjectName() - { -return projectName; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - public String getRequirementID() - { -return requirementID; - } + 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 +"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 +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: 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 +"79 ""performance model Handler - public String getToAttribute() - { -return toAttribute; - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) + performance model Handler(String msg) { -this. fromAttribute = fromAttribute; +this. strES = msg; } - public void setModulePath(String modulePath) + public void messageParser() { -this. modulePath = modulePath; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +//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 void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - 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() + public void saveModel( int id) { -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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); +// save current model +database. saveCurrentModel( id); } - // 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 - + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",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 -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 -"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: 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 +",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: 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 "88 ""Event Model @@ -15216,210 +14766,443 @@ 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 -"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 +",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 +"54 ""eventserver - public Speculate Gui () +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 - 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 - +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 +"74 ""database - // Submit Listener - public void action Performed ( Action Event e ) { +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - if ( e . get Source () == submit Button ) { + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - send Query TO Server (); - } + /** + * 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 - if ( e . get Source () == fetch Button ) { - System . out . println ("" Fetch Button Pressed + /** +* 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 - void send Query TO Server () + /** +* 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 - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +/** +* 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 - socket = new Socket ( ip , Port No ); + /** +* 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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +public void solveStructureEquation() { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - 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 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 static void main ( String [] args ) +public void setCalculatedValues() { - 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 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +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 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 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 +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 +"62 ""Call Back -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} +private Hash table requirementDescTable = new Hash table(); -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + private Hash table constraintDescTable = new Hash table(); -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 -"70 ""Notification Processing + private Hash table performanceModelTable = new Hash table(); -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + private PerformanceModel performance model= null - // database and eventserver information - S - public Notification_Processing() + public void parseSpeculateInformation(String str) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + +public void identifyPerformanceModels() { -try +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public static void main(String args[]) +public void pullInformationFromDoors() { -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 +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void insertValuesInDataBase() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - private void saveMenuItemActionPerformed (ActionEvent evt) + public void createExecuteString() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +public void parseImpactReport(String str) { -openEventsMenuItemActionPerformed( evt); - } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +Connection conn = null; +Statement stmt = null; - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +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,The eventserver shall send the customized message to each impacted executable model.,136,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 +"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 +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 +"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 +"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 { -new AboutDialog ( this, true). show(); - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -void UpdateDisplayList() + public void ParseEvent(String TextLine) { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; + 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 +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: 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 +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 +"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( ) { - 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 -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 +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 +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 +"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 +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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -15591,7 +15374,139 @@ return project_ path; 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 +",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 +"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 +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: 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: 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 +"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: 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 "87 ""EBT @@ -15683,158 +15598,247 @@ 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 -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: 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 -"89 ""Event Line +",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 +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 +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: 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 +"48 ""Constraint Inner Panel -protected int top, left, right, bottom; +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 -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -public int GetT() { return top;} + } -public int GetL() { return left;} -public int GetR() { return right;} +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -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 -"76 ""Evaluator + if ( server . is Connected () ) + { + Buffered R -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 void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -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 +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 +"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 +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 +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 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; -private static class Token + // 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 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; } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** - * 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 +// 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 +{ -/** - * 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 + // 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 +"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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + 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 -/** - * 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 +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -/* - * 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 +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - /** - * 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. + if ( server . is Connected () ) + { + Buffered R -/** - * 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. - */ + 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 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: 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 -"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 +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 +"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 "91 ""Modify Model public ModifyModel(EBT em) @@ -15865,204 +15869,47 @@ thisEvent. append( new Date(). toString()+ """"|""""); 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: 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 -"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 -"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 -"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: 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 -"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: - +",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 +"52 ""Pair - 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; +private String queryID; + private String queryString; -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + public Pair(String queryID, String queryString) { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +this. queryID = queryID; +this. queryString = queryString; + } -//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 + public String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } -//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 setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -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 + }"" +",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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -16234,213 +16081,335 @@ return project_ path; 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 -"52 ""Pair - -private String queryID; - private String queryString; - +",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 +"76 ""Evaluator - public Pair(String queryID, String queryString) { +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= -this. queryID = queryID; -this. queryString = queryString; - } +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 String getQueryID() { -return this. queryID; - } +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - public String getQueryString() { -return this. queryString; - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - }"" -",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 -"81 ""subscribermanager +/** + * 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 -Socket aSocket; - int ID; - String EventLog; +/** + * 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 - Connection conn; - ResultSet rs; - Statement stmt; +/** + * 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 - // 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 -{ +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -// 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 -{ +/** + * 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. + - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +/** + * 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 +"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 ) { -// 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 -"94 ""Refine Model -public RefineModel(EBT em) -{ -super( em); + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - // 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 -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 -"73 ""Constraints + public String get Description () { + return this . description ; + } -String id; - String name; - double value; - String logic; + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return 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 ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public void set Units ( String units ) { + this . units = units ; } + public void set Value ( String units ) { + this . value = units ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String get Impacted Constraint () { + return this . impacted Constraint ; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } + public String get Performance Model Name () { + return this . performance Model 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 + 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 +"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 "57 ""Event Notifier // Variables to process the requirement private String requirement No;//Requirement No. @@ -16494,149 +16463,9 @@ 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 -"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 -"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: 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 +",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 +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 +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 "68 ""Events Processor // event list private JList eventList; @@ -16752,9 +16581,8 @@ 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: 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: 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 +",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: 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 "private JPanel center Panel = null ; private JLabel des Label = null ; @@ -16823,192 +16651,126 @@ Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The even 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + }",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 +"private JPanel center Panel = null ; - /** -* 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. -*/ + 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 - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + // Speculate Gui -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + public Speculate Gui () { -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(); - } + super ("" Speculate GUI ""); + container = get Content Pane (); - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** -* 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 -"90 ""Merge Model + // Submit Listener -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + send Query TO Server (); + } -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 -"79 ""performance model Handler + if ( e . get Source () == fetch Button ) { -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 + System . out . println ("" Fetch Button Pressed - performance model Handler(String msg) + void send Query TO Server () { -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(); + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -//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; + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public void saveModel( int id) + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) { -// save current model -database. saveCurrentModel( id); - } + 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 +"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 - 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: 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 -"73 ""Constraints + //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. -String id; - String name; - double value; - String logic; + +//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 - Constraints(String id, String name, double value, String logic){ +//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 = logic; - } +this. logic - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + +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() { + public String getId() + { return id; } @@ -17017,7 +16779,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -17026,10 +16789,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -17047,7 +16812,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -17071,598 +16837,766 @@ this. name = name; */ 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 -"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(); + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public boolean match( int mx, int my) - { -return true; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public int GetX() - { -return x; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public int GetY() - { -return y; - } - - public Color GetC() -{ -return c; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public String GetModule() - { -return ModulePath; + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",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 -"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 (); -} - +",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 +"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 +"62 ""Call Back -// 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 Hash table requirementDescTable = new Hash table(); -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + private Hash table constraintDescTable = new Hash table(); -// 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 -"85 ""Decompose Model + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -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 -"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 void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) +public void insertValuesInDataBase() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -// 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() + public void createExecuteString() { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - // 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 void parseImpactReport(String str) + { +Connection conn = null; - public String getErrorMessage() - { - return errMsg; - } +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +ConstraintsDescription constraint = null; -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: 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: 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 -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: 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 -"47 ""Impact Report +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: 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: 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: 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 +"74 ""database -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - private JPanel driver Inner Panel = null ; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + /** + * 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 - super ("""" Search Result GUI """"); - container = get Content Pane (); - set Size ( 800 , 250 ); + /** +* 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 - panel = new JPanel (); - panel . set Layout ( null ); + /** +* 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 - this . server IP = - JOption Pane - . show In +/** +* 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 - public static void main ( String [] args ) + /** +* 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) { - - Impact Report im = new Impact Report (); - - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public Vector search Date () +public void solveStructureEquation() { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - 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 ) +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 - 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 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 void impact Report ( String id ) + 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 +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 +"87 ""EBT - // super ("""" Impact Report """"); - - container = get Content Pane (); - set Size ( 1020 , 740 ); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public Vector get Constraint From Data Base () - { + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - try - { - server = new Socket ( server IP , 1701 ); + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - if ( server . is Connected () ) - { - Buffered + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} +public void mouseExited( java. awt. event.MouseEvente){} - public Vector get Driver From Data Base () - { - Vector v = new Vector (); +public void mousePressed( java. awt. event.MouseEvente){} - Socket server ; - String line = new String (); +public void mouseReleased( java. awt. event.MouseEvente){} - try - { - server = new Socket ( server IP , 1701 ); +public void mouseEntered( java. awt. event.MouseEvente){} - 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 -"78 ""Notification Event +public void paint(Graphics g) {} -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 void update(Graphics g) {} -// constructor -public Notification_Event() + public JSplitPane getSplitPane() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +return splitPane; } -// 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"""") ) +public void valueChanged(ListSelectionEvent e) { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo - +if ( e. getValueIsAdjusting()) +return; +} -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat - +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""""); - //This method displays the contents of two array list to console -public void DisplayValues() +mainframe. addWindowListener( new WindowAdapter() { - 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 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 -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 -"94 ""Refine Model +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 +"91 ""Modify Model -public RefineModel(EBT em) +public ModifyModel(EBT em) { super( em); } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 3; +CurrentEvent = 4; } + 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 -"79 ""performance model Handler +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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 + 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 +"89 ""Event Line +protected int top, left, right, bottom; - performance model Handler(String msg) + +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 +"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. strES = msg; + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + public String get Description () { + return this . description ; + } -//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 String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void set Description ( String description ) { + this . description = description ; } - 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 -"93 ""Obsolete Model + public void set Logic ( String logic ) { + this . logic = logic ; + } -public ObsoleteModel(EBT em) -{ -super( em); + 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 ; + } -// 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 void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } -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: 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 -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 subscribermanager shall restore the executable model to its prior state.,119,0 -"62 ""Call Back + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -private Hash table requirementDescTable = new Hash table(); + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - private Hash table constraintDescTable = new Hash table(); + public String get Attribute () { + return this . attribute ; + } - private Hash table performanceModelTable = new Hash table(); + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - private PerformanceModel performance model= null + 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 void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + 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 void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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: 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 +"48 ""Constraint Inner Panel -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 - public void createExecuteString() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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) +public Vector get Values From Data Base () { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -Connection conn = null; + if ( server . is Connected () ) + { + Buffered R -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -ConstraintsDescription constraint = null; + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -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 -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 -"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; +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 +"74 ""database - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +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 - public void run() - { - while( true) - { - try + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -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 +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: 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 +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 +"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 +"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: 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 +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 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 "51 ""Driver Inner Panel private JLabel projectNameLabel = null; @@ -17686,9 +17620,35 @@ 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: 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: 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 +",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: 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 +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: 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 +"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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -17742,138 +17702,154 @@ if( opSym. token == '(' && clSym. token != ')' || * 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 -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 -"65 ""About Dialog +",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: 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: 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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; -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 -"48 ""Constraint Inner Panel + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d -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 EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - 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 +addWindowListener( new WindowAdapter() +{ -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + 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) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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 -public Vector get Values From Data Base () +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - if ( server . is Connected () ) - { - Buffered R +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 - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +void DeleteRelatedEvents() { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + m_Deleterequirement List. remove(0); -public JPanel get Panel () + +void AddSubscription(String SubscriberName, Requirement requirement ) { - 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +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 -public Symbol( char tok, int line ) + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + // 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 -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) + +private boolean Analyze_CheckSubscription(String str) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +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: 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 +"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 +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 +"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; - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - /** - * 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 +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 +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 +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 "80 ""Requirement public String m_RequirementID =""""""""; @@ -17904,257 +17880,275 @@ public void ParseRequirement(String TextLine) { 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 -"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 (); -} +",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: 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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; -// 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 +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; } -// 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 -"88 ""Event Model +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; -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); +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 +"86 ""EB Shape - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public void getIP Server( String serverIP) +public EBShape( int xpos, int ypos, Color col) { -this. serverIP = serverIP; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public void drawModel() -{ -repaint(); -} + public boolean match( int mx, int my) + { +return true; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public int GetX() + { +return x; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) + public int GetY() + { +return y; + } + + public Color GetC() { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +return c; } -} + public String GetReqno() + { +return requirement No; + } -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 String GetProject() + { +return ProjectName; + } -public void CheckNotifyStatus() + public String GetModule() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +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: 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - +public chartoken; +public int theLine; - protected void BuildEvent(){} +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - protected void AddLine( int t, int l, int r, int b) +public Balance( Reader inStream ) { -EventLines. addElement( new EventLine( t, l, r, b)); +errors = 0; +tok = new Tokenizer( inStream ); } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public String getrequirement Text(String r, String p, String m) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -return new String(""""requirementwill go here""""); - } +if( opSym. token == '(' && clSym. token != ')' || - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + /** + * 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,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,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 - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -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: 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 -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 -"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) { + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ setVisible ( false); dispose (); -} +} // event listener for """"Ok/Update"""" button -// 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 okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -private void cancelButtonActionPerformed (ActionEvent evt) { +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ setVisible ( false); -dispose (); +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 -"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: +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - 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; +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 +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: 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 +"81 ""subscribermanager -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +Socket aSocket; + int ID; + String EventLog; -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) +} +public void sendImpactReportToEventServer(String text) { -// 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 +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public void speculate(String str) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -System. out. println(""""Speculate""""); -CallBack +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -public void impactReport(String str) + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -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 +// 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 +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 +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: 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 "59 ""Done /** * The number of Worker object * threads that are currently working @@ -18226,293 +18220,343 @@ notify(); { _ 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: 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 -"91 ""Modify Model +",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 +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 +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 +"67 ""Event Detail Dialog -public ModifyModel(EBT em) -{ -super( em); - } +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - // Construct Visual model for Merge Event -public void BuildEvent() +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - -public StringBuffer GenerateEvent() +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - protected void paintComponent(Graphics g) +private void okButtonActionPerformed (ActionEvent evt) { -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: 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 -"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 -"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 + if ( displayMode == true) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public String getNextID() - { -try +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +setVisible ( false); +dispose (); +} -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +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 +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 +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 +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 +"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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +public Requirement() {// empty constructor - 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 -"91 ""Modify Model +} -public ModifyModel(EBT em) -{ -super( em); +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - 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 -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: 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 -"90 ""Merge Model + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -public MergeModel(EBT em) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -super( em); - MinimumNoRects = 3; - } + super ("""" Search Result GUI """"); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + container = get Content Pane (); + set Size ( 800 , 250 ); -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 -"88 ""Event Model + panel = new JPanel (); + panel . set Layout ( null ); -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); + this . server IP = + JOption Pane + . show In - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + public static void main ( String [] args ) + { + Impact Report im = new Impact Report (); -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public void drawModel() -{ -repaint(); -} + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + Socket server ; + String line = new String (); -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 + // Select Actions + public void action Performed ( Action Event e ) + { -public void CheckNotifyStatus() + 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 ) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + // super ("""" Impact Report """"); - protected void BuildEvent(){} + container = get Content Pane (); + set Size ( 1020 , 740 ); - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) + + 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 +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 +"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) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); +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 +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 +"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 = """"""""; } - else + + + public void Updaterequirement Info(String rno, String pname, String mname) { -Even +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public boolean match( int mx, int my) + { +return true; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public int GetX() + { +return x; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) + public int GetY() + { +return y; + } + + public Color GetC() { -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 +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 +"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 "82 ""Tokenizer @@ -18636,1027 +18680,959 @@ 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 -"63 ""Doors Thread +",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 +"89 ""Event Line -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +protected int top, left, right, bottom; - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - public void run() - { +public int GetT() { return top;} - 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 -"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: 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 -"83 ""Variable +public int GetL() { return left;} -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 +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: 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 +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 +"82 ""Tokenizer - //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. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -//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 +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} -//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 +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +/** + * 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( ) ) +{ + /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + * 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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +/** + * 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 ) { } +} - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +/** + * 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +/** + * 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 - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +/** + * 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: 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 +"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;/ - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + 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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +// 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 - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +//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 - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + // 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 - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; + + public String getErrorMessage() + { + return errMsg; } - /** -* 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 -"58 ""Subscribed Model + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +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 +"50 ""Driver Description -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public String GetSubscriberName() { return SubscriberName;} + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +this. projectName = projec -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 -"58 ""Subscribed Model +public String getChangedAttribute() + { +return changedAttribute; + } -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public String getDescription() + { +return description; + } -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + public String getFromAttribute() + { +return fromAttribute; + } -public String GetSubscriberName() { return SubscriberName;} + public String getModulePath() + { +return modulePath; + } -public String GetSubscriberReqno() { return SubscriberReqno;} + public String getProjectName() + { +return projectName; + } -public String GetSubscriberModule() { return SubscriberModule;} + public String getRequirementID() + { +return requirementID; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public String getToAttribute() + { +return toAttribute; + } -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: 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 -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 -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: 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 -"80 ""Requirement + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void setDescription(String description) + { +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -public Requirement() {// empty constructor + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -} + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - 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 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() + { -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: 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,Each artifact shall be placed under the control of a subscribermanager,106,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // 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) +public int hashCode() { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() +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 +"87 ""EBT - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public EBT(Frame f) { - try - { -Notification +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati - +WorkArea. showText( sh); + } -/ 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++) + public boolean mouseDown( java. awt.Evente, int x, int y) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i + return true; + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + public boolean mouseUp( java. awt.Evente, int x, int y) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); +return true; + } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -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 +public void mouseExited( java. awt. event.MouseEvente){} -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - // 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 +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} +public void update(Graphics g) {} -private boolean Analyze_CheckSubscription(String str) + public JSplitPane getSplitPane() { -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 -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: 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 -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 -"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= +return splitPane; +} -private static class Precedence +public void valueChanged(ListSelectionEvent e) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +if ( e. getValueIsAdjusting()) +return; +} -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +private class ValueReporter implements ListSelectionListener { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token +public void valueChanged(ListSelectionEvent event) { -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 { - + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -/** - * 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 +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 +"61 ""Worker Thread /** - * Construct an evaluator object. - * @param s the string containing the expression. +* True if this thread is currently processing. */ -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 - +public boolean busy; /** - * Internal method that hides type-casting. - * Changed the method to support double + * The thread pool that this object belongs to. */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public ThreadPool owner; - /** - * Another internal method that hides type-casting. +/** + * The constructor. + * + * @param o the thread pool */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +WorkerThread(ThreadPool o) +{ +owner = o; } /** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. + * Scan for and execute tasks. */ -private void processToken( Token lastToken ) { -System. out. printl +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 +"53 ""Performance Model -/* - * 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - /** - * 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. + 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(); + } -/** - * 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 Vector getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } + public String getName() + { +return name; + } -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 -"84 ""White Board Execution Graph + public void setName(String name) + { +this. name = name; + } -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 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 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 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 void setQueryID( long id) + { +this. queryID = id; + } -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 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: 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 +"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 - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +// 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 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 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 - 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 +// 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 -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 -"86 ""EB Shape + //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 +"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 +"53 ""Performance Model +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + private long queryID = 0; + public static int count = 0; -public EBShape( int xpos, int ypos, Color col) + public PerformanceModel(String name, long queryID) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - - public void Updaterequirement Info(String rno, String pname, String mname) + public Vector getConstraints() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return constraintVector; } - - public boolean match( int mx, int my) + public Vector getDrivers() { -return true; +return driverVector; } - - public int GetX() + public String getName() { -return x; +return name; } - - public int GetY() + public void setName(String name) { -return y; +this. name = name; } - public Color GetC() + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -return c; +} +else + this. driverVector. add( driver); } - public String GetReqno() + public void removeDriver(DriverDescription driver) { -return requirement No; +this. driverVector. remove( driver); } - public String GetProject() + public boolean containsDriver(DriverDescription driver) { -return ProjectName; +return this. driverVector. contains( driver); } - - public String GetModule() + public void addConstraint(ConstraintsDescription constraint) { -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 -"61 ""Worker Thread +this. constraintVector. add( constraint); + } -/** -* True if this thread is currently processing. - */ -public boolean busy; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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) -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -owner = o; -} + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public void setQueryID( long id) + { +this. queryID = id; + } -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 -"51 ""Driver Inner Panel + 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 +"52 ""Pair -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; +private String queryID; + private String queryString; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + public Pair(String queryID, String queryString) { -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +this. queryID = queryID; +this. queryString = queryString; -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 -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 -"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 String getQueryID() { +return this. queryID; + } -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 -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 -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 -"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: 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: 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: 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + public String getQueryString() { +return this. queryString; + } - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { + public void setQueryString(String queryString) { +this. queryString = queryString; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + }"" +",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: 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 +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 +"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 -public String searchDate() + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +this. id = id; +this. type = type; +this. -public String searchQueryID(String date) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +//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 getDriverFromDataBase(String queryID) + +public String toString() { -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 -"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: 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: 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: 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + /** -* 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. +* Returns the id. +* @return int */ - - synchronized public void waitDone() + public String getId() { -try { - while ( _ activeThreads>0 ) { -wait(); +return id; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Returns the logic. +* @return String */ - synchronized public void waitBegin() + public String getLogic() { -try { - while ( !_ started ) { -wait(); +return logic; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Returns the name. +* @return String */ - synchronized public void workerBegin() + public String getName() { -_ activeThreads++; -_ started = true; -notify(); +return name; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the value. +* @return double */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public double getValue() { +return value; } /** -* Called to reset this object to -* its initial state. +* Sets the id. +* @param id The id to set */ - 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 -"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) -{ + public void setId(String id) { +this. id = id; + } -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -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 -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: 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 -"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. - */ + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -/** - * 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; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - /** - * 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 -"80 ""Requirement + /** +* 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 +"71 ""Requirement public String m_RequirementID =""""""""; public String m_Project =""""""""; @@ -19664,139 +19640,149 @@ public String m_ModulePath=""""""""; public String m_Content = """"""""; public String m_RegFlag = """"N""""; - -public Requirement() {// empty constructor - +public Requirement() +{ } -public Object clone() throws CloneNotSupportedException { +public Object clone() throws CloneNotSupportedException + { Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement ; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { + 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) { +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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +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 +"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 +"51 ""Driver Inner Panel - private long queryID = 0; +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - public static int count = 0; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +panel = new JPanel(); - public Vector getConstraints() - { -return constraintVector; - } +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public Vector getDrivers() - { -return driverVector; - } +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: 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 +"92 ""New Model - public String getName() - { -return name; +public NewModel(EBT em) +{ +super( em); } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + // Construct Visual model for Merge Event +public void BuildEvent() { +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -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 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 +"48 ""Constraint Inner Panel - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } +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 boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } + 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 - public void removeConstraint(ConstraintsDescription constraint) + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. constraintVector. remove( constraint); + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - 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) +public Vector get Values From Data Base () { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public long getQueryID() - { -return this. queryID; - } + if ( server . is Connected () ) + { + Buffered R - public void setQueryID( long id) + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. queryID = id; - } - public String toString() + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () { -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 + 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: 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 +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 "49 ""Constraints Description private String project Name = null ; @@ -19930,794 +19916,491 @@ public int hash Code () { 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: 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; - +",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 +"66 ""Config Dialog - public Pair(String queryID, String queryString) { +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -this. queryID = queryID; -this. queryString = queryString; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +// 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 - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +// 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: 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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"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 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; +public Requirement() {// empty constructor - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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; + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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 +"77 ""Model Driver +String msg=""""""""; -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +public ModelDriver(String text) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +this. msg = text; +init(); + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public void init() { -// 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 +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: 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: 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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - 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 -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: 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 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 -"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 + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - /** -* 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: 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 -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 -"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 String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + public String get Module Path () { + return this . module Path ; + } -this. projectName = projec + public String get Project Name () { + return this . project Name ; + } -public String getChangedAttribute() - { -return changedAttribute; + public String get Requirement ID () { + return this . requirement ID ; } - public String getDescription() - { -return description; + public String get Units () { + return this . units ; } - public String getFromAttribute() - { -return fromAttribute; + public String get Value () { + return this . value ; } - public String getModulePath() - { -return modulePath; + public void set Description ( String description ) { + this . description = description ; } - public String getProjectName() - { -return projectName; + public void set Logic ( String logic ) { + this . logic = logic ; } - public String getRequirementID() - { -return requirementID; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; } - public String getToAttribute() - { -return toAttribute; + public void set Project Name ( String project Name ) { + this . project Name = project Name ; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } - public void setDescription(String description) - { -this. description = description; + public void set Units ( String units ) { + this . units = units ; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; + public void set Value ( String units ) { + this . value = units ; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; + public String get Impacted Constraint () { + return this . impacted Constraint ; } - public void setProjectName(String projectName) - { -this. projectName = projectName; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + public String get Attribute () { + return this . attribute ; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + public String get Performance Model Name () { + return this . performance Model Name ; } - 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() - { + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + 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 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 -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 -"82 ""Tokenizer +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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 +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 +"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 +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 +"77 ""Model Driver -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +String msg=""""""""; +public ModelDriver(String text) + { +this. msg = text; +init(); + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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 +"80 ""Requirement -/** - * 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( ) ) -{ +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** - * 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 +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 +"52 ""Pair +private String queryID; + private String queryString; -/** - * 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 ) { } -} + public Pair(String queryID, String queryString) { -/** - * 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 +this. queryID = queryID; +this. queryString = queryString; + } -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public String getQueryID() { +return this. queryID; + } -private void skip + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -/** - * 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 -"78 ""Notification Event + public void setQueryString(String queryString) { +this. queryString = queryString; + } -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 String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -// 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 + }"" +",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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - 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 + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + performance model Handler(String msg) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +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(); - //This method displays the contents of two array list to console -public void DisplayValues() +//Re-execut +public String generateReport() { - 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 -"75 ""Driver + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -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 int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public String toString() + public void saveModel( int id) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +// save current model +database. saveCurrentModel( id); } - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - /** -* 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; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",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 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +",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 +"95 ""Text Model - private JPanel driver Panel = new JPanel (); +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - private JPanel driver Inner Panel = null ; +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 - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - super ("""" Search Result GUI """"); +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - container = get Content Pane (); +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - set Size ( 800 , 250 ); +public void drawModel() +{ +repaint(); +} - panel = new JPanel (); - panel . set Layout ( null ); +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - this . server IP = - JOption Pane - . show In +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 +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 +"77 ""Model Driver +String msg=""""""""; - public static void main ( String [] args ) +public ModelDriver(String text) { - - Impact Report im = new Impact Report (); - +this. msg = text; +init(); } - 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 () + 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 +"52 ""Pair - 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 -"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 +private String queryID; + private String queryString; - 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 + public Pair(String queryID, String queryString) { -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +this. queryID = queryID; +this. queryString = queryString; } + public String getQueryID() { +return this. queryID; + } -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 + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + public void setQueryString(String queryString) { +this. queryString = queryString; + } - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -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: 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 +",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 @@ -20824,8 +20507,8 @@ try 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 -"71 ""Requirement +",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 +"80 ""Requirement public String m_RequirementID =""""""""; public String m_Project =""""""""; @@ -20833,490 +20516,588 @@ public String m_ModulePath=""""""""; public String m_Content = """"""""; public String m_RegFlag = """"N""""; -public Requirement() -{ + +public Requirement() {// empty constructor + } -public Object clone() throws CloneNotSupportedException - { +public Object clone() throws CloneNotSupportedException { Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement ; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { + 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) - { + +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 -"48 ""Constraint Inner Panel +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; -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 Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - 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 + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +/** + * 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 != ')' || -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 + /** + * 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: 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 +"93 ""Obsolete Model +public ObsoleteModel(EBT em) +{ +super( em); + } - 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 +// 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 JPanel get Panel () +public StringBuffer GenerateEvent() { - 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 -"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 -"67 ""Event Detail Dialog +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 +"95 ""Text Model -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; 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) +public TextModel(EBT e) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -private void okButtonActionPerformed (ActionEvent evt) + public void showText(EBShape sh) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +public void HideText() { -setVisible ( false); -dispose (); +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(); +} -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -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 -"84 ""White Board Execution Graph +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 +"93 ""Obsolete Model -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +public ObsoleteModel(EBT em) +{ +super( em); + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +// 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 +"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; - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 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 String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -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 String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - 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 String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - 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 String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - 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 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -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 -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 -"61 ""Worker Thread + // 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 +{ -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +// 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 { -owner = o; -} -/** - * Scan for and execute tasks. - */ -public void run() + + // 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 +"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) { -Runnable target = null; + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -do + + public void showText(EBShape sh) { -target = owner. getAssignment(); -if ( target!=null) + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() { - 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 -"65 ""About Dialog +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -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 void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public void drawModel() +{ +repaint(); +} -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +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 +"81 ""subscribermanager -// 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 +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 +{ -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -// 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: 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: 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 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +// 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 +{ - 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 ) + // 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 +"70 ""Notification Processing - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +// 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); - public String get Description () { - return this . description ; - } +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +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 - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; - } +// 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"""" - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - 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 ; + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } - public void set Units ( String units ) { - this . units = units ; - } + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - 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 -"83 ""Variable +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 +"71 ""Requirement -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 +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +public Object clone() throws CloneNotSupportedException { -this. id = id; -this. type = type; -this. +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +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 +"75 ""Driver -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { this. id = id; -this. type = type; +this. valueFrom = valueFrom; +this. valueTo = valueTo; this. name = name; -this. value = value; -this. logic - + } -public String toString() + public String toString() { String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } /** * Returns the id. @@ -21328,16 +21109,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -21352,443 +21123,429 @@ return name; * Returns the value. * @return double */ - public double getValue() { -return value; + public double getValueFrom() + { +return valueFrom; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public double getValueTo() + { +return valueTo; } /** -* Sets the logic. -* @param logic The logic to set +* Sets the id. +* @param id The id to set */ - public void setLogic(String logic) { -this. logic = logic; + public void setId(String id) + { +this. id = id; } - /** + ** * Sets the name. * @param name The name to set */ - public void setName(String name) { + 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; + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + // 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 +{ - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +// 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 +{ - /** -* 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 -"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 + // 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 +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 +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: 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: 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 +"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 -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + // Speculate Gui -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + public Speculate Gui () + { + super ("" Speculate GUI ""); -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + container = get Content Pane (); + set Size ( 800 , 600 ); -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + // Submit Listener + public void action Performed ( Action Event e ) { -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: 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 -"67 ""Event Detail Dialog + if ( e . get Source () == submit Button ) { -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + send Query TO Server (); + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + if ( e . get Source () == fetch Button ) { -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + System . out . println ("" Fetch Button Pressed -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + + void send Query TO Server () { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + String ip = this . event Server IP ; + int Port No = 1701 ; -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -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 -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 -"82 ""Tokenizer + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + String project Name = this . proj Name Text . get -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -/** - * 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( ) ) + // 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 { - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +// 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 { -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) + // 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 +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 +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 +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 +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 +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 +"53 ""Performance Model - /** - * 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -/** - * 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 ) { } -} + 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(); + } -/** - * 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 + public Vector getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } -/** - * 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 + public String getName() + { +return name; + } + public void setName(String name) + { +this. name = name; + } -/** - * 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( ) + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -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 -"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); +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -public void getIP Server( String serverIP) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. serverIP = serverIP; +return this. constraintVector. contains( constraint); } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - public void ClearVectors() + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - + dd = (DriverDescription) this. driverVector. get( i) -public void drawModel() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -repaint(); -} + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + 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 +"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;/ -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + 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 -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 +// 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 -public void CheckNotifyStatus() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) + +String sName, sReqno, sModule, sKey1, sKey2; +try { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + 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. - protected void BuildEvent(){} + public void Dispatch - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + public String getErrorMessage() + { + return errMsg; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else + public boolean Contains(String ContextString, String SearchString) { -Even +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 +"71 ""Requirement -public String getrequirement Text(String r, String p, String m) +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() { -return new String(""""requirementwill go here""""); - } +} +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - 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: 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 +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 "73 ""Constraints String id; @@ -21880,659 +21637,305 @@ this. name = name; 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 -"69 ""Notification Event +",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 +"86 ""EB Shape -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(); -} +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public Object clone() throws CloneNotSupportedException +public EBShape( int xpos, int ypos, Color col) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - public void ParseEvent(String TextLine) + public void Updaterequirement Info(String rno, String pname, String mname) { - 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 +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public boolean match( int mx, int my) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +return true; + } -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 -"77 ""Model Driver + public int GetX() + { +return x; + } -String msg=""""""""; -public ModelDriver(String text) + public int GetY() { -this. msg = text; -init(); +return y; } + public Color GetC() +{ +return c; + } - public void init() + public String GetReqno() { -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 -"61 ""Worker Thread +return requirement No; + } -/** -* True if this thread is currently processing. - */ -public boolean busy; + public String GetProject() + { +return ProjectName; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 +"84 ""White Board Execution Graph -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 -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 -"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 -"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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public Speculate Gui () - { - super ("" Speculate GUI ""); +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 - container = get Content Pane (); - set Size ( 800 , 600 ); +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 - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - // Submit Listener + 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 void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + 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 - send Query TO Server (); - } + 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 - if ( e . get Source () == fetch Button ) { +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - System . out . println ("" Fetch Button Pressed +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - void send Query TO Server () - { +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +/** + * 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; - public void pull Value From DOORS () - { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get + /** + * 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 +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 +"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 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 -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 -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 -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 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - // 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 -"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 -"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 (); + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - 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 (); +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 - 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 -"66 ""Config Dialog +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 ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -// 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 + 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 -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + 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 -// 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 -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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - //@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 -"61 ""Worker Thread +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 +"80 ""Requirement -/** -* True if this thread is currently processing. - */ -public boolean busy; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +public Requirement() {// empty constructor -/** - * 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 -"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(); +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* 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 -"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. + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* 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 +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 "73 ""Constraints String id; @@ -22624,32 +22027,217 @@ this. name = name; 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - +",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 +"67 ""Event Detail Dialog - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +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 (); } -public StringBuffer GenerateEvent() +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 +"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: 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 +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 +"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 +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: 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: 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 +"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) { -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 + +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 +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 +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 "71 ""Requirement public String m_RequirementID =""""""""; @@ -22681,212 +22269,182 @@ public void ParseRequirement(String TextLine) 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 -"94 ""Refine Model +",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 RefineModel(EBT em) +public NewModel(EBT em) { super( em); } + // Construct Visual model for Merge Event public void BuildEvent() { - ClearVectors(); +ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 3; +AddArrow(35,97,59,97); +CurrentEvent = 0; } + 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 -"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 -"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;} +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: 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 +"65 ""About Dialog -public int GetR() { return right;} +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 +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 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 +"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 +"53 ""Performance Model -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 -"60 ""Thread Pool +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -/** -* 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); + private long queryID = 0; + public static int count = 0; -/** -* 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 + 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; + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public Vector getDrivers() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +return driverVector; + } + public String getName() + { +return name; + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + public void setName(String name) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +this. name = name; + } + + public void addDriver(DriverDescription driver) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); +if ( driverVector. contains( driver)) +{ } -done. waitDone(); +else + this. driverVector. add( driver); } -}"" -",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 -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 -"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) + public void removeDriver(DriverDescription driver) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. driverVector. remove( driver); } - - public void Updaterequirement Info(String rno, String pname, String mname) + public boolean containsDriver(DriverDescription driver) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return this. driverVector. contains( driver); } - - public boolean match( int mx, int my) + public void addConstraint(ConstraintsDescription constraint) { -return true; +this. constraintVector. add( constraint); } - - public int GetX() + public boolean containsConstraint(ConstraintsDescription constraint) { -return x; +return this. constraintVector. contains( constraint); } - - public int GetY() + public void removeConstraint(ConstraintsDescription constraint) { -return y; +this. constraintVector. remove( constraint); } - public Color GetC() + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -return c; - } + dd = (DriverDescription) this. driverVector. get( i) - public String GetReqno() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -return requirement No; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public String GetProject() + public long getQueryID() { -return ProjectName; +return this. queryID; } + public void setQueryID( long id) + { +this. queryID = id; + } - public String GetModule() + public String toString() { -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 -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 +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 +"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 "76 ""Evaluator private static final int EOL = 0; @@ -23011,1082 +22569,922 @@ 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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } +",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 +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 +"70 ""Notification Processing - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -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: 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 -"88 ""Event Model + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -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); +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public EventModel(EBT e) +public static void main(String args[]) + { +try { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + 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 -public void getIP Server( String serverIP) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -this. serverIP = serverIP; - } - +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} -public void drawModel() + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { -repaint(); -} + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } -} - -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public void CheckNotifyStatus() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +if (! listModel. isEmpty()) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - protected void BuildEvent(){} +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } - protected void AddLine( int t, int l, int r, int b) +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { -EventLines. addElement( new EventLine( t, l, r, b)); -} - + 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 +"92 ""New Model -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +public NewModel(EBT em) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); +super( em); } - else - { -Even -public String getrequirement Text(String r, String p, String m) + // Construct Visual model for Merge Event +public void BuildEvent() { -return new String(""""requirementwill go here""""); - } +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - public StringBuffer GenerateEvent() +public StringBuffer GenerateEvent() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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 +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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +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 +"48 ""Constraint Inner Panel -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 -"76 ""Evaluator +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 -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= + 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 static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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 +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -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 { + if ( server . is Connected () ) + { + Buffered R -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -/** - * 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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -/** - * 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 +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 +"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; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + 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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -/** - * 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 +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -/* - * 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 +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - /** - * 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. + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -/** - * 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 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 +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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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: 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 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +// 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 - 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 ; +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 +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 +"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; - public String get Description () { - return this . description ; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - public String get Logic () { - return this . logic ; - } +panel = new JPanel(); - public String get Module Path () { - return this . module Path ; - } +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public String get Project Name () { - return this . project Name ; - } +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 +"84 ""White Board Execution Graph - 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 ; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +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 set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +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 void set Attribute ( String attribute ) { - this . attribute = attribute ; - } +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 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 double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - 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 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 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 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 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: 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 -"53 ""Performance Model +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - public static int count = 0; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - public PerformanceModel(String name, long queryID) + EventServerThread(ServerSocket ss) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -return constraintVector; - } - public Vector getDrivers() + while( true) { -return driverVector; - } - - public String getName() + try { -return name; - } +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +public String getNextID() { -if ( driverVector. contains( driver)) +try { -} -else - this. driverVector. add( driver); - } +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) +public String searchDate() { -return this. driverVector. contains( driver); - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) +public String searchQueryID(String date) { -return this. constraintVector. contains( constraint); - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) + public String getConstraintFromDataBase(String queryID) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +String ConstString = new String(); +try { - dd = (DriverDescription) this. driverVector. get( i) + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + + public String getDriverFromDataBase(String queryID) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +String driverString = new String(); +try { - cd = (ConstraintsDescription) this + 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: 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 +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 +"84 ""White Board Execution Graph - public long getQueryID() - { -return this. queryID; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - 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 -"56 ""Event Parser + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - 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; +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 -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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++ -//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 + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -//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 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 void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + 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 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 -"82 ""Tokenizer +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 +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 +"67 ""Event Detail Dialog -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -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( ) ) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +private void okButtonActionPerformed (ActionEvent evt) { -return Character. isJavaIdentifierPart( ch ); -} + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -String result = """""""" + ch; +setVisible ( false); +dispose (); +} -for( ; nextChar( ); result += ch ) +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - /** - * 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 +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 +"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 -/** - * 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( ) +// constructor +public Notification_Event() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } + 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 -/** - * 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 + 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 -/** - * 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( ) +// 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() { -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: 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 -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + 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 +"75 ""Driver - /** -* 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. -*/ +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; + } - synchronized public void waitDone() + + public String toString() { -try { - while ( _ activeThreads>0 ) { -wait(); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + /** +* Returns the id. +* @return int */ - synchronized public void waitBegin() + public String getId() { -try { - while ( !_ started ) { -wait(); +return id; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Returns the name. +* @return String */ - synchronized public void workerBegin() + public String getName() { -_ activeThreads++; -_ started = true; -notify(); +return name; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the value. +* @return double */ - synchronized public void workerEnd() + public double getValueFrom() { -_ activeThreads--; -notify(); +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; } /** -* Called to reset this object to -* its initial state. +* Sets the id. +* @param id The id to set */ - synchronized public void reset() + public void setId(String id) { -_ 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 -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 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +this. id = id; + } -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +this. name = name; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +this. valueFrom = valueFrom; + } -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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + 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 +"89 ""Event Line +protected int top, left, right, bottom; - //@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: 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 -"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; +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +public int GetT() { return top;} -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public int GetL() { return left;} -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +public int GetR() { return right;} - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +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: 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 +"88 ""Event Model - 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 +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 String getNextID() - { -try + public EventModel(EBT e) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -public String searchDate() +public void getIP Server( String serverIP) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +this. serverIP = serverIP; + } -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try + public void ClearVectors() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try +public void drawModel() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +repaint(); +} - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try +public void drawModel(EBShape sh) { - 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 -"53 ""Performance Model +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - 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 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 Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() +public void CheckNotifyStatus() { -return driverVector; - } +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; - } + protected void BuildEvent(){} - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + + protected void AddLine( int t, int l, int r, int b) { +EventLines. addElement( new EventLine( t, l, r, b)); } -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } - - public void addConstraint(ConstraintsDescription constraint) + else { -this. constraintVector. add( constraint); - } +Even - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - 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++) + public StringBuffer GenerateEvent() { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } +return new StringBuffer("""" """"); + }// end of GenerateEvent method - 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 + 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 "81 ""subscribermanager Socket aSocket; @@ -24137,7 +23535,18 @@ 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 +",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 +"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: 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 "86 ""EB Shape @@ -24203,1312 +23612,1253 @@ return ProjectName; { 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 -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 -"76 ""Evaluator +",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 +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 +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: 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 +"47 ""Impact Report -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 String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -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 + private JPanel driver Inner Panel = null ; -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ + private JPanel impact Panel = null ; + private JPanel impact Inner P -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + public Impact Report () + { + super ("""" Search Result GUI """"); -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 { + container = get Content Pane (); + set Size ( 800 , 250 ); -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + panel = new JPanel (); -/** - * 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 + panel . set Layout ( null ); -/** - * 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 + this . server IP = + JOption Pane + . show In -/** - * 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 + public static void main ( String [] args ) + { -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + Impact Report im = new Impact Report (); + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public Vector search Date () + { -/** - * 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 + 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 ) + { -/* - * 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 + pair Vector = new Vector (); + query String Combo . remove All Items (); - /** - * 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. + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); -/** - * 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. - */ + // Select Actions + public void action Performed ( Action Event e ) + { -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 -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: 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 -"83 ""Variable + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -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 + // Button Actions - //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. +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -//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 + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -//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 + if ( pair + . get -public String toString() + public void impact Report ( String id ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + // super ("""" Impact Report """"); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + container = get Content Pane (); + set Size ( 1020 , 740 ); - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () { -return logic; - } + Vector v = new Vector (); - /** -* Returns the name. -* @return String -*/ - public String getName() + 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 () { -return name; - } + Vector v = new Vector (); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + 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 +"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;/ - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +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. - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + public void Dispatch - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + public String getErrorMessage() + { + return errMsg; } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + 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 +"51 ""Driver Inner Panel - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +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) { - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; +return panel; }"" -",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 -"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 +",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 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 +"70 ""Notification Processing - 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 +// 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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + public Notification_Processing() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - } +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -public Vector get Values From Data Base () +public static void main(String args[]) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +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 - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +// 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"""" - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d -public JPanel get Panel () + private void saveMenuItemActionPerformed (ActionEvent evt) { - 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 -"77 ""Model Driver +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -String msg=""""""""; -public ModelDriver(String text) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -this. msg = text; -init(); +exitApplication(); } - public void init() + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -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 -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +openEventsMenuItemActionPerformed( evt); + } -public Symbol( char tok, int line ) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public Balance( Reader inStream ) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { -errors = 0; -tok = new Tokenizer( inStream ); -} + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -/** - * 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; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { -if( opSym. token == '(' && clSym. token != ')' || + 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 +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 +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 +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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** - * 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + private JPanel driver Panel = new JPanel (); - /** -* 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. -*/ + private JPanel driver Inner Panel = null ; - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + private JPanel impact Panel = null ; + private JPanel impact Inner P -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + public Impact Report () { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e + super ("""" Search Result GUI """"); -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + 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 ) { -_ activeThreads++; -_ started = true; -notify(); + + Impact Report im = new Impact Report (); + } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public Vector search Date () { -_ activeThreads--; -notify(); - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -_ 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: 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 -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 -"86 ""EB Shape + pair Vector = new Vector (); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + Socket server ; + String line = new String (); - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + // Select Actions + public void action Performed ( Action Event e ) + { - public boolean match( int mx, int my) - { -return true; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - public int GetX() - { -return x; - } +public void action Performed ( Action Event e ) { - public int GetY() - { -return y; - } + if ( submit Button == e . get Source ()) { - public Color GetC() -{ -return c; - } + for ( int i = 0 ; i < pair Vector . size (); i ++) { - public String GetReqno() - { -return requirement No; - } + Pair pair = ( Pair ) pair Vector . get ( i ); - public String GetProject() - { -return ProjectName; - } + if ( pair + . get - public String GetModule() + + public void impact Report ( String id ) { -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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + // super ("""" Impact Report """"); + container = get Content Pane (); -public Requirement() {// empty constructor + set Size ( 1020 , 740 ); -} + this . query ID = id ; -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + System . out . println ("""" Impact Report Constructor ..... ID """" + - 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 Vector get Constraint From Data Base () + { + Vector v = new Vector (); -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: 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: 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 -"78 ""Notification Event + Socket server ; + String line = new String (); -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(); -} + try + { + server = new Socket ( server IP , 1701 ); -// 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 + if ( server . is Connected () ) + { + Buffered - public void ParseEvent(String TextLine) + + public Vector get Driver From Data Base () { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + Vector v = new Vector (); -// 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 + 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 +"90 ""Merge Model - //This method displays the contents of two array list to console -public void DisplayValues() +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() { - 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 -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: 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 + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public Requirement() { -owner = o; } +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 +"72 ""Balance /** - * Scan for and execute tasks. + * Symbol represents what will be placed on the stack. */ -public void run() +private static class Symbol { -Runnable target = null; +public chartoken; +public int theLine; -do -{ -target = owner. getAssignment(); -if ( target!=null) +public Symbol( char tok, int line ) { - 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 -"74 ""database +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + +/** + * 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; /** - * Construct a connection object. - * @param Returns an object of type Connection + * Print an error message if clSym does not match opSym. + * Update errors. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +private void checkMatch( Symbol opSym, Symbol clSym ) { - Class. fo - +if( opSym. token == '(' && clSym. token != ')' || /** -* 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 + * 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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. */ - public int get - + private int _ activeThreads = 0; /** -* 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 +* 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. */ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException /** -* 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 +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - 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) + synchronized public void waitBegin() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e -public void solveStructureEquation() +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +_ activeThreads++; +_ started = true; +notify(); + } -public void getTrackVariableName() + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +_ activeThreads--; +notify(); + } -public void setCalculatedValues() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -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 +_ 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 +"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= - 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 -"74 ""database +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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +private static class Token { - Class. fo +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; +} - /** -* 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 +/** + * 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 - /** -* 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 +/** + * 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 /** -* 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 + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + /** -* 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 + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +/** + * 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 -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 +/* + * 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 -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 + /** + * 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. - 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: 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 -"81 ""subscribermanager +/** + * 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. + */ -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() { } +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 +"73 ""Constraints - // 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 -{ +String id; + String name; + double value; + String logic; -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -// 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 -{ + 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; + } - // 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 + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - private Hash table performanceModelTable = new Hash table(); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - private PerformanceModel performance model= null + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + /** +* 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 +"92 ""New Model +public NewModel(EBT em) +{ +super( em); + } -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - public void createExecuteString() +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 +"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 subscribermanager shall store information for evolutionary events in an eventlog.,114,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 +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 +"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; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -public void parseImpactReport(String str) + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -Connection conn = null; -Statement stmt = null; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -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 -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 -"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; + public double getValueTo() + { +return valueTo; + } - DOORsThread(ServerSocket ss) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { - theServer = ss; - count++; - taskNumber = count; +this. id = id; } - public void run() + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - while( true) + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { - try +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) { -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 -"89 ""Event Line +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 +"73 ""Constraints -protected int top, left, right, bottom; +String id; + String name; + double value; + String logic; -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -public int GetT() { return top;} + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public int GetL() { return left;} -public int GetR() { return right;} + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -public Requirement() {// empty constructor + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + + /** +* 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; + } - 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: 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: 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: 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 -"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: 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 -"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 (); -} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -// 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 + /** +* 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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +public Requirement() +{ } -// 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: 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 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - + 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 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 -"67 ""Event Detail Dialog +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: 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 +"54 ""eventserver -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; +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 +"48 ""Constraint Inner Panel -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ +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 -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + 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 okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -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 -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 -"51 ""Driver Inner Panel + if ( server . is Connected () ) + { + Buffered R -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) { + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -panel = new JPanel(); + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; +public JPanel get Panel () + { + 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 -"83 ""Variable +",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 +"93 ""Obsolete Model -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 +public ObsoleteModel(EBT em) +{ +super( em); + } - //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. +// 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 -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public StringBuffer GenerateEvent() { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - +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 +"75 ""Driver -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { this. id = id; -this. type = type; +this. valueFrom = valueFrom; +this. valueTo = valueTo; this. name = name; -this. value = value; -this. logic - + } -public String toString() + public String toString() { String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } /** * Returns the id. @@ -25520,16 +24870,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -25544,694 +24884,872 @@ return name; * Returns the value. * @return double */ - public double getValue() { -return value; + public double getValueFrom() + { +return valueFrom; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public double getValueTo() + { +return valueTo; } /** -* Sets the logic. -* @param logic The logic to set +* Sets the id. +* @param id The id to set */ - public void setLogic(String logic) { -this. logic = logic; + public void setId(String id) + { +this. id = id; } - /** + ** * Sets the name. * @param name The name to set */ - public void setName(String name) { + 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; + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + 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 +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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + // 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 +{ - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +// 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 +{ - /** -* 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 -"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 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 -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 -"73 ""Constraints + // 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 +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 +"53 ""Performance Model -String id; - String name; - double value; - String logic; +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + public static int count = 0; - Constraints(String id, String name, double value, String logic){ -this. id = id; + public PerformanceModel(String name, long queryID) + { this. name = name; -this. value = value; -this. logic = logic; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public Vector getConstraints() + { +return constraintVector; } + public Vector getDrivers() + { +return driverVector; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String getName() + { +return name; } + public void setName(String name) + { +this. name = name; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public long getQueryID() + { +return this. queryID; } + public void setQueryID( long id) + { +this. queryID = id; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + 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 +"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; }"" -",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 -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 -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 -"91 ""Modify Model +",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 +"94 ""Refine Model -public ModifyModel(EBT em) +public RefineModel(EBT em) { super( em); } - // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 4; +CurrentEvent = 3; } - public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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: 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 +"85 ""Decompose Model - protected void paintComponent(Graphics g) +public DecomposeModel(EBT em) { -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 -"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 - +super( em); +MinimumNoRects = 3; + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + // Construct Visual model for Merge Event +public void BuildEvent() { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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) +public StringBuffer GenerateEvent() { -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - +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 +"85 ""Decompose Model -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 -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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } -// Construct Visual model for Merge Event + // 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 - +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 -"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 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: 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 +"84 ""White Board Execution Graph -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - 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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 - 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 -"78 ""Notification Event +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 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(); -} + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -// 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 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 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 + 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 -// 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 +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - //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 -"86 ""EB Shape +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 +"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; + } -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -public EBShape( int xpos, int ypos, Color col) + /** +* Returns the id. +* @return int +*/ + public String getId() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +return id; } - public void Updaterequirement Info(String rno, String pname, String mname) + /** +* Returns the name. +* @return String +*/ + public String getName() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return name; } - public boolean match( int mx, int my) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return true; +return valueFrom; } - public int GetX() + public double getValueTo() { -return x; +return valueTo; } - public int GetY() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -return y; +this. id = id; } - public Color GetC() -{ -return c; - } - public String GetReqno() + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -return requirement No; +this. name = name; } - public String GetProject() + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -return ProjectName; +this. valueFrom = valueFrom; } - public String GetModule() + public void setValueTo( double value) { -return ModulePath; +this. valueTo = valueTo; }"" -",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 -"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); +",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 +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 +"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 +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 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 +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 +"85 ""Decompose Model - public EventModel(EBT e) +public DecomposeModel(EBT em) { -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; +super( em); +MinimumNoRects = 3; } - public void ClearVectors() + // Construct Visual model for Merge Event +public void BuildEvent() { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -public void drawModel() -{ -repaint(); -} -public void drawModel(EBShape sh) +public StringBuffer GenerateEvent() { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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: 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: 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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -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 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 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(){} + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + public String get Requirement ID () { + return this . requirement ID ; } - else - { -Even + public String get Units () { + return this . units ; + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public String get Value () { + return this . value ; } + public void set Description ( String description ) { + this . description = description ; + } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public void set Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) + 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 +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 +"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) { -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 -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol + // 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) { -public chartoken; -public int theLine; + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -public Symbol( char tok, int line ) +public void HideText() { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 Balance( Reader inStream ) +public void drawModel() { -errors = 0; -tok = new Tokenizer( inStream ); +repaint(); } -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) +protected void paintComponent(Graphics g) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - + super. paintComponent( g); - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +if (HideMsg == true) { -if( opSym. token == '(' && clSym. token != ')' || + 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** - * 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 -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: 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 -"90 ""Merge Model + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -public MergeModel(EBT em) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -super( em); - MinimumNoRects = 3; + + 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 (); + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -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 + 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 +"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 "52 ""Pair private String queryID; @@ -26272,273 +25790,262 @@ return """"Query ID: """" }"" ",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 -"50 ""Driver Description +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 +"58 ""Subscribed Model -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +public String GetSubscriberReqno() { return SubscriberReqno;} -this. projectName = projec +public String GetSubscriberModule() { return SubscriberModule;} -public String getChangedAttribute() +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 +"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 ) { -return changedAttribute; + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - public String getDescription() - { -return description; + + public String get Description () { + return this . description ; } - public String getFromAttribute() - { -return fromAttribute; + public String get Logic () { + return this . logic ; } - public String getModulePath() - { -return modulePath; + public String get Module Path () { + return this . module Path ; } - public String getProjectName() - { -return projectName; + public String get Project Name () { + return this . project Name ; } - public String getRequirementID() - { -return requirementID; + public String get Requirement ID () { + return this . requirement ID ; } - public String getToAttribute() - { -return toAttribute; + public String get Units () { + return this . units ; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; + public String get Value () { + return this . value ; } - public void setDescription(String description) - { -this. description = description; + public void set Description ( String description ) { + this . description = description ; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; + public void set Logic ( String logic ) { + this . logic = logic ; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; } - public void setProjectName(String projectName) - { -this. projectName = projectName; + public void set Project Name ( String project Name ) { + this . project Name = project Name ; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; + public void set Units ( String units ) { + this . units = units ; } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + public void set Value ( String units ) { + this . value = units ; } - 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 String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -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 -"85 ""Decompose Model + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; + 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 ; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + 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 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 -"70 ""Notification Processing +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 -// 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 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 +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 +"73 ""Constraints - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +String id; + String name; + double value; + String logic; -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -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 + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -// 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"""" + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } -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: 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 + /** +* 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 +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: 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 "54 ""eventserver public static void (String args[]) @@ -26554,107 +26061,7 @@ 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 -"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 -"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 -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 -"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 +",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 "67 ""Event Detail Dialog private GridBagLayout grid bag; @@ -26704,216 +26111,231 @@ 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 -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 -"54 ""eventserver +",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 +"89 ""Event Line -public static void (String args[]) +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 +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 +"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( int i=0; i<4; i++) - { -p + 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 +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 +"74 ""database -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 -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 -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 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - //EventParser Constructor - // initializes the Database connection - public EventParser() + 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. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + Class. fo - 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; + /** +* 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 -//Check if a subscription exists - public boolean CheckSubscription(String str) + + /** +* 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 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +/** +* 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 -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + /** +* 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) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) +public void solveStructureEquation() { -// 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 +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public void speculate(String str) +public void getTrackVariableName() { -System. out. println(""""Speculate""""); -CallBack +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 impactReport(String str) +public void setCalculatedValues() { -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 -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 -"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: 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } +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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + 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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -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 -"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 Requirement() {// empty constructor - 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 +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } + 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 Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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 +"83 ""Variable - if ( server . is Connected () ) - { - Buffered R +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 - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +this. id = id; +this. type = type; +this. -public JPanel get Panel () +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { - 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 -"73 ""Constraints - -String id; - String name; - double value; - String logic; +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - Constraints(String id, String name, double value, String logic){ +//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 = logic; - } +this. logic - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + +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() { + public String getId() + { return id; } @@ -26922,7 +26344,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -26931,10 +26354,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -26952,7 +26377,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -26976,559 +26402,522 @@ this. name = name; */ 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: 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 -"62 ""Call Back - + } -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + /** +* 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: 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 +"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 +"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 void createExecuteString() + public Speculate Gui () { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - + super ("" Speculate GUI ""); -public void parseImpactReport(String str) - { + container = get Content Pane (); -Connection conn = null; + set Size ( 800 , 600 ); -Statement stmt = null; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + // Submit Listener -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 -"86 ""EB Shape + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + send Query TO Server (); + } -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + if ( e . get Source () == fetch Button ) { - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + System . out . println ("" Fetch Button Pressed - public boolean match( int mx, int my) + void send Query TO Server () { -return true; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - public int GetX() - { -return x; - } + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - public int GetY() + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () { -return y; - } - public Color GetC() -{ -return c; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public String GetReqno() - { -return requirement No; - } + String [] attribute = { "" Value "", "" Attribute "" }; - public String GetProject() - { -return ProjectName; - } + String project Name = this . proj Name Text . get - public String GetModule() + public static void main ( String [] args ) { -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 -"66 ""Config Dialog + 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 +"84 ""White Board Execution Graph -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -// 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 + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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: 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 -"65 ""About Dialog +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 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 -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 -"62 ""Call Back +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 -private Hash table requirementDescTable = new Hash table(); +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - private PerformanceModel performance model= null + 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 void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + 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 void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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 +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 +"95 ""Text Model -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 createExecuteString() - { + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +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 parseImpactReport(String str) - { +public void drawModel() +{ +repaint(); +} -Connection conn = null; -Statement stmt = null; +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -Vector constraintsVector = null; -Vector driversVector = null; +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 +"90 ""Merge Model -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: 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 -"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 -"50 ""Driver Description +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +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 +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; -this. projectName = projec + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -public String getChangedAttribute() + EventServerThread(ServerSocket ss) { -return changedAttribute; - } - - public String getDescription() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -return description; - } - public String getFromAttribute() + while( true) { -return fromAttribute; - } - - public String getModulePath() + try { -return modulePath; - } +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - public String getProjectName() - { -return projectName; - } - public String getRequirementID() +public String getNextID() { -return requirementID; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) +public String searchDate() { -this. changedAttribute = changedAttribute; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) +public String searchQueryID(String date) { -this. fromAttribute = fromAttribute; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + public String getConstraintFromDataBase(String queryID) { -this. projectName = projectName; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) + public String getDriverFromDataBase(String queryID) { -this. toAttribute = toAttribute; - } +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 +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - public boolean equals(Object o) + EventServerThread(ServerSocket ss) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -public int hashCode() +public String getNextID() { -int hashCode = 0; -if ( hashCode == 0) +try { - 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - /** -* 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() +public String searchDate() { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + +public String searchQueryID(String date) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public String getConstraintFromDataBase(String queryID) { -_ activeThreads++; -_ started = true; -notify(); - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String getDriverFromDataBase(String queryID) { -_ activeThreads--; -notify(); - } +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 +"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 - /** -* 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: 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 -"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; + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 -"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 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 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 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 void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +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 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 double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -public void drawModel() -{ -repaint(); -} + 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 -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 + 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 +"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 +"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 +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 "54 ""eventserver public static void (String args[]) @@ -27544,108 +26933,38 @@ 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 -"78 ""Notification Event +",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 +"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 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(); -} + 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 -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException +// finds the subscribers for this requirement + public void IdentifySubscribers() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +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 - public void ParseEvent(String TextLine) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -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 -"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: 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 -"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 +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 @@ -27668,369 +26987,326 @@ 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 -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 -"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 -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: 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 -"76 ""Evaluator +",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 +"65 ""About Dialog -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= +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 +"74 ""database -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 +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] + 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 -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 { + /** +* 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 -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + /** +* 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 -/** - * 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 +* 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 -/** - * 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 + /** +* 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 -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +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 -/** - * 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 +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 -/* - * 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 + 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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - /** - * 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. + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -/** - * 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. - */ + 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(); -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 -"64 ""DOORs Thread Pool +//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 final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public void saveModel( int id) { - 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 -"53 ""Performance Model +// save current model +database. saveCurrentModel( id); + } -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - public static int count = 0; + 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: 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 +"50 ""Driver Description - public PerformanceModel(String name, long queryID) +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. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; } - public Vector getConstraints() + public String getDescription() { -return constraintVector; +return description; } - public Vector getDrivers() + public String getFromAttribute() { -return driverVector; +return fromAttribute; } - public String getName() + public String getModulePath() { -return name; +return modulePath; } - public void setName(String name) + public String getProjectName() { -this. name = name; +return projectName; } - public void addDriver(DriverDescription driver) + public String getRequirementID() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return requirementID; } - public void removeDriver(DriverDescription driver) + public String getToAttribute() { -this. driverVector. remove( driver); +return toAttribute; } - public boolean containsDriver(DriverDescription driver) + public void setChangedAttribute(String changedAttribute) { -return this. driverVector. contains( driver); +this. changedAttribute = changedAttribute; } - public void addConstraint(ConstraintsDescription constraint) + public void setDescription(String description) { -this. constraintVector. add( constraint); +this. description = description; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setFromAttribute(String fromAttribute) { -return this. constraintVector. contains( constraint); +this. fromAttribute = fromAttribute; } - public void removeConstraint(ConstraintsDescription constraint) + public void setModulePath(String modulePath) { -this. constraintVector. remove( constraint); +this. modulePath = modulePath; } - public DriverDescription getDriver(DriverDescription driver) + public void setProjectName(String projectName) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. projectName = projectName; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public void setRequirementID(String requirementID) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +this. requirementID = requirementID; + } - public long getQueryID() + public void setToAttribute(String toAttribute) { -return this. queryID; +this. toAttribute = toAttribute; } - public void setQueryID( long id) + public String createKey() { -this. queryID = id; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String toString() + 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() { -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 -"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. - */ +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public Balance( Reader inStream ) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -errors = 0; -tok = new Tokenizer( inStream ); -} - + 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 +"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;/ -/** - * 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; + 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 - /** - * 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 -"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 -"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 -"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 +// 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 @@ -28064,282 +27340,280 @@ 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: 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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } +",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 +"81 ""subscribermanager - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +Socket aSocket; + int ID; + String EventLog; -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 -"56 ""Event Parser + Connection conn; + ResultSet rs; + Statement stmt; -private Connection conn; - private ResultSet rs; - private Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - //EventParser Constructor - // initializes the Database connection - public EventParser() + // 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 { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void updateEvent(String str, String ID) +} +public void sendImpactReportToEventServer(String text) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -//Check if a subscription exists - public boolean CheckSubscription(String str) +// 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 +{ -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) + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -// 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 +// 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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +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 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 -"64 ""DOORs Thread Pool +public String GetSubscriberReqno() { return SubscriberReqno;} -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - //@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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +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 +"91 ""Modify Model -public Symbol( char tok, int line ) +public ModifyModel(EBT em) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +super( em); + } -public Balance( Reader inStream ) + // Construct Visual model for Merge Event +public void BuildEvent() { -errors = 0; -tok = new Tokenizer( inStream ); + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) +public StringBuffer GenerateEvent() { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) + protected void paintComponent(Graphics g) { -if( opSym. token == '(' && clSym. token != ')' || +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 +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: 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 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - /** - * 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 -"75 ""Driver + public static int count = 0; -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + public PerformanceModel(String name, long queryID) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - - public String toString() + public Vector getConstraints() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +return constraintVector; } - /** -* Returns the id. -* @return int -*/ - public String getId() + public Vector getDrivers() { -return id; +return driverVector; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public String getName() { return name; } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void setName(String name) { -return valueFrom; +this. name = name; } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - public double getValueTo() + public void removeDriver(DriverDescription driver) { -return valueTo; +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void addConstraint(ConstraintsDescription constraint) { -this. id = id; +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public void removeConstraint(ConstraintsDescription constraint) { -this. name = name; +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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public long getQueryID() { -this. valueFrom = valueFrom; +return this. queryID; } + public void setQueryID( long id) + { +this. queryID = id; + } - public void setValueTo( double value) + public String toString() { -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: 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 -"75 ""Driver +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 +"65 ""About Dialog -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +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 +"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. valueFrom = valueFrom; -this. valueTo = valueTo; +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 - public String toString() +//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 + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + /** * Returns the id. @@ -28351,6 +27625,16 @@ return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + /** * Returns the name. * @return String @@ -28365,15 +27649,8 @@ return name; * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -28381,684 +27658,700 @@ return valueTo; * Sets the id. * @param id The id to set */ - public void setId(String id) - { + 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) - { + 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 setValue( double value) { +this. value = value; } - 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: 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 -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: 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 -"81 ""subscribermanager + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - // 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 -{ + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -// 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 -{ + /** +* 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 +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: 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 +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 +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 +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 +"95 ""Text Model - // 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 -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 -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 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 -"49 ""Constraints Description +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +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 - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - } +public void drawModel() +{ +repaint(); +} - public String get Description () { - return this . description ; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - public String get Logic () { - return this . logic ; - } +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 +"87 ""EBT - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; } - 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 boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public void set Units ( String units ) { - this . units = units ; - } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +public void mouseExited( java. awt. event.MouseEvente){} - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +public void mousePressed( java. awt. event.MouseEvente){} - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } +public void mouseReleased( java. awt. event.MouseEvente){} - public String get Performance Model Name () { - return this . performance Model Name ; - } +public void mouseEntered( java. awt. event.MouseEvente){} - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } +public void paint(Graphics g) {} - public String to String () { +public void update(Graphics g) {} - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + public JSplitPane getSplitPane() +{ +return splitPane; +} -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 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 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - /** -* 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. -*/ +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 +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -/** -* 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 + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} /** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + * 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; /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || /** -* 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: 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 -"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;/ - + * 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 +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 +"65 ""About Dialog - 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 +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 +"67 ""Event Detail Dialog -// 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 +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -String sName, sReqno, sModule, sKey1, sKey2; -try +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - System. o +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - // 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 +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public String getErrorMessage() - { - return errMsg; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -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 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +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 +"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 +"71 ""Requirement - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -this. projectName = projec -public String getChangedAttribute() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -return changedAttribute; - } +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public String getDescription() +public void ParseRequirement(String TextLine) { -return description; - } + 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 +"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 +"83 ""Variable - public String getFromAttribute() - { -return fromAttribute; - } +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 - public String getModulePath() - { -return modulePath; - } - public String getProjectName() + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -return projectName; - } +this. id = id; +this. type = type; +this. - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -return toAttribute; - } +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } +//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 void setFromAttribute(String fromAttribute) + + +public String toString() { -this. fromAttribute = fromAttribute; - } +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public void setModulePath(String modulePath) + + /** +* Returns the id. +* @return int +*/ + public String getId() { -this. modulePath = modulePath; +return id; } - public void setProjectName(String projectName) + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -this. projectName = projectName; +return logic; } - public void setRequirementID(String requirementID) + + /** +* Returns the name. +* @return String +*/ + public String getName() { -this. requirementID = requirementID; +return name; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - 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"""" + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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 -"48 ""Constraint Inner Panel + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -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 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + /** +* 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; } -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - if ( server . is Connected () ) - { - Buffered R + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - 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 + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -public JPanel get Panel () - { - return panel ; + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",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 -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 -"77 ""Model Driver +",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 +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 +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 +"51 ""Driver Inner Panel -String msg=""""""""; +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - 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 -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 -"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 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 -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 -"53 ""Performance Model +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +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 +"74 ""database - private long queryID = 0; - public static int count = 0; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -return driverVector; - } +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - 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); - } + /** +* 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 - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + /** +* 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) { -return this. driverVector. contains( driver); - } +conn = this. getConnect - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } +/** +* 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 - public void removeConstraint(ConstraintsDescription constraint) + /** +* 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) { -this. constraintVector. remove( constraint); - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - 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) +public void solveStructureEquation() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public long getQueryID() + +public void getTrackVariableName() { -return this. queryID; - } +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 setQueryID( long id) + +public void setCalculatedValues() { -this. queryID = id; - } +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 String toString() + + public Vector getImpactReport() { -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 +//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: 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: 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 +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 "79 ""performance model Handler String strES; // string received from eventserver @@ -29114,428 +28407,406 @@ database. injectVariables( id, variable); // 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 -"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 -"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 +",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: 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: 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 +"85 ""Decompose Model - performance model Handler(String msg) - { -this. strES = msg; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - 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() + // Construct Visual model for Merge Event +public void BuildEvent() { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 -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 -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 -"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 - +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 +"86 ""EB Shape - 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 -"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 +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - // Speculate Gui - public Speculate Gui () +public EBShape( int xpos, int ypos, Color col) { - - 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 +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - void send Query TO Server () + public void Updaterequirement Info(String rno, String pname, String mname) { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + public boolean match( int mx, int my) + { +return true; + } - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + public int GetX() { +return x; + } - 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 int GetY() + { +return y; + } + public Color GetC() +{ +return c; + } - public static void main ( String [] args ) + public String GetReqno() { - 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 -"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 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; +return requirement No; + } - //EventParser Constructor - // initializes the Database connection - public EventParser() + public String GetProject() { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +return ProjectName; + } - public void updateEvent(String str, String ID) + public String GetModule() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +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 +"62 ""Call Back -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +private Hash table requirementDescTable = new Hash table(); -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -//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 + private PerformanceModel performance model= null -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public void parseSpeculateInformation(String str) { -// 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 +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void speculate(String str) +public void identifyPerformanceModels() { -System. out. println(""""Speculate""""); -CallBack +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public void impactReport(String str) +public void pullInformationFromDoors() { -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 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException +public void insertValuesInDataBase() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - 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) + public void createExecuteString() { - 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: 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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public Requirement() {// empty constructor -} +public void parseImpactReport(String str) + { -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +Connection conn = null; +Statement stmt = null; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; -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 -"private JPanel center Panel = 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 +"52 ""Pair - 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 +private String queryID; + private String queryString; - // Speculate Gui - public Speculate Gui () - { + public Pair(String queryID, String queryString) { - super ("" Speculate GUI ""); +this. queryID = queryID; +this. queryString = queryString; - container = get Content Pane (); + } - set Size ( 800 , 600 ); + public String getQueryID() { +return this. queryID; + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - // Submit Listener + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public void action Performed ( Action Event e ) { + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - if ( e . get Source () == submit Button ) { - send Query TO Server (); + }"" +",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 +"50 ""Driver Description - } +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - if ( e . get Source () == fetch Button ) { + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - System . out . println ("" Fetch Button Pressed +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - void send Query TO Server () +public String getChangedAttribute() { +return changedAttribute; + } - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { + public String getDescription() + { +return description; + } - socket = new Socket ( ip , Port No ); + public String getFromAttribute() + { +return fromAttribute; + } - Output Stream os = socket . get Output Stream (); - Output Stream + public String getModulePath() + { +return modulePath; + } - public void pull Value From DOORS () + public String getProjectName() { +return projectName; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + public String getRequirementID() + { +return requirementID; + } - String [] attribute = { "" Value "", "" Attribute "" }; + public String getToAttribute() + { +return toAttribute; + } - String project Name = this . proj Name Text . get + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } - public static void main ( String [] args ) + public void setFromAttribute(String fromAttribute) { - 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: 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: 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 -"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: 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 -"89 ""Event Line +this. fromAttribute = fromAttribute; + } -protected int top, left, right, bottom; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public int GetT() { return top;} + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -public int GetL() { return left;} + 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() + { -public int GetR() { return right;} +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -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 -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 -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 -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 -"85 ""Decompose Model +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 +"92 ""New Model -public DecomposeModel(EBT em) +public NewModel(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 - +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} 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 -"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 -"87 ""EBT +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 +"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 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: 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 +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 +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: 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 +"87 ""EBT private JSplitPane splitPane; @@ -29626,589 +28897,437 @@ 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 -"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;} +",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: 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: 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 +"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 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 -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 -"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++) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -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: 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 -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 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +// 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 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -System. out. println("""" in get Connection""""); -Connection connect=null; + +String sName, sReqno, sModule, sKey1, sKey2; try { - Class. fo - + 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. - /** -* 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 + public void Dispatch - /** -* 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) + public String getErrorMessage() { -conn = this. getConnect - + return errMsg; + } -/** -* 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) + public boolean Contains(String ContextString, String SearchString) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +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 +"56 ""Event Parser -public void solveStructureEquation() +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void getTrackVariableName() + public void updateEvent(String str, String ID) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public void setCalculatedValues() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -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 + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public Vector getImpactReport() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -//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: 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 -"50 ""Driver Description +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -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 +//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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + public void speculate(String str) { +System. out. println(""""Speculate""""); +CallBack -this. projectName = projec -public String getChangedAttribute() +public void impactReport(String str) { -return changedAttribute; - } +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 +"63 ""Doors Thread - public String getDescription() - { -return description; - } +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() + DOORsThread(ServerSocket ss) { -return modulePath; + theServer = ss; + count++; + taskNumber = count; } - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + public void run() { -return requirementID; - } - public String getToAttribute() + while( true) { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) + try { -this. changedAttribute = changedAttribute; - } +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 +"51 ""Driver Inner Panel - public void setDescription(String description) - { -this. description = description; - } +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } +panel = new JPanel(); - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +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 +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 +"61 ""Worker Thread - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +/** +* True if this thread is currently processing. + */ +public boolean busy; - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - 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"""" +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +/** + * Scan for and execute tasks. + */ +public void run() { - 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 -"83 ""Variable +Runnable target = null; -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 +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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; - //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. +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -//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 +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -//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 +/** + * 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 +"88 ""Event Model -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** -* Returns the logic. -* @return String -*/ - public String getLogic() +public void getIP Server( String serverIP) { -return logic; +this. serverIP = serverIP; } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +public void drawModel() +{ +repaint(); +} - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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 ((((( - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + protected void BuildEvent(){} - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; +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 - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* 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 -"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: 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 -"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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() - { -return description; - } + 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 +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 +"79 ""performance model Handler - public String getFromAttribute() - { -return fromAttribute; - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public String getModulePath() - { -return modulePath; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + performance model Handler(String msg) { -return requirementID; +this. strES = msg; } - public String getToAttribute() + public void messageParser() { -return toAttribute; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } +//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 void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + public void saveModel( int id) { -this. requirementID = requirementID; +// save current model +database. saveCurrentModel( id); } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - 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 + 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 "90 ""Merge Model @@ -30236,54 +29355,146 @@ 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 -"77 ""Model Driver +",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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -String msg=""""""""; + /** +* 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. +*/ -public ModelDriver(String text) + synchronized public void waitDone() { -this. msg = text; -init(); +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 - public void init() +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -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 -"92 ""New Model +_ activeThreads++; +_ started = true; +notify(); + } -public NewModel(EBT em) -{ -super( em); + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + /** +* 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 +"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 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: 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: 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 -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: 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 + 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: 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 "49 ""Constraints Description private String project Name = null ; @@ -30418,550 +29629,50 @@ public int 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 -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: 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 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); +"77 ""Model Driver - private Hash table performanceModelTable = new Hash table(); +String msg=""""""""; - private PerformanceModel performance model= null +public ModelDriver(String text) + { +this. msg = text; +init(); + } - public void parseSpeculateInformation(String str) + public void init() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 +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 +"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 -public void identifyPerformanceModels() + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. id = id; +this. type = type; +this. -public void pullInformationFromDoors() +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -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 -"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: 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 -"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 -"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 -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 -"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 -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 -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 -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 -"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: 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: 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 -"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 -"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: 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 -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: 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: 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: 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 -"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 +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this //Constructor to Add constraints related members @@ -31108,161 +29819,198 @@ return project_ path; 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 -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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } +",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: 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 +"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 - // Construct Visual model for Merge Event -public void BuildEvent() +public TextModel(EBT e) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -public StringBuffer GenerateEvent() + public void showText(EBShape sh) { -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 -"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= + // 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 -private static class Precedence +public void ShowInfo( int CE) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +public void drawModel() { +repaint(); +} -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -private static class Token +if (HideMsg == true) { -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 { + 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 +"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; -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 + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -/** - * 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 + 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: 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 +"91 ""Modify Model -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public ModifyModel(EBT em) +{ +super( em); + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -/** - * 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 - +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -/* - * 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 + 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 +"60 ""Thread Pool - /** - * 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. +/** +* 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); /** - * 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. +* 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 - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { 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: 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 -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 -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 + 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 "75 ""Driver String id; @@ -31354,534 +30102,323 @@ this. valueFrom = valueFrom; { 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 -"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 +",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 +"94 ""Refine Model +public RefineModel(EBT em) +{ +super( em); + } - //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. + // 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 +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 +"54 ""eventserver -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public static void (String args[]) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +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 +"53 ""Performance Model -//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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; + public static int count = 0; -public String toString() + public PerformanceModel(String name, long queryID) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } - /** -* Returns the id. -* @return int -*/ - public String getId() + public Vector getConstraints() { -return id; +return constraintVector; } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public Vector getDrivers() { -return logic; +return driverVector; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public String getName() { return name; } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public void setName(String name) + { +this. name = name; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); } - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); } - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + 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) - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + 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; + } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; + 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 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; + performance model Handler(String msg) + { +this. strES = msg; } - - /** -* 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: 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: 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: 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 -"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 -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 -"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 + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -/** - * 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( ) +//Re-execut +public String generateReport() { -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 + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -/** - * 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 -"90 ""Merge Model +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -public MergeModel(EBT em) + public void saveModel( int id) { -super( em); - MinimumNoRects = 3; +// save current model +database. saveCurrentModel( id); } - // 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 -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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - // 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 -"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; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",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 -"50 ""Driver Description +",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 +"70 ""Notification Processing -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { +try -this. projectName = projec -public String getChangedAttribute() +public static void main(String args[]) { -return changedAttribute; - } +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 - public String getDescription() - { -return description; - } - public String getFromAttribute() +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -return fromAttribute; - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public String getModulePath() - { -return modulePath; - } - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + private void saveMenuItemActionPerformed (ActionEvent evt) { -return requirementID; - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -this. changedAttribute = changedAttribute; +exitApplication(); } - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. fromAttribute = fromAttribute; +openEventsMenuItemActionPerformed( evt); } - public void setModulePath(String modulePath) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -this. modulePath = modulePath; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -this. requirementID = requirementID; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +new AboutDialog ( this, true). show(); } - 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() +void UpdateDisplayList() { -int hashCode = 0; -if ( hashCode == 0) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { - 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 + 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: 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: 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: 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: 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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -32053,287 +30590,216 @@ return project_ path; 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 -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 -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 -"private JPanel center Panel = null ; +",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 +"87 ""EBT - 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 +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public Speculate Gui () - { - super ("" Speculate GUI ""); +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - container = get Content Pane (); - set Size ( 800 , 600 ); + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - // Submit Listener - public void action Performed ( Action Event e ) { + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - if ( e . get Source () == submit Button ) { + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - send Query TO Server (); - } +public void mouseExited( java. awt. event.MouseEvente){} - if ( e . get Source () == fetch Button ) { +public void mousePressed( java. awt. event.MouseEvente){} - System . out . println ("" Fetch Button Pressed +public void mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} - void send Query TO Server () - { +public void paint(Graphics g) {} - String ip = this . event Server IP ; - int Port No = 1701 ; +public void update(Graphics g) {} - Socket socket ; - try { + public JSplitPane getSplitPane() +{ +return splitPane; +} - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public void pull Value From DOORS () +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { +switch(EventList. getSelectedIndex()) - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - 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 -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 -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: 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 -"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 +mainframe. addWindowListener( new WindowAdapter() { -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( ); -} +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 +"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 -/** - * 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 + 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 -/* - * 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 +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - /** - * 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. +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -/** - * 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. - */ + if ( server . is Connected () ) + { + Buffered R + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -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 -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: 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: 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 -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - 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() +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 +"91 ""Modify Model - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +public ModifyModel(EBT em) +{ +super( em); + } -public String getNextID() - { -try + // Construct Visual model for Merge Event +public void BuildEvent() { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +public StringBuffer GenerateEvent() { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try + protected void paintComponent(Graphics g) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +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 +"77 ""Model Driver +String msg=""""""""; - public String getConstraintFromDataBase(String queryID) +public ModelDriver(String text) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +this. msg = text; +init(); + } - public String getDriverFromDataBase(String queryID) + public void init() { -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 -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: 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 +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: 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: 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 "65 ""About Dialog public AboutDialog(JFrame parent, boolean modal) { @@ -32343,250 +30809,183 @@ public AboutDialog(JFrame parent, boolean modal) { 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: 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 -"49 ""Constraints Description +",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 -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 ; +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 Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; } - public String get Description () { - return this . description ; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +public void drawModel() +{ +repaint(); +} - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } +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 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 CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + protected void BuildEvent(){} - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; +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 void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + 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 +"95 ""Text Model -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 +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 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 -"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; + 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 - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} - 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 -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 -"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() +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -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 -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 -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: 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: 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 +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 +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 "85 ""Decompose Model @@ -32615,35 +31014,197 @@ 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 -"90 ""Merge Model +",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 +"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: 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 +"54 ""eventserver -public MergeModel(EBT em) +public static void (String args[]) { -super( em); - MinimumNoRects = 3; +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: 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 +"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 = """"""""; } - // Construct Visual model for Merge Event -public void BuildEvent() + 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() { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +return c; + } + public String GetReqno() + { +return requirement No; + } -public StringBuffer GenerateEvent() + 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 +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 +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 +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 +"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 +"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: 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 +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: 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 +"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 +"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() { -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 +} + +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 +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 "74 ""database @@ -32745,282 +31306,507 @@ System. out. println("""" enter calcValue // this method creates the token for e 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 -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 -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 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 -"79 ""performance model Handler +",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 +"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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ - 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(); + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -//Re-execut -public String generateReport() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + try + { +Notification -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public void saveModel( int id) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -// save current model -database. saveCurrentModel( id); - } +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 - 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 -"53 ""Performance Model +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + m_Deleterequirement List. remove(0); - private long queryID = 0; - public static int count = 0; - public PerformanceModel(String name, long queryID) +void AddSubscription(String SubscriberName, Requirement requirement ) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { -return constraintVector; - } +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req - public Vector getDrivers() - { -return driverVector; - } - public String getName() +void UpdateDisplayList() { -return name; - } +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } + // 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 - 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); - } +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 +"54 ""eventserver - public boolean containsConstraint(ConstraintsDescription constraint) +public static void (String args[]) { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -this. constraintVector. remove( constraint); - } - - public DriverDescription getDriver(DriverDescription driver) + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +p - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +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 +"77 ""Model Driver - public long getQueryID() +String msg=""""""""; + +public ModelDriver(String text) { -return this. queryID; +this. msg = text; +init(); } - public void setQueryID( long id) + + public void init() { -this. queryID = id; +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: 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 +"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 +"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 +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 +"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 - public String toString() +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -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 -"77 ""Model Driver +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e -String msg=""""""""; -public ModelDriver(String text) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -this. msg = text; -init(); +_ activeThreads++; +_ started = true; +notify(); } - public void init() + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -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 -"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 -"71 ""Requirement +_ activeThreads--; +notify(); + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() + /** +* 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 +"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 +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 +"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 Object clone() throws CloneNotSupportedException + public void removeDriver(DriverDescription driver) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public void addConstraint(ConstraintsDescription constraint) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +this. constraintVector. add( constraint); + } -public void ParseRequirement(String TextLine) + public boolean containsConstraint(ConstraintsDescription constraint) { - 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 -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 -"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 -"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: 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 -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 -"83 ""Variable +return this. constraintVector. contains( constraint); + } -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 + 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) - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. id = id; -this. type = type; -this. +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public void setQueryID( long id) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +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 +"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: 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: 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 +"73 ""Constraints +String id; + String name; + double value; + String logic; -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ + + Constraints(String id, String name, double value, String logic){ this. id = id; -this. type = type; this. name = name; this. value = value; -this. logic - +this. logic = logic; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } @@ -33029,8 +31815,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -33039,12 +31824,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -33062,8 +31845,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -33087,269 +31869,357 @@ this. name = name; */ 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 +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 +"91 ""Modify Model - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; +public ModifyModel(EBT em) +{ +super( em); } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + 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 +"91 ""Modify Model - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; +public ModifyModel(EBT em) +{ +super( em); } - /** -* 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 -"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 - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 +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 +"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 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 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 -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 +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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 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 - 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 + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { - 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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 +"74 ""database -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 -"49 ""Constraints Description +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + + /** + * 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 - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + + /** +* 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 - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } +/** +* 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 String get Description () { - return this . description ; - } - public String get Logic () { - return this . logic ; - } +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 String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +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 String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +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 String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + 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 +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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; - public void set Logic ( String logic ) { - this . logic = logic ; - } + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } +addWindowListener( new WindowAdapter() +{ - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } +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 - 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 """" +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -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 +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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -33521,319 +32391,110 @@ return project_ path; 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: 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 -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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +",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 +"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 +"74 ""database -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -/** - * Scan for and execute tasks. + /** + * Construct a connection object. + * @param Returns an object of type Connection */ -public void run() + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -Runnable target = null; + Class. fo -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 -"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; + + /** +* 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 - DOORsThread(ServerSocket ss) + /** +* 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) { - theServer = ss; - count++; - taskNumber = count; - } +conn = this. getConnect - public void run() - { +/** +* 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 - while( true) - { - try + /** +* 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) { -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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -public Requirement() {// empty constructor +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 Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 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 -"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 -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: 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 -"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 -"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 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 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 + 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 "90 ""Merge Model @@ -33861,112 +32522,219 @@ 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 +",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 +"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 +"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 +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 +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: 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 -"74 ""database +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: 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 +"73 ""Constraints + +String id; + String name; + double value; + String logic; -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** - * 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 the id. +* @return int +*/ + public String getId() { +return id; + } + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } /** -* 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 +* Returns the name. +* @return String */ - public int get + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } /** -* 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 +* Sets the id. +* @param id The id to set */ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect + 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; + } -/** -* 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 + + /** +* Sets the name. +* @param name The name to set */ - public void injectVa + public void setName(String name) { +this. name = name; + } + /** -* 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 +* 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 +"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 void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +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 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 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 setCalculatedValues() +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 +"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) { -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 + theServer = ss; + count++; + taskNumber = count; + } - public Vector getImpactReport() + public void run() { -//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: 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 -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 + + 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: 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 "59 ""Done /** * The number of Worker object * threads that are currently working @@ -34038,629 +32806,695 @@ notify(); { _ 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: 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 -"64 ""DOORs Thread Pool +",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 +"79 ""performance model Handler -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +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 - //@param argsNo arguments are used. - public static void main(String args[]) + performance model Handler(String msg) { -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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); +this. strES = msg; } - // 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 -"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: 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 -"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() + public void messageParser() { -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 - +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +//Re-execut +public String generateReport() { - System. o + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - // 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 int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - public String getErrorMessage() + public void saveModel( int id) { - return errMsg; +// save current model +database. saveCurrentModel( id); } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -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 -"47 ""Impact Report + 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 +"83 ""Variable -private String server IP = """" local host """"; - private JPanel center Panel = null ; +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 - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + //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. - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +//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 - super ("""" Search Result GUI """"); - - container = get Content Pane (); - set Size ( 800 , 250 ); +//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 - panel = new JPanel (); - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public static void main ( String [] args ) + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - Impact Report im = new Impact Report (); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; } - public Vector search Date () + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - 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 ) - { + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - pair Vector = new Vector (); - query String Combo . remove All Items (); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - // Select Actions + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - 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 ); - } - } + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - // Button Actions + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - if ( pair - . get + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - public void impact Report ( String id ) - { + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + /** +* 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: 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 +"60 ""Thread Pool - set Size ( 1020 , 740 ); +/** +* 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); - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +/** +* 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 - public Vector get Constraint From Data Base () + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - Vector v = new Vector (); - - Socket server ; - String line = new String (); + /** +* 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 +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 +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: 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 +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 +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 +"80 ""Requirement - try - { - server = new Socket ( server IP , 1701 ); +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - if ( server . is Connected () ) - { - Buffered +public Requirement() {// empty constructor +} - public Vector get Driver From Data Base () - { +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - 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 -"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 -"91 ""Modify Model +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; -public ModifyModel(EBT em) +public Symbol( char tok, int line ) { -super( em); - } +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - // Construct Visual model for Merge Event -public void BuildEvent() +public Balance( Reader inStream ) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; +errors = 0; +tok = new Tokenizer( inStream ); } -public StringBuffer GenerateEvent() +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - protected void paintComponent(Graphics g) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -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: 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 -"58 ""Subscribed Model +if( opSym. token == '(' && clSym. token != ')' || -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 + /** + * 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 +"73 ""Constraints -public String GetSubscriberName() { return SubscriberName;} +String id; + String name; + double value; + String logic; -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -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 -"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: 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: 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 -"53 ""Performance Model + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - 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(); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public Vector getConstraints() - { -return constraintVector; + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public Vector getDrivers() - { -return driverVector; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public String getName() - { -return name; + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void setName(String name) - { + ** +* 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; } - public void addDriver(DriverDescription driver) + + /** +* 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 +"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) { -if ( driverVector. contains( driver)) + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() { + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); } -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -return this. driverVector. contains( driver); - } - - public void addConstraint(ConstraintsDescription constraint) +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -this. constraintVector. add( constraint); - } +Notification - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. constraintVector. remove( constraint); - } +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public DriverDescription getDriver(DriverDescription driver) + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +int index = eventList. getSelectedIndex(); +if ( index != -1) { - dd = (DriverDescription) this. driverVector. get( i) + try + { +N - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) +void DeleteEvent(String SubscriberName, String EventID) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +try { - cd = (ConstraintsDescription) this - - public long getQueryID() + int i, j=-1; + for ( i=0; i< events. size(); i++) { -return this. queryID; - } +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() +void DeleteRelatedEvents() { -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: 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 -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: 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 -"81 ""subscribermanager +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); -Socket aSocket; - int ID; - String EventLog; + m_Deleterequirement List. remove(0); - 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) +void AddSubscription(String SubscriberName, Requirement requirement ) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req -// run method will be execute from the main method when u say Thread. start() in main - public void run() +void UpdateDisplayList() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try +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 - // 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 -"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() +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 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -try { - while ( _ activeThreads>0 ) { -wait(); +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + + public String toString() { -try { - while ( !_ started ) { -wait(); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } -} catch ( InterruptedException e - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Returns the id. +* @return int */ - synchronized public void workerBegin() + public String getId() { -_ activeThreads++; -_ started = true; -notify(); +return id; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the name. +* @return String */ - synchronized public void workerEnd() + public String getName() { -_ activeThreads--; -notify(); +return name; } /** -* Called to reset this object to -* its initial state. +* Returns the value. +* @return double */ - synchronized public void reset() + public double getValueFrom() { -_ 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 -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 -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 -"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 +return valueFrom; + } -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + public double getValueTo() + { +return valueTo; + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } -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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; } -// 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 + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -public StringBuffer GenerateEvent() + public void setValueTo( double value) { -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 -"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,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,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 +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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -34692,474 +33526,514 @@ 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 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +",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 +"84 ""White Board Execution Graph - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public String get Description () { - return this . description ; - } - public String get Logic () { - return this . logic ; - } +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 String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +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 String get Requirement ID () { - return this . requirement ID ; - } +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 String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; - } + 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 void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } + 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 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 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 void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +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 +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 +"90 ""Merge Model - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { +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 +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 +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 +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 +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: 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 +"62 ""Call Back - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +private Hash table requirementDescTable = new Hash table(); -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 + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -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: 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 -"75 ""Driver + private PerformanceModel performance model= null -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + + public void parseSpeculateInformation(String str) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public String toString() +public void identifyPerformanceModels() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Returns the id. -* @return int -*/ - public String getId() + +public void pullInformationFromDoors() { -return id; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - /** -* Returns the name. -* @return String -*/ - public String getName() +public void insertValuesInDataBase() { -return name; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + + public void createExecuteString() { -return valueFrom; - } + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public double getValueTo() +public void parseImpactReport(String str) { -return valueTo; - } +Connection conn = null; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +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 +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 +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 +"92 ""New Model - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; +public NewModel(EBT em) +{ +super( em); } - 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: 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 -"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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - //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. +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,Only registered subscribers shall be allowed to establish traces.,102,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 -//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 +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 -//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 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 String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +public void drawModel() +{ +repaint(); +} - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 +"62 ""Call Back - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } +private Hash table requirementDescTable = new Hash table(); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + private PerformanceModel performance model= null - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + public void createExecuteString() + { - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public void parseImpactReport(String str) + { +Connection conn = null; - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +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 +"64 ""DOORs Thread Pool - /** -* 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 -"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 -"77 ""Model Driver +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -String msg=""""""""; -public ModelDriver(String text) + //@param argsNo arguments are used. + public static void main(String args[]) { -this. msg = text; -init(); - } - - - public void init() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -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 -"90 ""Merge Model - + 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: 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 +"76 ""Evaluator -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +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= - // Construct Visual model for Merge Event -public void BuildEvent() +private static class Precedence { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +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[ ] +{ -public StringBuffer GenerateEvent() +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token { -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 -"63 ""Doors Thread +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 { -static private int count = 0; + +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 +"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; - - DOORsThread(ServerSocket ss) + EventServerThread(ServerSocket ss) { theServer = ss; count++; taskNumber = count; - } - - - public void run() + ep = new EventParser(); + } public void run() { while( true) @@ -35168,774 +34042,678 @@ static private int count = 0; { 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 -"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 -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 -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: 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 -"81 ""subscribermanager +PrintWriter output = new P -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - // 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) +public String searchDate() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; +String dateString = new String(); +Vector dateVector = new Vector(); try { + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -} -public void sendImpactReportToEventServer(String text) +public String searchQueryID(String date) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public String getConstraintFromDataBase(String queryID) { -System. out. println(""""Inside Run method""""); -String str=""""""""; +String ConstString = new String(); try { + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public String getDriverFromDataBase(String queryID) { -// 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 -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 -"52 ""Pair - -private String queryID; - private String queryString; +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 +"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= - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; +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[ ] +{ - public String getQueryID() { -return this. queryID; - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +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 void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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 - }"" -",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 -"79 ""performance model Handler +/** + * 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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +/** + * 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 - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - 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(); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -//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; +/** + * 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 -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +/* + * 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 - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } + /** + * 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. - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +/** + * 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 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: 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 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +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 +"private JPanel center Panel = null ; - private JPanel driver Inner 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 - private JPanel impact Panel = null ; - private JPanel impact Inner P + // Speculate Gui - public Impact Report () + public Speculate Gui () { - super ("""" Search Result GUI """"); + super ("" Speculate GUI ""); container = get Content Pane (); - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); + set Size ( 800 , 600 ); - this . server IP = + this . event Server IP = JOption Pane - . show In - - - public static void main ( String [] args ) - { - - Impact Report im = new Impact Report (); - - } - + . show Input Dialog ("" Please Enter the IP Address of eventserver - public Vector search Date () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + // Submit Listener - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { + public void action Performed ( Action Event e ) { - pair Vector = new Vector (); + if ( e . get Source () == submit Button ) { - query String Combo . remove All Items (); + send Query TO Server (); - query String Combo . add Item ("""" Select Query String """"); + } - Socket server ; - String line = new String (); + if ( e . get Source () == fetch Button ) { - // Select Actions + System . out . println ("" Fetch Button Pressed - 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 ); - } - } + void send Query TO Server () + { - // Button Actions + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -public void action Performed ( Action Event e ) { + socket = new Socket ( ip , Port No ); - if ( submit Button == e . get Source ()) { + Output Stream os = socket . get Output Stream (); + Output Stream - for ( int i = 0 ; i < pair Vector . size (); i ++) { + public void pull Value From DOORS () + { - Pair pair = ( Pair ) pair Vector . get ( i ); + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - if ( pair - . get + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - public void impact Report ( String id ) + 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: 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 +"73 ""Constraints - // super ("""" Impact Report """"); +String id; + String name; + double value; + String logic; - container = get Content Pane (); - set Size ( 1020 , 740 ); + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - public Vector get Driver From Data Base () - { + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - try - { - server = new Socket ( server IP , 1701 ); + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - 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: 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 -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 -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 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -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;} + /** +* 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 +"60 ""Thread Pool -public String GetSubscriberReqno() { return SubscriberReqno;} +/** +* 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); -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +/** +* 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 -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 -"89 ""Event Line -protected int top, left, right, bottom; + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; + /** +* 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 +"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 int GetT() { return top;} - -public int GetL() { return left;} -public int GetR() { return right;} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 -"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; + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +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 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 -"private JPanel center Panel = null ; +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 - 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 +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - // Speculate Gui - public Speculate Gui () - { + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - super ("" Speculate GUI ""); - container = get Content Pane (); + 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 - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + 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 - // Submit Listener +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +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 +"62 ""Call Back - send Query TO Server (); - } +private Hash table requirementDescTable = new Hash table(); - if ( e . get Source () == fetch Button ) { + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - System . out . println ("" Fetch Button Pressed + private PerformanceModel performance model= null - void send Query TO Server () + public void parseSpeculateInformation(String str) { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - socket = new Socket ( ip , Port No ); +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +public void pullInformationFromDoors() { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - String project Name = this . proj Name Text . get - public static void main ( String [] args ) + public void createExecuteString() { - 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 -"52 ""Pair -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -this. queryID = queryID; -this. queryString = queryString; - } +public void parseImpactReport(String str) + { - public String getQueryID() { -return this. queryID; - } +Connection conn = null; - public String getQueryString() { -return this. queryString; - } +Statement stmt = null; - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +Vector constraintsVector = null; +Vector driversVector = null; - public void setQueryString(String queryString) { -this. queryString = queryString; - } +ConstraintsDescription constraint = null; - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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 +"88 ""Event Model - }"" -",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 -"56 ""Event Parser +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); -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try + public EventModel(EBT e) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public void updateEvent(String str, String ID) +public void getIP Server( String serverIP) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +this. serverIP = serverIP; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +public void drawModel() +{ +repaint(); +} -//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 +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -//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 + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +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 impactReport(String str) +public void CheckNotifyStatus() { -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: 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 -"49 ""Constraints Description +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -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 ; + protected void BuildEvent(){} - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +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 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 -"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 String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public int GetY() - { -return y; - } - - public Color GetC() + public StringBuffer GenerateEvent() { -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } +return new StringBuffer("""" """"); + }// end of GenerateEvent method - 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 + 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: 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: 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 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -36001,133 +34779,8 @@ 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: 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 -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: 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 -"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 -"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: 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 -"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 -"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 +",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 +"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 "56 ""Event Parser private Connection conn; @@ -36195,172 +34848,211 @@ 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 -"71 ""Requirement +",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 +"92 ""New Model -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public NewModel(EBT em) +{ +super( em); + } -public Requirement() + + // Construct Visual model for Merge Event +public void BuildEvent() { +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 +"76 ""Evaluator - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +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= -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 -"61 ""Worker Thread + +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; +} /** -* True if this thread is currently processing. + * 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 boolean busy; +public Token getToken /** - * The thread pool that this object belongs to. + * Construct an evaluator object. + * @param s the string containing the expression. */ -public ThreadPool owner; +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 /** - * The constructor. - * - * @param o the thread pool + * Internal method that hides type-casting. + * Changed the method to support double */ -WorkerThread(ThreadPool o) -{ -owner = o; +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( ); } /** - * Scan for and execute tasks. + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. */ -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: 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 -"87 ""EBT +private void processToken( Token lastToken ) { +System. out. printl -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +/* + * 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 -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + /** + * 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. - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } +/** + * 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 boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } +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 +"91 ""Modify Model - public boolean mouseUp( java. awt.Evente, int x, int y) +public ModifyModel(EBT em) { -return true; +super( em); } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} - -public void mouseExited( java. awt. event.MouseEvente){} + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -public void mousePressed( java. awt. event.MouseEvente){} +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -public void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} + 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 +"89 ""Event Line -public void paint(Graphics g) {} +protected int top, left, right, bottom; -public void update(Graphics g) {} - public JSplitPane getSplitPane() +public EventLine ( int t, int l, int r, int b) { -return splitPane; +top = t; +left = l; +right = r; +bottom = b; } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +public int GetT() { return top;} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +public int GetL() { return left;} -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +public int GetR() { return right;} -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 -"69 ""Notification Event +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 +"78 ""Notification Event public String m_SubscriberName = """"""""; public String m_EventID = """"""""; @@ -36369,147 +35061,103 @@ 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(); - nEvt. m_RightSide = new ArrayLis + n 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 +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 -if ( m_Eve + + //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("""" 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: 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 -"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 + 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 +"73 ""Constraints +String id; + String name; + double value; + String logic; -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: 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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { + Constraints(String id, String name, double value, String logic){ this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; this. name = name; +this. value = value; +this. logic = logic; } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } + /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + /** * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -36517,397 +35165,362 @@ return valueTo; * Sets the id. * @param id The id to set */ - public void setId(String id) - { + 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) - { + 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 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 +"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 - public void setValueTo( double value) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -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 -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: 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 -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 -"51 ""Driver Inner Panel +this. id = id; +this. type = type; +this. -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) { +//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 -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +//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 -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 -"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 +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - performance model Handler(String msg) + /** +* Returns the id. +* @return int +*/ + public String getId() { -this. strES = msg; +return id; } - public void messageParser() + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +return logic; + } -//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; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - 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 -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 -"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 + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -// 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 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -//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 + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - // 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 + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - public String getErrorMessage() - { - return errMsg; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -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 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + /** +* 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 +"69 ""Notification Event -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +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 -this. projectName = projec +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -public String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() +public Object clone() throws CloneNotSupportedException { -return description; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() + public void ParseEvent(String TextLine) { -return modulePath; - } + 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 String getProjectName() - { -return projectName; - } - public String getRequirementID() + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -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"""" +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +public void DisplayValues() { - 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 -"87 ""EBT - + 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: 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 +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 +"60 ""Thread Pool -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +/** +* 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); -public EBT(Frame f) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -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) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -WorkArea. showText( sh); - } +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 - public boolean mouseDown( java. awt.Evente, int x, int y) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { - return true; - } - +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - 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()); + /** +* 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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; -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) {} +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public void update(Graphics g) {} - public JSplitPane getSplitPane() +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -return splitPane; +owner = o; } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) +/** + * Scan for and execute tasks. + */ +public void run() { - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +Runnable target = null; -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) +do { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() +target = owner. getAssignment(); +if ( target!=null) { -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 + 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 "90 ""Merge Model @@ -36935,303 +35548,677 @@ 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 -"47 ""Impact Report +",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 +"74 ""database -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - private JPanel driver Inner Panel = null ; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + /** + * 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 - super ("""" Search Result GUI """"); - container = get Content Pane (); - set Size ( 800 , 250 ); + /** +* 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 - panel = new JPanel (); - panel . set Layout ( null ); + /** +* 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 - this . server IP = - JOption Pane - . show In +/** +* 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 - public static void main ( String [] args ) + /** +* 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) { - - Impact Report im = new Impact Report (); - - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public Vector search Date () +public void solveStructureEquation() { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - 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 ) +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 - pair Vector = new Vector (); - - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +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 - Socket server ; - String line = new String (); + 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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; - // Select Actions + /** +* 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. +*/ - public void action Performed ( Action Event e ) - { + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +/** +* 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 - // Button Actions +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + /** +* 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 +"81 ""subscribermanager - if ( pair - . get +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() { } - public void impact Report ( String id ) + // 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 +{ - // super ("""" Impact Report """"); - container = get Content Pane (); +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - set Size ( 1020 , 740 ); - this . query ID = id ; +// 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 +{ - System . out . println ("""" Impact Report Constructor ..... ID """" + - public Vector get Constraint From Data Base () + // 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 +"80 ""Requirement - Vector v = new Vector (); - - Socket server ; - String line = new String (); - +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +public Requirement() {// empty constructor +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public Vector get Driver From Data Base () - { - Vector v = new Vector (); + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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,For speculative events; the eventserver shall construct a composite event message.,132,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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - 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 -"86 ""EB Shape +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +/** + * 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; - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || - public boolean match( int mx, int my) + /** + * 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 +"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 +"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 { -return true; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public int GetX() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -return x; - } +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: 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 +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: 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 +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 eventserver shall receive event messages when a requirement changes.,127,0 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - public int GetY() + 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 () { -return y; - } - public Color GetC() -{ -return c; - } + super ("""" Search Result GUI """"); - public String GetReqno() + 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 ) { -return requirement No; + + Impact Report im = new Impact Report (); + } - public String GetProject() + + public Vector search Date () { -return ProjectName; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public String GetModule() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -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 -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: 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 -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 -"77 ""Model Driver -String msg=""""""""; + pair Vector = new Vector (); -public ModelDriver(String text) + 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 ) { -this. msg = text; -init(); - } + // super ("""" Impact Report """"); - public void init() + 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 () { -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 -"52 ""Pair -private String queryID; - private String queryString; + Vector v = new Vector (); + Socket server ; + String line = new String (); - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + try + { + server = new Socket ( server IP , 1701 ); - } + if ( server . is Connected () ) + { + Buffered - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + public Vector get Driver From Data Base () + { - public void setQueryString(String queryString) { -this. queryString = queryString; - } + Vector v = new Vector (); - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - }"" -",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 -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: 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 -"90 ""Merge Model + 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 +"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; -public MergeModel(EBT em) + DOORsThread(ServerSocket ss) { -super( em); - MinimumNoRects = 3; + 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 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 +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 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - +AddEventRect(60,80,1); +CurrentEvent = 3; +} 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 +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 +"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: 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 +"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: 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 +"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: 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: 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 +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 "81 ""subscribermanager Socket aSocket; @@ -37282,126 +36269,283 @@ 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 -"67 ""Event Detail Dialog +",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 +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 +"87 ""EBT -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +public EBT(Frame f) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -private void okButtonActionPerformed (ActionEvent evt) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +WorkArea. showText( sh); + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) { -setVisible ( false); -dispose (); +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public void mouseExited( java. awt. event.MouseEvente){} -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 -"private JPanel center Panel = null ; +public void mousePressed( java. awt. event.MouseEvente){} - 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 +public void mouseReleased( java. awt. event.MouseEvente){} - // Speculate Gui +public void mouseEntered( java. awt. event.MouseEvente){} - public Speculate Gui () - { +public void paint(Graphics g) {} - super ("" Speculate GUI ""); +public void update(Graphics g) {} - container = get Content Pane (); + public JSplitPane getSplitPane() +{ +return splitPane; +} - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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()) - // Submit Listener +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - public void action Performed ( Action Event e ) { +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 +"90 ""Merge Model - if ( e . get Source () == submit Button ) { - send Query TO Server (); +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - } - if ( e . get Source () == fetch Button ) { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - System . out . println ("" Fetch Button Pressed +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 +"77 ""Model Driver +String msg=""""""""; - void send Query TO Server () +public ModelDriver(String text) { +this. msg = text; +init(); + } - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + 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 +"92 ""New Model - socket = new Socket ( ip , Port No ); +public NewModel(EBT em) +{ +super( em); + } - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + // 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: 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 +"90 ""Merge Model + + +public MergeModel(EBT em) { +super( em); + MinimumNoRects = 3; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - String project Name = this . proj Name Text . get + +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 +"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 static void main ( String [] args ) +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) { - 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 +// 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: 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 +"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 +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: 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 +"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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -37433,172 +36577,105 @@ 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: 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 -"75 ""Driver +",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 +"private JPanel center Panel = null ; -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; - } + 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 String toString() + public Speculate Gui () { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + super ("" Speculate GUI ""); + container = get Content Pane (); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + // Submit Listener - public double getValueTo() - { -return valueTo; - } + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + send Query TO Server (); + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } + if ( e . get Source () == fetch Button ) { - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } + System . out . println ("" Fetch Button Pressed - public void setValueTo( double value) + void send Query TO Server () { -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 -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 -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 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 -"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); + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -/** -* 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 + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public void pull Value From DOORS () { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + 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 +"90 ""Merge Model + + +public MergeModel(EBT em) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +super( em); + MinimumNoRects = 3; } -}"" -",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 + + + // 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 +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 "82 ""Tokenizer @@ -37722,268 +36799,296 @@ 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 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +",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 +"51 ""Driver Inner Panel - private JPanel driver Panel = new JPanel (); +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - private JPanel driver Inner Panel = null ; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - private JPanel impact Panel = null ; - private JPanel impact Inner P +panel = new JPanel(); - public Impact Report () - { +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - super ("""" Search Result GUI """"); +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 +"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 +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 +"79 ""performance model Handler - container = get Content Pane (); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - set Size ( 800 , 250 ); + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - panel = new JPanel (); - panel . set Layout ( null ); + performance model Handler(String msg) + { +this. strES = msg; + } - this . server IP = - JOption Pane - . show In + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public static void main ( String [] args ) - { +//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; - Impact Report im = new Impact Report (); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public Vector search Date () + public void saveModel( int id) { +// save current model +database. saveCurrentModel( id); + } - 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 (); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - query String Combo . remove All Items (); + 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 +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 +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 +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 +"62 ""Call Back - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - // Select Actions + private Hash table performanceModelTable = new Hash table(); - public void action Performed ( Action Event e ) - { + private PerformanceModel performance model= null - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions + 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 action Performed ( Action Event e ) { +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public void impact Report ( String id ) + public void createExecuteString() { - // super ("""" Impact Report """"); +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - container = get Content Pane (); - set Size ( 1020 , 740 ); +public void parseImpactReport(String str) + { - this . query ID = id ; +Connection conn = null; - System . out . println ("""" Impact Report Constructor ..... ID """" + +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - public Vector get Constraint From Data Base () - { +ConstraintsDescription constraint = null; - Vector v = new Vector (); +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 +"private JPanel center Panel = null ; - Socket server ; - String line = new String (); + 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 - try - { - server = new Socket ( server IP , 1701 ); + public Speculate Gui () + { - if ( server . is Connected () ) - { - Buffered + super ("" Speculate GUI ""); + container = get Content Pane (); + set Size ( 800 , 600 ); - public Vector get Driver From Data Base () - { + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - Vector v = new Vector (); - Socket server ; - String line = new String (); + // Submit Listener - try - { - server = new Socket ( server IP , 1701 ); + public void action Performed ( Action Event e ) { - 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 -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 -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: 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 -"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 -"56 ""Event Parser + if ( e . get Source () == submit Button ) { -private Connection conn; - private ResultSet rs; - private Statement stmt; + send Query TO Server (); - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + } + if ( e . get Source () == fetch Button ) { - 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; + + System . out . println ("" Fetch Button Pressed -//Check if a subscription exists - public boolean CheckSubscription(String str) + void send Query TO Server () { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -//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 + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public void pull Value From DOORS () { -// 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 + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get -public void impactReport(String str) + + public static void main ( String [] args ) { -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 -"67 ""Event Detail Dialog + 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 +"61 ""Worker Thread -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +owner = o; +} -private void okButtonActionPerformed (ActionEvent evt) +/** + * Scan for and execute tasks. + */ +public void run() { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - +Runnable target = null; -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +do { -setVisible ( false); -dispose (); -} - +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 +"64 ""DOORs Thread Pool -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -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 + //@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 +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: 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 +"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 "61 ""Worker Thread /** @@ -38022,7 +37127,47 @@ 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 +",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 +"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 +"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 "58 ""Subscribed Model private String SubscriberName; @@ -38048,156 +37193,460 @@ 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 -"66 ""Config Dialog +",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 +"private JPanel center Panel = null ; -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + 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 -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public Speculate Gui () + { + super ("" Speculate GUI ""); -// 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 + container = get Content Pane (); + set Size ( 800 , 600 ); -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -// 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 -"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; - } + // Submit Listener + public void action Performed ( Action Event e ) { - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } + if ( e . get Source () == submit Button ) { - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + send Query TO Server (); + } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + if ( e . get Source () == fetch Button ) { - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + System . out . println ("" Fetch Button Pressed - public double getValueTo() + void send Query TO Server () { -return valueTo; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () { -this. name = name; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get - public void setValueTo( double value) + public static void main ( String [] args ) { -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 -"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 -"94 ""Refine Model + 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 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; -public RefineModel(EBT em) -{ -super( em); } - // Construct Visual model for Merge Event -public void BuildEvent() + 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 +"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 +"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 +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 +"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 +"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 +"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) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +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 +"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; } -public StringBuffer GenerateEvent() + +/** + * Scan for and execute tasks. + */ +public void run() { -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: 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: 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 +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 +"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 "74 ""database @@ -38299,629 +37748,738 @@ System. out. println("""" enter calcValue // this method creates the token for e 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 -"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(); +",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 +"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. +*/ - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - public boolean mouseDown( java. awt.Evente, int x, int y) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { - return true; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } - 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){} + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + /** +* 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 +"95 ""Text Model -public void update(Graphics g) {} +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - public JSplitPane getSplitPane() +public TextModel(EBT e) { -return splitPane; -} + // 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 valueChanged(ListSelectionEvent e) + public void showText(EBShape sh) { -if ( e. getValueIsAdjusting()) -return; -} + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -private class ValueReporter implements ListSelectionListener +public void HideText() { -public void valueChanged(ListSelectionEvent event) +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) { - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -public void RedrawAll(EBShape sh) +public void drawModel() { -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); +repaint(); } -public static void main(String s[]) + + +protected void paintComponent(Graphics g) { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + super. paintComponent( g); -mainframe. addWindowListener( new WindowAdapter() +if (HideMsg == true) { -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 -"90 ""Merge Model + 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 +"52 ""Pair +private String queryID; + private String queryString; -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } + public Pair(String queryID, String queryString) { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +this. queryID = queryID; +this. queryString = queryString; + } -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 -"80 ""Requirement + public String getQueryID() { +return this. queryID; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -public Requirement() {// empty constructor + public void setQueryString(String queryString) { +this. queryString = queryString; + } -} + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + }"" +",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 +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 +"62 ""Call Back - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +private Hash table requirementDescTable = new Hash table(); -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 -"50 ""Driver Description + private Hash table constraintDescTable = new Hash table(); -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + private Hash table performanceModelTable = new Hash table(); - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + private PerformanceModel performance model= null -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + public void parseSpeculateInformation(String str) { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -this. projectName = projec -public String getChangedAttribute() +public void identifyPerformanceModels() { -return changedAttribute; - } +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public String getDescription() + +public void pullInformationFromDoors() { -return description; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public String getFromAttribute() + +public void insertValuesInDataBase() { -return fromAttribute; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public String getModulePath() + + + public void createExecuteString() { -return modulePath; - } - public String getProjectName() +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) { -return projectName; - } - public String getRequirementID() +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 +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 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 +"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 +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: 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: 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 +"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) { -return requirementID; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getToAttribute() + public Vector getConstraints() { -return toAttribute; +return constraintVector; } - public void setChangedAttribute(String changedAttribute) + public Vector getDrivers() { -this. changedAttribute = changedAttribute; +return driverVector; } - public void setDescription(String description) + public String getName() { -this. description = description; +return name; } - public void setFromAttribute(String fromAttribute) + public void setName(String name) { -this. fromAttribute = fromAttribute; +this. name = name; } - public void setModulePath(String modulePath) + public void addDriver(DriverDescription driver) { -this. modulePath = modulePath; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public void setProjectName(String projectName) + public void removeDriver(DriverDescription driver) { -this. projectName = projectName; +this. driverVector. remove( driver); } - public void setRequirementID(String requirementID) + public boolean containsDriver(DriverDescription driver) { -this. requirementID = requirementID; +return this. driverVector. contains( driver); } - public void setToAttribute(String toAttribute) + public void addConstraint(ConstraintsDescription constraint) { -this. toAttribute = toAttribute; +this. constraintVector. add( constraint); } - public String createKey() + public boolean containsConstraint(ConstraintsDescription constraint) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +return this. constraintVector. contains( constraint); } - 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() + public void removeConstraint(ConstraintsDescription constraint) { +this. constraintVector. remove( constraint); + } -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() + public DriverDescription getDriver(DriverDescription driver) { -int hashCode = 0; -if ( hashCode == 0) +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { - 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: 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 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - + dd = (DriverDescription) this. driverVector. get( i) - public void init() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -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 -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 -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 -"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; +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() + public long getQueryID() { +return this. queryID; + } - while( true) - { - try + public void setQueryID( long id) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - +this. queryID = id; + } -public String getNextID() + public String toString() { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - +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: 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 +"76 ""Evaluator -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +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= -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +private static class Precedence { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - 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 -"92 ""New Model -public NewModel(EBT em) +private static class Token { -super( em); - } +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 { - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +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 -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 -"48 ""Constraint Inner Panel +/** + * 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 -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 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 - 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 +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +/** + * 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 - if ( server . is Connected () ) - { - Buffered R +/* + * 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 - 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 + /** + * 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. -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 -"88 ""Event Model +/** + * 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. + */ -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 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 +"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 EventModel(EBT e) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public void getIP Server( String serverIP) + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -this. serverIP = serverIP; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public void ClearVectors() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +setVisible ( false); +dispose (); } -public void drawModel() -{ -repaint(); -} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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: 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 +"52 ""Pair +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); } -} + public String getQueryID() { +return this. queryID; + } -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 String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } -public void CheckNotifyStatus() + 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 +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 +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 +"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) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - protected void BuildEvent(){} +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +public void insertValuesInDataBase() { -Even +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + public void createExecuteString() + { - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - 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 -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 -"65 ""About Dialog +public void parseImpactReport(String str) + { -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 -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: 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 -"92 ""New Model +Connection conn = null; -public NewModel(EBT em) -{ -super( em); +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 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); } - // Construct Visual model for Merge Event -public void BuildEvent() + 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 +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,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 { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; + + } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -public StringBuffer GenerateEvent() +// 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 { -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 + + + + // 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 +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 @@ -38987,149 +38545,288 @@ return ProjectName; { 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 -"88 ""Event Model +",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 +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: 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 +"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; -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); + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +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 +"76 ""Evaluator -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +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= - public void ClearVectors() +private static class Precedence { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -public void drawModel() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -repaint(); -} +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public void drawModel(EBShape sh) + +private static class Token { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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 { -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } +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 -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 - +/** + * 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 void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +/** + * 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 - protected void BuildEvent(){} +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +/** + * 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 +"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) { -Even +this. projectName = projec -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); +public String getChangedAttribute() + { +return changedAttribute; } + public String getDescription() + { +return description; + } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public String getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } - 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 -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 -"92 ""New Model + public String getProjectName() + { +return projectName; + } -public NewModel(EBT em) -{ -super( em); + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + public void setDescription(String description) + { +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -public StringBuffer GenerateEvent() + 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) { -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 + 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 "75 ""Driver String id; @@ -39221,282 +38918,218 @@ this. valueFrom = valueFrom; { 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 -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 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - +",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 +"89 ""Event Line - 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 -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 -"54 ""eventserver +protected int top, left, right, bottom; -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - /** -* 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 +public int GetT() { return top;} -/** -* 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 +public int GetL() { return left;} +public int GetR() { return right;} -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } +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: 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 +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 +"90 ""Merge Model - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() +public MergeModel(EBT em) { -_ activeThreads--; -notify(); +super( em); + MinimumNoRects = 3; } - /** -* 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 -"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); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -/** -* 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++) +public StringBuffer GenerateEvent() { -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 +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 +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 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: 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 +"86 ""EB Shape - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +public EBShape( int xpos, int ypos, Color col) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } -}"" -",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 -"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 void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -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: 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 -"77 ""Model Driver + public boolean match( int mx, int my) + { +return true; + } -String msg=""""""""; -public ModelDriver(String text) + public int GetX() { -this. msg = text; -init(); +return x; } - public void init() + public int GetY() { -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: 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: 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 -"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 -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 -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 -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 -"94 ""Refine Model +return y; + } -public RefineModel(EBT em) + public Color GetC() { -super( em); +return c; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + public String GetReqno() + { +return requirement No; + } -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: 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: 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 -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 -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + public String GetProject() + { +return ProjectName; + } - 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() + 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 +"54 ""eventserver - while( true) +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 +"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 +"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 +"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 +"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 { @@ -39550,679 +39183,621 @@ 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 -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 -"76 ""Evaluator +",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 +"84 ""White Board Execution Graph -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= +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 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 +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 -/** - * 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 double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -/** - * 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 + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + 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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + 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 -/** - * 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 +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -/* - * 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 +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 +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 +"84 ""White Board Execution Graph - /** - * 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. +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -/** - * 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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 -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 -"47 ""Impact Report + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +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 - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P +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 Impact Report () - { +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - super ("""" Search Result GUI """"); - container = get Content Pane (); + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - set Size ( 800 , 250 ); - panel = new JPanel (); + 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 - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + 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 static void main ( String [] args ) - { +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 +"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 +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 +"73 ""Constraints + +String id; + String name; + double value; + String logic; - Impact Report im = new Impact Report (); + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - public Vector search Date () - { + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - 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 ) - { + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - pair Vector = new Vector (); - query String Combo . remove All Items (); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - // Select Actions - public void action Performed ( Action Event e ) - { + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - // Button Actions + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { + /** +* 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 +"90 ""Merge Model - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - if ( pair - . get + + // 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: 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 +"private JPanel center Panel = null ; - public void impact Report ( String id ) + 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 ("""" Impact Report """"); + super ("" Speculate GUI ""); container = get Content Pane (); - set Size ( 1020 , 740 ); + set Size ( 800 , 600 ); - this . query ID = id ; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - System . out . println ("""" Impact Report Constructor ..... ID """" + + // Submit Listener - public Vector get Constraint From Data Base () - { + public void action Performed ( Action Event e ) { - Vector v = new Vector (); + if ( e . get Source () == submit Button ) { - Socket server ; - String line = new String (); + send Query TO Server (); + } - try - { - server = new Socket ( server IP , 1701 ); + if ( e . get Source () == fetch Button ) { - if ( server . is Connected () ) - { - Buffered + System . out . println ("" Fetch Button Pressed - public Vector get Driver From Data Base () + void send Query TO Server () { - Vector v = new Vector (); + String ip = this . event Server IP ; + int Port No = 1701 ; - Socket server ; - String line = new String (); + Socket socket ; + try { - try - { - server = new Socket ( server IP , 1701 ); + socket = new Socket ( ip , Port No ); - 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 -"91 ""Modify Model + Output Stream os = socket . get Output Stream (); + Output Stream -public ModifyModel(EBT em) -{ -super( em); - } + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - // 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 + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - 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 -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 -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 -"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++) + public static void main ( String [] args ) { -p + 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 +"50 ""Driver Description -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 -"51 ""Driver Inner Panel +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - String projectName, + +public DriverDescription( +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 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +String changedAttribute, +String fromAttribute, +String toAttribute) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +this. projectName = projec - public String toString() +public String getChangedAttribute() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +return changedAttribute; } - /** -* Returns the id. -* @return int -*/ - public String getId() + public String getDescription() { -return id; +return description; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public String getFromAttribute() { -return name; +return fromAttribute; } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public String getModulePath() { -return valueFrom; +return modulePath; } - - public double getValueTo() + public String getProjectName() { -return valueTo; +return projectName; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public String getRequirementID() { -this. id = id; +return requirementID; } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public String getToAttribute() { -this. name = name; +return toAttribute; } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void setChangedAttribute(String changedAttribute) { -this. valueFrom = valueFrom; +this. changedAttribute = changedAttribute; } - - 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 -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 -"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 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + public void setDescription(String description) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +this. description = description; } - - public String toString() + public void setFromAttribute(String fromAttribute) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +this. fromAttribute = fromAttribute; } - /** -* Returns the id. -* @return int -*/ - public String getId() + public void setModulePath(String modulePath) { -return id; +this. modulePath = modulePath; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public void setProjectName(String projectName) { -return name; +this. projectName = projectName; } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void setRequirementID(String requirementID) { -return valueFrom; +this. requirementID = requirementID; } - - public double getValueTo() + public void setToAttribute(String toAttribute) { -return valueTo; +this. toAttribute = toAttribute; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public String createKey() { -this. id = id; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public boolean equals(Object o) { -this. name = name; - } +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"""" - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public int hashCode() { -this. valueFrom = valueFrom; - } +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 +"52 ""Pair +private String queryID; + private String queryString; - 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 -"88 ""Event Model + public Pair(String queryID, String queryString) { -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); +this. queryID = queryID; +this. queryString = queryString; + } - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + public String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; + public void setQueryID(String queryID) { +this. queryID = queryID ; } + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public void drawModel() + }"" +",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: 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { -repaint(); -} - +public chartoken; +public int theLine; -public void drawModel(EBShape sh) +public Symbol( char tok, int line ) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public Balance( Reader inStream ) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } +errors = 0; +tok = new Tokenizer( inStream ); } -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +if( opSym. token == '(' && clSym. token != ')' || - protected void BuildEvent(){} + /** + * 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 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } - protected void AddLine( int t, int l, int r, int b) + // Construct Visual model for Merge Event +public void BuildEvent() { -EventLines. addElement( new EventLine( t, l, r, b)); +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +public StringBuffer GenerateEvent() { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even - +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 +"93 ""Obsolete Model -public String getrequirement Text(String r, String p, String m) +public ObsoleteModel(EBT em) { -return new String(""""requirementwill go here""""); +super( em); } - public StringBuffer GenerateEvent() +// Construct Visual model for Merge Event +public void BuildEvent() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve - 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 +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 "private JPanel center Panel = null ; private JLabel des Label = null ; @@ -40291,81 +39866,386 @@ ebs = (EBShape)EventShapes. elementAt( i); 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 -"51 ""Driver Inner Panel + }",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 +"56 ""Event Parser -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; +private Connection conn; + private ResultSet rs; + private Statement stmt; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + 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; -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 -"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 +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -this. id = id; -this. type = type; -this. +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +// 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 -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ + 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 +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 +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: 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 +"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 +"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 +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: 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 +"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 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 +"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 +"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 +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 +"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 +"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 +"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 +"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: 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 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ this. id = id; -this. type = type; this. name = name; this. value = value; -this. logic - +this. logic = logic; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } @@ -40374,8 +40254,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -40384,12 +40263,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -40407,8 +40284,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -40432,498 +40308,303 @@ this. name = name; */ 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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); - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public void drawModel() +{ +repaint(); +} - /** -* 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: 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 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 -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 -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 -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 -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 -"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 void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +private void ClearData() { - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +for ( int i = 0; i < EventShapes. size(); i++) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -private void okButtonActionPerformed (ActionEvent evt) +public void Clicked ( int x, int y) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { -setVisible ( false); -dispose (); -} +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + protected void BuildEvent(){} -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: 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 -"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() + protected void AddLine( int t, int l, int r, int b) { - public void windowClosing(WindowEvent evt) - { -try +EventLines. addElement( new EventLine( t, l, r, b)); +} -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 +protected void AddEventRect( int x, int y, int colorStatus) { -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 +if ( colorStatus == 1) { - 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); + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } - - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + else { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +Even - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +public String getrequirement Text(String r, String p, String m) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); +return new String(""""requirementwill go here""""); } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try + public StringBuffer GenerateEvent() { - 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 -"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 - +return new StringBuffer("""" """"); + }// end of GenerateEvent method -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try + protected void paintComponent(Graphics g) { - 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 +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 +"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. +*/ - public String getErrorMessage() + synchronized public void waitDone() { - return errMsg; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - public boolean Contains(String ContextString, String SearchString) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); +try { + while ( !_ started ) { +wait(); } - - // 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 -"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 +} catch ( InterruptedException e - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - +_ activeThreads++; +_ started = true; +notify(); + } /** -* 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 +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public int get + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } /** -* 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 +* Called to reset this object to +* its initial state. */ - public void saveCurrentModel( int graphId) + synchronized public void reset() { -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 +_ 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 +"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 +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 +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 +"63 ""Doors Thread - /** -* 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 +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public void solveStructureEquation() + DOORsThread(ServerSocket ss) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + theServer = ss; + count++; + taskNumber = count; + } -public void getTrackVariableName() + public void run() { -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() + while( true) { -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() + try { -//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: 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 -"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(); +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 +"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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} +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 mouseExited( java. awt. event.MouseEvente){} +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 void mousePressed( java. awt. event.MouseEvente){} +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 void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} + 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 void paint(Graphics g) {} -public void update(Graphics g) {} + 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 JSplitPane getSplitPane() -{ -return splitPane; -} + 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 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 double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -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 -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 +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 +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 "88 ""Event Model @@ -41039,34 +40720,163 @@ 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: 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 -"51 ""Driver Inner Panel +",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 +"93 ""Obsolete Model -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; +public ObsoleteModel(EBT em) +{ +super( em); + } - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +// 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 -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 -"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 -"58 ""Subscribed Model +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 +"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 +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: 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: 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 +"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: 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 +"58 ""Subscribed Model private String SubscriberName; private String SubscriberReqno; @@ -41091,381 +40901,308 @@ 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 -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 -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 -"95 ""Text Model +",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 +"71 ""Requirement -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public TextModel(EBT e) +public Requirement() { - // 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 Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public void drawModel() -{ -repaint(); -} +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 +"85 ""Decompose Model -protected void paintComponent(Graphics g) +public DecomposeModel(EBT em) { - super. paintComponent( g); +super( em); +MinimumNoRects = 3; + } -if (HideMsg == true) + + // Construct Visual model for Merge Event +public void BuildEvent() { - 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 -"48 ""Constraint Inner Panel + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 +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 +"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 +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 +"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 +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 +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 +"54 ""eventserver -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public static void (String args[]) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { - 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 ) + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { +p - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +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 +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 +"87 ""EBT -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 -"81 ""subscribermanager +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - // 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 + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { +WorkArea. showText( sh); + } -} -public void sendImpactReportToEventServer(String text) + public boolean mouseDown( java. awt.Evente, int x, int y) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + return true; + } -// 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 + 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()); +} - // 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 -"51 ""Driver Inner Panel +public void mouseExited( java. awt. event.MouseEvente){} -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) { +public void mousePressed( java. awt. event.MouseEvente){} -panel = new JPanel(); +public void mouseReleased( java. awt. event.MouseEvente){} -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void mouseEntered( java. awt. event.MouseEvente){} -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 -"69 ""Notification Event +public void paint(Graphics g) {} -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 void update(Graphics g) {} -public Notification_Event() + public JSplitPane getSplitPane() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +return splitPane; } -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 valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve +switch(EventList. getSelectedIndex()) -public void DisplayValues() +public void RedrawAll(EBShape sh) { - 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) { -public chartoken; -public int theLine; +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -public Symbol( char tok, int line ) +mainframe. addWindowListener( new WindowAdapter() { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 +"89 ""Event Line + +protected int top, left, right, bottom; -public Balance( Reader inStream ) +public EventLine ( int t, int l, int r, int b) { -errors = 0; -tok = new Tokenizer( inStream ); +top = t; +left = l; +right = r; +bottom = b; } -/** - * 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; +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 +"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: 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 +"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 /** - * Print an error message if clSym does not match opSym. - * Update errors. + * Construct a connection object. + * @param Returns an object of type Connection */ -private void checkMatch( Symbol opSym, Symbol clSym ) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -if( opSym. token == '(' && clSym. token != ')' || + Class. fo + /** - * 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 -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 -"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 (); -} +* 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 -// 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 -"52 ""Pair -private String queryID; - private String queryString; + /** +* 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 - public Pair(String queryID, String queryString) { +/** +* 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. queryID = queryID; -this. queryString = queryString; + /** +* 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 String getQueryID() { -return this. queryID; - } +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 String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +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 setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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 - }"" -",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: 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 + 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 "58 ""Subscribed Model private String SubscriberName; @@ -41491,307 +41228,207 @@ 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 -"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: 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: 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 -"69 ""Notification Event +",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 +"50 ""Driver Description -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 +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public Object clone() throws CloneNotSupportedException +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +this. projectName = projec - public void ParseEvent(String TextLine) +public String getChangedAttribute() { - 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 - +return changedAttribute; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String getDescription() { -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 -"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 -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 -"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 - +return description; + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public String getFromAttribute() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - +return fromAttribute; + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + public String getModulePath() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +return modulePath; } -}"" -",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 -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: 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 -"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 String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } -public void getIP Server( String serverIP) + public String getToAttribute() { -this. serverIP = serverIP; +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public void setDescription(String description) + { +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -public void drawModel() -{ -repaint(); -} + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + 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() + { -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 +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void CheckNotifyStatus() +public int hashCode() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +int hashCode = 0; +if ( hashCode == 0) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + 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 +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 +"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 - protected void BuildEvent(){} + // Speculate Gui + public Speculate Gui () + { - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + super ("" Speculate GUI ""); + container = get Content Pane (); -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 + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + // Submit Listener - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - 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: 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 -"71 ""Requirement + send Query TO Server (); -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + } -public Requirement() -{ -} + if ( e . get Source () == fetch Button ) { -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + System . out . println ("" Fetch Button Pressed - 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) + void send Query TO Server () { - 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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -public Requirement() {// empty constructor + socket = new Socket ( ip , Port No ); -} + Output Stream os = socket . get Output Stream (); + Output Stream -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get -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 + + 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 "93 ""Obsolete Model public ObsoleteModel(EBT em) @@ -41816,250 +41453,268 @@ 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 -"85 ""Decompose Model - +",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: 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 +"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 +"49 ""Constraints Description -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +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 ; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + 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 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 -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 -"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 String get Description () { + return this . description ; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -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 String get Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } -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 void set Logic ( String logic ) { + this . logic = logic ; + } -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 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 double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } - 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 void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - 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 void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -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 -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 -"47 ""Impact Report + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -private String server IP = """" local host """"; - private JPanel center Panel = null ; + public String to String () { - private JPanel driver Panel = new JPanel (); + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P +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 Impact Report () - { - super ("""" Search Result GUI """"); +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: 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 +"61 ""Worker Thread - container = get Content Pane (); +/** +* True if this thread is currently processing. + */ +public boolean busy; - set Size ( 800 , 250 ); +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - panel = new JPanel (); - panel . set Layout ( null ); +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - this . server IP = - JOption Pane - . show In +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - public static void main ( String [] args ) - { +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: 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 +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 +"65 ""About Dialog - Impact Report im = new Impact Report (); +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 +"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 Vector search Date () + public Speculate Gui () { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + super ("" Speculate GUI ""); - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { + container = get Content Pane (); - pair Vector = new Vector (); + set Size ( 800 , 600 ); - query String Combo . remove All Items (); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + // Submit Listener + public void action Performed ( Action Event e ) { - // Select Actions + if ( e . get Source () == submit Button ) { - public void action Performed ( Action Event e ) - { + send Query TO Server (); - 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 ( e . get Source () == fetch Button ) { - if ( pair - . get + System . out . println ("" Fetch Button Pressed - public void impact Report ( String id ) + void send Query TO Server () { - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); + String ip = this . event Server IP ; + int Port No = 1701 ; - this . query ID = id ; + Socket socket ; + try { - System . out . println ("""" Impact Report Constructor ..... ID """" + + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - public Vector get Constraint From Data Base () + public void pull Value From DOORS () { - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - if ( server . is Connected () ) - { - Buffered + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - public Vector get Driver From Data Base () + public static void main ( String [] args ) { - - 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 + 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 +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: 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 +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: 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 "87 ""EBT @@ -42152,443 +41807,196 @@ 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 -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: 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 -"85 ""Decompose Model - +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 +"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 +"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: 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 +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 +"92 ""New Model -public DecomposeModel(EBT em) +public NewModel(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 - +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} 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 -"94 ""Refine Model +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 +"61 ""Worker Thread -public RefineModel(EBT em) -{ -super( em); - } +/** +* True if this thread is currently processing. + */ +public boolean busy; - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +owner = o; } -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 -"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; +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { +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 +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: 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 +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 +"54 ""eventserver - while( true) +public static void (String args[]) { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; try { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +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 +"74 ""database -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - public String getConstraintFromDataBase(String queryID) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -String ConstString = new String(); +System. out. println("""" in get Connection""""); +Connection connect=null; try { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + Class. fo - 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 -"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 -"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. +* 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 - 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. + /** +* 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 */ - synchronized public void waitBegin() + public void saveCurrentModel( int graphId) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +conn = this. getConnect /** -* 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. +* 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 */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - + public void injectVa /** -* 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 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: 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 -"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) +* 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) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -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 -"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++) +public void solveStructureEquation() { -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 -"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 +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException +public void getTrackVariableName() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +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 ParseEvent(String TextLine) +public void setCalculatedValues() { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +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 -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public Vector getImpactReport() { -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 +//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 "53 ""Performance Model private String name = null; @@ -42698,32 +42106,80 @@ return """"performance modelName = """" + """"\ 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 -"89 ""Event Line +",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 +"private JPanel center Panel = null ; -protected int top, left, right, bottom; + 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 () + { -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + super ("" Speculate GUI ""); + container = get Content Pane (); -public int GetT() { return top;} + set Size ( 800 , 600 ); -public int GetL() { return left;} + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -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: 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: 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 -"80 ""Requirement + // 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 +"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 +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: 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 +"71 ""Requirement public String m_RequirementID =""""""""; public String m_Project =""""""""; @@ -42731,130 +42187,96 @@ public String m_ModulePath=""""""""; public String m_Content = """"""""; public String m_RegFlag = """"N""""; - -public Requirement() {// empty constructor - +public Requirement() +{ } -public Object clone() throws CloneNotSupportedException { +public Object clone() throws CloneNotSupportedException + { Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement ; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { + 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) { +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 -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 -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: 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 -"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: 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 -"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 +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 - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -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 boolean match( int mx, int my) + { +return true; + } -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 int GetX() + { +return x; + } - 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 int GetY() + { +return y; + } + public Color GetC() +{ +return c; + } -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 String GetReqno() + { +return requirement No; + } -public RefineModel(EBT em) -{ -super( em); + public String GetProject() + { +return ProjectName; } - // 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: 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 + 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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -42908,502 +42330,557 @@ if( opSym. token == '(' && clSym. token != ')' || * 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: 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 -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 -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; +",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 +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 +"61 ""Worker Thread - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +/** +* True if this thread is currently processing. + */ +public boolean busy; - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -public String getNextID() - { -try +/** + * Scan for and execute tasks. + */ +public void run() { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +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: 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 +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 +"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= -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try + +private static class Precedence { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +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[ ] +{ -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +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 String getConstraintFromDataBase(String queryID) +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 +"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) { -String ConstString = new String(); + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; try { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - public String getDriverFromDataBase(String queryID) +} +public void sendImpactReportToEventServer(String text) { -String driverString = new String(); +//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 { - 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: 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 -"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: 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 -"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() + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -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 +// 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: 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: 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: 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 +"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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + + //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. -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. +//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 - public void Dispatch +//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 getErrorMessage() - { - return errMsg; - } - public boolean Contains(String ContextString, String SearchString) +public String toString() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -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 -"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. +* Returns the id. +* @return int */ - - synchronized public void waitDone() + public String getId() { -try { - while ( _ activeThreads>0 ) { -wait(); +return id; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Returns the logic. +* @return String */ - synchronized public void waitBegin() + public String getLogic() { -try { - while ( !_ started ) { -wait(); +return logic; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Returns the name. +* @return String */ - synchronized public void workerBegin() + public String getName() { -_ activeThreads++; -_ started = true; -notify(); +return name; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the value. +* @return double */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public double getValue() { +return value; } /** -* Called to reset this object to -* its initial state. +* Sets the id. +* @param id The id to set */ - 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 -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 -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 void setId(String id) { +this. id = id; + } -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -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 -"89 ""Event Line -protected int top, left, right, bottom; + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -public int GetT() { return top;} -public int GetL() { return left;} + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -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 -"54 ""eventserver + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -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: 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 -"66 ""Config Dialog + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + /** +* 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 +"89 ""Event Line -// 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 +protected int top, left, right, bottom; -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; } -// 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 -"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 -"82 ""Tokenizer +public int GetT() { return top;} -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +public int GetL() { return left;} +public int GetR() { return right;} -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +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: 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 +"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 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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 -/** - * 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( ) ) -{ +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +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 -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) + 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 - /** - * 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 +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 +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 +"86 ""EB Shape -/** - * 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 ) { } -} +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -/** - * 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 +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -private void skip + public boolean match( int mx, int my) + { +return true; + } -/** - * 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,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); + public int GetX() + { +return x; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - + public int GetY() + { +return y; + } -public StringBuffer GenerateEvent() + public Color GetC() { -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 -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 -"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; - +return c; + } - DOORsThread(ServerSocket ss) + public String GetReqno() { - theServer = ss; - count++; - taskNumber = count; +return requirement No; } - - public void run() + public String GetProject() { +return ProjectName; + } - while( true) - { - try + + public String GetModule() { -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 -"78 ""Notification Event +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 +"69 ""Notification Event public String m_SubscriberName = """"""""; public String m_EventID = """"""""; @@ -43412,319 +42889,223 @@ 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 + nEvt. m_RightSide = new ArrayLis 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 + 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 -// 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 - +if ( m_Eve - //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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + 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 +"49 ""Constraints Description -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -/** - * 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; + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + public String get Description () { + return this . description ; + } - /** - * 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 -"75 ""Driver + public String get Logic () { + return this . logic ; + } -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 get Module Path () { + return this . module Path ; } + public String get Project Name () { + return this . project Name ; + } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; + public String get Requirement ID () { + return this . requirement ID ; } - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; + 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 double getValueTo() - { -return valueTo; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } + public void set Units ( String units ) { + this . units = units ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; + public void set Value ( String units ) { + this . value = units ; } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; + public String get Impacted Constraint () { + return this . impacted Constraint ; } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - 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 -"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 - + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -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 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 EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public String to String () { -/** - * 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 + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -/** - * 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 +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 -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +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 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 +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 +"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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -/** - * 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 - +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - /** - * 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. + 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 -/** - * 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 void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve -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 +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: 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 +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 "55 ""eventserver Threadstatic private int count = 0; private int taskNumber; protected Done done; @@ -43799,962 +43180,1049 @@ 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 -"89 ""Event Line +",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 +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 +"80 ""Requirement -protected int top, left, right, bottom; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; +public Requirement() {// empty constructor + } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public int GetT() { return top;} -public int GetL() { return left;} + 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 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 -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 -"93 ""Obsolete Model +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 +"63 ""Doors Thread -public ObsoleteModel(EBT em) -{ -super( em); - } +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -// 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 + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -public StringBuffer GenerateEvent() + public void run() { -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: 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: 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 -"52 ""Pair -private String queryID; - private String queryString; + 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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; - public Pair(String queryID, String queryString) { +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -this. queryID = queryID; -this. queryString = queryString; - } +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +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 +"80 ""Requirement - public void setQueryString(String queryString) { -this. queryString = queryString; +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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - }"" -",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 -"86 ""EB Shape +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 +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 +"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 +"50 ""Driver Description + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public EBShape( int xpos, int ypos, Color col) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +this. projectName = projec - public void Updaterequirement Info(String rno, String pname, String mname) +public String getChangedAttribute() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return changedAttribute; } - - public boolean match( int mx, int my) + public String getDescription() { -return true; +return description; } - - public int GetX() + public String getFromAttribute() { -return x; +return fromAttribute; } - - public int GetY() + public String getModulePath() { -return y; +return modulePath; } - public Color GetC() -{ -return c; + public String getProjectName() + { +return projectName; } - public String GetReqno() + public String getRequirementID() { -return requirement No; +return requirementID; } - public String GetProject() + public String getToAttribute() { -return ProjectName; +return toAttribute; } - - public String GetModule() + public void setChangedAttribute(String changedAttribute) { -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 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { +this. changedAttribute = changedAttribute; + } -this. queryID = queryID; -this. queryString = queryString; + public void setDescription(String description) + { +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public String getQueryID() { -return this. queryID; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public String getQueryString() { -return this. queryString; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + 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() + { - }"" -",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 -"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 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // database and eventserver information - S - public Notification_Processing() +public int hashCode() { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - -addWindowListener( new WindowAdapter() +int hashCode = 0; +if ( hashCode == 0) { - public void windowClosing(WindowEvent evt) - { -try - + 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 +"75 ""Driver -public static void main(String args[]) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -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 +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public String toString() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - - +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } - private void saveMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the id. +* @return int +*/ + public String getId() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +return id; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the name. +* @return String +*/ + public String getName() { -exitApplication(); +return name; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -openEventsMenuItemActionPerformed( evt); +return valueFrom; } - // 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) + public double getValueTo() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +return valueTo; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -new AboutDialog ( this, true). show(); +this. id = id; } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { - "" -",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 -"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;/ +this. name = name; + } - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +this. valueFrom = valueFrom; + } -// finds the subscribers for this requirement - public void IdentifySubscribers() + + public void setValueTo( double value) { -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 +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 +"94 ""Refine Model +public RefineModel(EBT em) +{ +super( em); + } -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -String sName, sReqno, sModule, sKey1, sKey2; -try +public StringBuffer GenerateEvent() { - System. o +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: 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 +"48 ""Constraint Inner Panel - // 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. +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 void Dispatch + 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 - public String getErrorMessage() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { - return errMsg; + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public boolean Contains(String ContextString, String SearchString) +public Vector get Values From Data Base () { -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 -"63 ""Doors Thread + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + if ( server . is Connected () ) + { + Buffered R - DOORsThread(ServerSocket ss) + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { - theServer = ss; - count++; - taskNumber = count; - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public void run() - { - while( true) - { - try +public JPanel get Panel () { -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 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 -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 -"65 ""About Dialog + 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 +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 +"61 ""Worker Thread -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 -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 -"89 ""Event Line +/** +* True if this thread is currently processing. + */ +public boolean busy; -protected int top, left, right, bottom; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public EventLine ( int t, int l, int r, int b) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -top = t; -left = l; -right = r; -bottom = b; +owner = o; } -public int GetT() { return top;} +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; -public int GetL() { return left;} +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 +"61 ""Worker Thread -public int GetR() { return right;} +/** +* True if this thread is currently processing. + */ +public boolean busy; -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: 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 -"58 ""Subscribed Model +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -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) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +owner = o; +} -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; -public String GetSubscriberModule() { return SubscriberModule;} +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 +"52 ""Pair -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +private String queryID; + private String queryString; -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 -"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= + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -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[ ] -{ + public String getQueryID() { +return this. queryID; + } -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -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 void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -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 + }"" +",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 +"49 ""Constraints Description -/** - * 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 +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -/** - * 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 + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + 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 ; - /** - * 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 + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - /** - * 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. + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -/** - * 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 String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -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 -"80 ""Requirement + public void set Description ( String description ) { + this . description = description ; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void set Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -public Requirement() {// empty constructor + 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 Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + public void set Units ( String units ) { + this . units = units ; } + public void set Value ( String units ) { + this . value = units ; + } - 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 String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -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 -"56 ""Event Parser + public String get Attribute () { + return this . attribute ; + } -private Connection conn; - private ResultSet rs; - private Statement stmt; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + 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 void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + 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 """" -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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 -//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 +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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -//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 + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void speculate(String str) + performance model Handler(String msg) { -System. out. println(""""Speculate""""); -CallBack - +this. strES = msg; + } -public void impactReport(String str) + public void messageParser() { -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 -"95 ""Text Model +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -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) +//Re-execut +public String generateReport() { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -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 saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } -public void drawModel() -{ -repaint(); -} + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + 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 -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 -"75 ""Driver +String msg=""""""""; -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +public ModelDriver(String text) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +this. msg = text; +init(); } - public String toString() + public void init() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +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 +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 +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 +"93 ""Obsolete Model - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; +public ObsoleteModel(EBT em) +{ +super( em); } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +// 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 - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +public StringBuffer GenerateEvent() { -return valueFrom; - } +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 +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 +"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 double getValueTo() - { -return valueTo; - } + 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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. id = id; + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public Vector get Values From Data Base () { -this. name = name; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered R - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. valueFrom = valueFrom; - } + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public void setValueTo( double value) +public JPanel get Panel () { -this. valueTo = valueTo; + return panel ; }"" -",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 -"87 ""EBT +",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: 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 +"82 ""Tokenizer -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public EBT(Frame f) +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +return currentLine; +} - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -WorkArea. showText( sh); - } +return errors; +} - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } +/** + * 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( ) ) +{ - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -VisualPanel.Clicked( e. getX(), e. getY()); +return Character. isJavaIdentifierPart( ch ); } -public void mouseExited( java. awt. event.MouseEvente){} - +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; -public void mousePressed( java. awt. event.MouseEvente){} +for( ; nextChar( ); result += ch ) -public void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + /** + * 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 -public void update(Graphics g) {} - public JSplitPane getSplitPane() +/** + * 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( ) { -return splitPane; +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +/** + * 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 -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""""); +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -mainframe. addWindowListener( new WindowAdapter() +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( ) { -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 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 -"73 ""Constraints +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 +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 +"83 ""Variable -String id; - String name; - double value; - String logic; +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 - Constraints(String id, String name, double value, String logic){ + //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. logic = logic; - } +this - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +//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() { + public String getId() + { return id; } @@ -44763,7 +44231,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -44772,10 +44241,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -44793,7 +44264,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -44817,529 +44289,451 @@ this. name = name; */ 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 -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: 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 -"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 + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public Impact Report () - { - super ("""" Search Result GUI """"); + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - container = get Content Pane (); - set Size ( 800 , 250 ); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - panel = new JPanel (); - panel . set Layout ( null ); + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - this . server IP = - JOption Pane - . show In + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + /** +* 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 +"91 ""Modify Model +public ModifyModel(EBT em) +{ +super( em); } - public Vector search Date () - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - 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 ) - { +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - pair Vector = new Vector (); - query String Combo . remove All Items (); + 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 +"51 ""Driver Inner Panel - query String Combo . add Item ("""" Select Query String """"); +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - Socket server ; - String line = new String (); + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - // Select Actions +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public void action Performed ( Action Event e ) - { +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 +"79 ""performance model Handler - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - // Button Actions + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public void action Performed ( Action Event e ) { + performance model Handler(String msg) + { +this. strES = msg; + } - if ( submit Button == e . get Source ()) { + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +//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; - if ( pair - . get +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - public void impact Report ( String id ) + public void saveModel( int id) { +// save current model +database. saveCurrentModel( id); + } - // super ("""" Impact Report """"); - container = get Content Pane (); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - set Size ( 1020 , 740 ); + 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 +"49 ""Constraints Description - this . query ID = id ; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public Vector get Constraint From Data Base () + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { - Vector v = new Vector (); + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - Socket server ; - String line = new String (); + } - try - { - server = new Socket ( server IP , 1701 ); + public String get Description () { + return this . description ; + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () - { + public String get Requirement ID () { + return this . requirement ID ; + } - Vector v = new Vector (); + public String get Units () { + return this . units ; + } - Socket server ; - String line = new String (); + public String get Value () { + return this . value ; + } - try - { - server = new Socket ( server IP , 1701 ); + public void set Description ( String description ) { + this . description = description ; + } - 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: 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 -"61 ""Worker Thread + public void set Logic ( String logic ) { + this . logic = logic ; + } -/** -* True if this thread is currently processing. - */ -public boolean busy; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 ; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + public void set Units ( String units ) { + this . units = units ; + } + public void set Value ( String units ) { + this . value = units ; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -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 -"93 ""Obsolete Model + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -public ObsoleteModel(EBT em) -{ -super( em); + public String get Attribute () { + return this . attribute ; } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -// 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 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 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: 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 refining one requirement by adding an additional requirement to the existing one.,123,0 -"85 ""Decompose Model + 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 DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; -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 -"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() + //EventParser Constructor + // initializes the Database connection + public EventParser() { -return driverVector; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public String getName() - { -return name; - } - public void setName(String name) + public void updateEvent(String str, String ID) { -this. name = name; - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -return this. constraintVector. contains( constraint); - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +// 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 ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + public void speculate(String str) { -return this. queryID; - } +System. out. println(""""Speculate""""); +CallBack - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() +public void impactReport(String str) { -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: 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 -"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 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +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 +"62 ""Call Back - // database and eventserver information - S - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +private Hash table requirementDescTable = new Hash table(); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -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 + private PerformanceModel performance model= null -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public void parseSpeculateInformation(String str) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - private void saveMenuItemActionPerformed (ActionEvent evt) +public void identifyPerformanceModels() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +public void pullInformationFromDoors() { -exitApplication(); - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +public void insertValuesInDataBase() { -openEventsMenuItemActionPerformed( evt); - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - // 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) + public void createExecuteString() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) +public void parseImpactReport(String str) { - "" -",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: 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: 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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); - } +Connection conn = null; +Statement stmt = null; -// 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 +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; -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 +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 "private JPanel center Panel = null ; private JLabel des Label = null ; @@ -45408,124 +44802,234 @@ ebs = (EBShape)EventShapes. e"" 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 -"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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + }",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: 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 +"65 ""About Dialog - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d +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 +"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: 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 +"78 ""Notification Event - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); +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 -addWindowListener( new WindowAdapter() +// constructor +public Notification_Event() { - - - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); + 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 + -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + public void ParseEvent(String TextLine) { -int index = eventList. getSelectedIndex(); -if ( index != -1) +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - try - { -Notification + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -if (! listModel. isEmpty()) +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() { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + 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 +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: 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 +"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; -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) + DOORsThread(ServerSocket ss) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() { -N -void DeleteEvent(String SubscriberName, String EventID) + while( true) { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) + try { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - m_Deleterequirement List. remove(0); +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec -void AddSubscription(String SubscriberName, Requirement requirement ) +public String getChangedAttribute() { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +return changedAttribute; + } + + public String getDescription() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +return description; + } + public String getFromAttribute() + { +return fromAttribute; + } -void UpdateDisplayList() + public String getModulePath() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +return modulePath; + } + public String getProjectName() + { +return projectName; + } - // 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 + 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; + } -private boolean Analyze_CheckSubscription(String str) + 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) { -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 + 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: 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 "82 ""Tokenizer @@ -45649,373 +45153,587 @@ 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 -"82 ""Tokenizer +",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 +"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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -/** - * 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( ) ) -{ +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -for( ; nextChar( ); result += ch ) + 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 - /** - * 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 + 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 -/** - * 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 ) { } -} +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -/** - * 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 +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 +"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;/ -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + 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 -private void skip +// 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 -/** - * 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( ) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try { -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 -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 -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 -"82 ""Tokenizer + 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. -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public void Dispatch -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + public String getErrorMessage() + { + return errMsg; + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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: 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 +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 +"48 ""Constraint Inner Panel -/** - * 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( ) ) -{ +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) +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 - /** - * 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 + 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 -/** - * 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( ) + +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 +"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() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } + 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 -/** - * 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 + 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 -/** - * 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 +// 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 +"72 ""Balance /** - * 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. + * Symbol represents what will be placed on the stack. */ -private void processSlash( ) +private static class Symbol { -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 -"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 chartoken; +public int theLine; -public TextModel(EBT e) +public Symbol( char tok, int line ) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - public void showText(EBShape sh) +public Balance( Reader inStream ) { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +errors = 0; +tok = new Tokenizer( inStream ); +} -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi -public void ShowInfo( int CE) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public void drawModel() + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -repaint(); -} +if( opSym. token == '(' && clSym. token != ')' || -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + /** + * 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 +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 +"79 ""performance model Handler -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 -"52 ""Pair +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -private String queryID; - private String queryString; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public Pair(String queryID, String queryString) { + 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; -this. queryID = queryID; -this. queryString = queryString; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public String getQueryID() { -return this. queryID; + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - public String getQueryString() { -return this. queryString; + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - public void setQueryID(String queryID) { -this. queryID = queryID ; + 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 +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 +"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(); } - public void setQueryString(String queryString) { -this. queryString = queryString; + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - }"" -",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 -"64 ""DOORs Thread Pool + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } - //@param argsNo arguments are used. - public static void main(String args[]) + +void UpdateDisplayList() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { - 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 + "" +",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 +"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 +"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 +"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 +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: 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 "53 ""Performance Model private String name = null; @@ -46125,1542 +45843,1224 @@ return """"performance modelName = """" + """"\ 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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 +"private JPanel center Panel = null ; - /** -* 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. -*/ + 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 - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + // Speculate Gui -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + public Speculate Gui () { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e + super ("" Speculate GUI ""); -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + container = get Content Pane (); + set Size ( 800 , 600 ); - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** -* 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 -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 -"81 ""subscribermanager + // Submit Listener -Socket aSocket; - int ID; - String EventLog; + public void action Performed ( Action Event e ) { - Connection conn; - ResultSet rs; - Statement stmt; + if ( e . get Source () == submit Button ) { - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + send Query TO Server (); - // 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 -{ + } + if ( e . get Source () == fetch Button ) { -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + System . out . println ("" Fetch Button Pressed -// run method will be execute from the main method when u say Thread. start() in main - public void run() + + void send Query TO Server () { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + 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 -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 -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 -"48 ""Constraint Inner Panel + socket = new Socket ( ip , Port No ); -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 + Output Stream os = socket . get Output Stream (); + Output Stream - 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 + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + String [] attribute = { "" Value "", "" Attribute "" }; - } + String project Name = this . proj Name Text . get -public Vector get Values From Data Base () + public static void main ( String [] args ) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - + 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -super( em); - } +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -// Construct Visual model for Merge Event -public void BuildEvent() + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve - +if( opSym. token == '(' && clSym. token != ')' || -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 -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,On receipt of an event message the eventserver shall record the event in an eventlog.,128,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 -"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 + /** + * 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 +"86 ""EB Shape - //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. +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public EBShape( int xpos, int ypos, Color col) { -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 - +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -public String toString() + public void Updaterequirement Info(String rno, String pname, String mname) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - /** -* Returns the id. -* @return int -*/ - public String getId() + public boolean match( int mx, int my) { -return id; +return true; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public int GetX() { -return logic; +return x; } - /** -* Returns the name. -* @return String -*/ - public String getName() + public int GetY() { -return name; +return y; } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public Color GetC() +{ +return c; } + public String GetReqno() + { +return requirement No; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String GetProject() + { +return ProjectName; } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + 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: 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: 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 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +// 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"""" - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; + // 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) - /** -* 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 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +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 +"84 ""White Board Execution Graph - super ("""" Search Result GUI """"); - - container = get Content Pane (); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - set Size ( 800 , 250 ); - panel = new JPanel (); + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); +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 Vector search Date () - { +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - 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 ) - { + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - pair Vector = new Vector (); - query String Combo . remove All Items (); + 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 - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + 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 - // Select Actions +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - 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 ); - } - } +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 +"85 ""Decompose Model - // Button Actions +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +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 +"52 ""Pair +private String queryID; + private String queryString; - public void impact Report ( String id ) - { + public Pair(String queryID, String queryString) { - // super ("""" Impact Report """"); +this. queryID = queryID; +this. queryString = queryString; - container = get Content Pane (); + } - set Size ( 1020 , 740 ); + public String getQueryID() { +return this. queryID; + } - this . query ID = id ; + public String getQueryString() { +return this. queryString; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public Vector get Constraint From Data Base () - { + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - Vector v = new Vector (); - Socket server ; - String line = new String (); + }"" +",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 +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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public Vector get Driver From Data Base () + 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; - Vector v = new Vector (); - Socket server ; - String line = new String (); +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - try - { - server = new Socket ( server IP , 1701 ); +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - 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 -"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++) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -p +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -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 -"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 +//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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public void speculate(String str) { -this. id = id; -this. type = type; -this. +System. out. println(""""Speculate""""); +CallBack -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public void impactReport(String str) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - +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 +"49 ""Constraints Description -//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 +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 String toString() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; + public String get Description () { + return this . description ; } - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public String get Logic () { + return this . logic ; } + public String get Module Path () { + return this . module Path ; + } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + 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 ; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } + public void set Units ( String units ) { + this . units = units ; + } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + public void set Value ( String units ) { + this . value = units ; } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } + public String get Performance Model Name () { + return this . performance Model Name ; + } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - /** -* 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 -"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 -"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 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 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 +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 +"50 ""Driver Description -// 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 +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 -//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 +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - // 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. +this. projectName = projec - public void Dispatch +public String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } - public String getErrorMessage() + public String getFromAttribute() { - return errMsg; +return fromAttribute; } + public String getModulePath() + { +return modulePath; + } - public boolean Contains(String ContextString, String SearchString) + public String getProjectName() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +return projectName; + } -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 -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 -"76 ""Evaluator + public String getRequirementID() + { +return requirementID; + } -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= + public String getToAttribute() + { +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -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 void setDescription(String description) + { +this. description = description; + } -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -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 void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -/** - * 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 + 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() + { -/** - * 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 +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -/** - * 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 +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: 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 +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 +"91 ""Modify Model -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public ModifyModel(EBT em) +{ +super( em); + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -/** - * 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) +public StringBuffer GenerateEvent() { -super( em); - } +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -// Construct Visual model for Merge Event -public void BuildEvent() + protected void paintComponent(Graphics g) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve - +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 +"75 ""Driver -public StringBuffer GenerateEvent() +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -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 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -public EBShape( int xpos, int ypos, Color col) + public String toString() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - - public void Updaterequirement Info(String rno, String pname, String mname) + /** +* Returns the id. +* @return int +*/ + public String getId() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return id; } - public boolean match( int mx, int my) + /** +* Returns the name. +* @return String +*/ + public String getName() { -return true; +return name; } - public int GetX() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return x; +return valueFrom; } - public int GetY() + public double getValueTo() { -return y; +return valueTo; } - public Color GetC() -{ -return c; - } - public String GetReqno() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -return requirement No; +this. id = id; } - public String GetProject() + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -return ProjectName; +this. name = name; } - public String GetModule() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -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: 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 -"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,The user shall be able to delete subscriptions.,107,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 -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 -"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 +this. valueFrom = valueFrom; + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + 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 +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; -this. projectName = projec + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -public String getChangedAttribute() + EventServerThread(ServerSocket ss) { -return changedAttribute; - } - - public String getDescription() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -return description; - } - public String getFromAttribute() + while( true) { -return fromAttribute; - } - - public String getModulePath() + try { -return modulePath; - } +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - public String getProjectName() - { -return projectName; - } - public String getRequirementID() +public String getNextID() { -return requirementID; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) +public String searchDate() { -this. changedAttribute = changedAttribute; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) +public String searchQueryID(String date) { -this. fromAttribute = fromAttribute; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + public String getConstraintFromDataBase(String queryID) { -this. projectName = projectName; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) + public String getDriverFromDataBase(String queryID) { -this. toAttribute = toAttribute; - } +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 +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: 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 +"47 ""Impact Report - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; - 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() - { + private JPanel driver Panel = new JPanel (); -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -public int hashCode() + public Impact Report () { -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 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + super ("""" Search Result GUI """"); - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + container = get Content Pane (); + set Size ( 800 , 250 ); -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + panel = new JPanel (); -this. projectName = projec + panel . set Layout ( null ); -public String getChangedAttribute() - { -return changedAttribute; - } + this . server IP = + JOption Pane + . show In - public String getDescription() - { -return description; - } - public String getFromAttribute() + public static void main ( String [] args ) { -return fromAttribute; - } - public String getModulePath() - { -return modulePath; - } + Impact Report im = new Impact Report (); - public String getProjectName() - { -return projectName; } - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() + public Vector search Date () { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public void setDescription(String description) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + pair Vector = new Vector (); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + query String Combo . remove All Items (); - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + query String Combo . add Item ("""" Select Query String """"); - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + Socket server ; + String line = new String (); - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } + // Select Actions - 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() - { + public void action Performed ( Action Event e ) + { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -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 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: 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 -"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 void action Performed ( Action Event e ) { -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 -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 -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: 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 -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 -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: 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 -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 -"82 ""Tokenizer + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -/** - * 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 ) + public void impact Report ( String id ) + { + // super ("""" Impact Report """"); + container = get Content Pane (); - /** - * 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 + set Size ( 1020 , 740 ); + this . query ID = id ; -/** - * 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 ) { } -} + System . out . println ("""" Impact Report Constructor ..... ID """" + -/** - * 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 + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + Socket server ; + String line = new String (); -private void skip + try + { + server = new Socket ( server IP , 1701 ); -/** - * 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 -"95 ""Text Model + if ( server . is Connected () ) + { + Buffered -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 Vector get Driver From Data Base () + { - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + Vector v = new Vector (); -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + Socket server ; + String line = new String (); -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + try + { + server = new Socket ( server IP , 1701 ); -public void drawModel() -{ -repaint(); -} + 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 +"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; -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 -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 -"64 ""DOORs Thread Pool + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public void run() + { - //@param argsNo arguments are used. - public static void main(String args[]) + while( true) { -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 -"65 ""About Dialog +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -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 -"92 ""New Model + /** +* 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. +*/ -public NewModel(EBT em) -{ -super( em); + 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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -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 -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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { - 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 +_ 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 "61 ""Worker Thread /** @@ -47699,361 +47099,375 @@ 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 -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: 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 -"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 +",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 +"63 ""Doors Thread - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -addWindowListener( new WindowAdapter() -{ + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + public void run() + { -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + while( true) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ try { -Notification +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 +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: 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 +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 +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 +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: 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 +"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 -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +// constructor +public Notification_Event() { - int index =0; - try + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -Notification_Event nEvt1 = (Notificati +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) + public void ParseEvent(String TextLine) { -int index = eventList. getSelectedIndex(); -if ( index != -1) +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - try - { -N + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - m_Deleterequirement List. remove(0); + //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 +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 +"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 +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 +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: 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -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 + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -void UpdateDisplayList() + public Impact Report () { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + super ("""" Search Result GUI """"); - // 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 + container = get Content Pane (); + set Size ( 800 , 250 ); + panel = new JPanel (); -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: 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 -"64 ""DOORs Thread Pool + panel . set Layout ( null ); -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + this . server IP = + JOption Pane + . show In - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public static void main ( String [] args ) { - 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 -"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. - */ + Impact Report im = new Impact Report (); -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; + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); - /** - * 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 -"60 ""Thread Pool + query String Combo . remove All Items (); -/** -* 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); + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); -/** -* 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 + // Select Actions - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + 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 ); + } + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + // 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 ) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + + // 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 () { -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 -"87 ""EBT + Vector v = new Vector (); -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + Socket server ; + String line = new String (); -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - public boolean mouseDown( java. awt.Evente, int x, int y) + public Vector get Driver From Data Base () { - return true; - } + Vector v = new Vector (); + + Socket server ; + String line = new String (); - public boolean mouseUp( java. awt.Evente, int x, int y) + 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 +"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) { -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -VisualPanel.Clicked( e. getX(), e. getY()); +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 (); } -public void mouseExited( java. awt. event.MouseEvente){} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public void mousePressed( java. awt. event.MouseEvente){} +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 +"66 ""Config Dialog -public void mouseReleased( java. awt. event.MouseEvente){} +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; +// 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 +"78 ""Notification Event -public void valueChanged(ListSelectionEvent e) +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() { -if ( e. getValueIsAdjusting()) -return; + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -switch(EventList. getSelectedIndex()) +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -mainframe. addWindowListener( new WindowAdapter() + +// 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() { -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 -"91 ""Modify Model + 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: 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 +"92 ""New Model -public ModifyModel(EBT em) +public NewModel(EBT em) { super( em); } @@ -48062,263 +47476,203 @@ super( em); // Construct Visual model for Merge Event public void BuildEvent() { - ClearVectors(); +ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 4; +AddArrow(35,97,59,97); +CurrentEvent = 0; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); +thisEvent. append(""""New|0|""""); thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - +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: 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 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 +"94 ""Refine Model - protected void paintComponent(Graphics g) +public RefineModel(EBT em) { -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: 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 -"82 ""Tokenizer +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public StringBuffer GenerateEvent() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +// 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 -/** - * 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( ) ) -{ +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 +"94 ""Refine Model +public RefineModel(EBT em) +{ +super( em); + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) + // Construct Visual model for Merge Event +public void BuildEvent() { -return Character. isJavaIdentifierPart( ch ); + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +public StringBuffer GenerateEvent() { -String result = """""""" + ch; +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 +"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;/ -for( ; nextChar( ); result += ch ) + 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 - /** - * 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 +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * 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--; +String sName, sReqno, sModule, sKey1, sKey2; try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} +{ + 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. -/** - * 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 + public void Dispatch -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public String getErrorMessage() + { + return errMsg; + } -private void skip + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -/** - * 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 -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +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 +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 +"67 ""Event Detail Dialog -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 Balance( Reader inStream ) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -errors = 0; -tok = new Tokenizer( inStream ); -} - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +private void okButtonActionPerformed (ActionEvent evt) { -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: 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 -"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 eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,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() + if ( displayMode == true) { -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 - +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { - 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 - +setVisible ( false); +dispose (); +} - public String getErrorMessage() - { - return errMsg; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - 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 +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 "81 ""subscribermanager Socket aSocket; @@ -48369,172 +47723,103 @@ 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 -"85 ""Decompose Model - +",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 +"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 +"92 ""New Model -public DecomposeModel(EBT em) +public NewModel(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 - +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} 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 -"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 +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 +"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 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public Notification_Event() { - 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 + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -public void getTrackVariableName() +public Object clone() throws CloneNotSupportedException { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -public void setCalculatedValues() + public void ParseEvent(String TextLine) { -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 + 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 Vector getImpactReport() + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -//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 -"63 ""Doors Thread +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 +"92 ""New Model - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; +public NewModel(EBT em) +{ +super( em); } - public void run() - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - 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: 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,Event types shall include merging requirements.,126,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: 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 + +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 +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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -48588,341 +47873,503 @@ if( opSym. token == '(' && clSym. token != ')' || * 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: 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: 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 -"71 ""Requirement +",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 +"95 ""Text Model -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -public Requirement() +public TextModel(EBT e) { -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + // 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -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: 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 -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 -"75 ""Driver +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -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 void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} - 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; - } +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 +"51 ""Driver Inner Panel - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +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) { - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public double getValueTo() - { -return valueTo; - } +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 +"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; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +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 +"51 ""Driver Inner Panel - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } +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) { - public void setValueTo( double value) - { -this. valueTo = valueTo; +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; }"" -",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 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 -"86 ""EB Shape +",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: 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 +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 +"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; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +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 +"60 ""Thread Pool - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +/** +* 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); - public boolean match( int mx, int my) - { -return true; - } +/** +* 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 - public int GetX() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return x; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public int GetY() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -return y; +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: 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: 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: 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 +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 +"93 ""Obsolete Model - public Color GetC() +public ObsoleteModel(EBT em) { -return c; +super( em); } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } +// 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 String GetModule() +public StringBuffer GenerateEvent() { -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 -"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 -"private JPanel center Panel = null ; +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 +"76 ""Evaluator - 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 +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= - // Speculate Gui - public Speculate Gui () - { +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 - super ("" Speculate GUI ""); +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - container = get Content Pane (); +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 { - // Submit Listener +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public void action Performed ( Action Event e ) { +/** + * 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 - if ( e . get Source () == submit Button ) { +/** + * 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 - send Query TO Server (); +/** + * 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 - } - if ( e . get Source () == fetch Button ) { +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - System . out . println ("" Fetch Button Pressed + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - void send Query TO Server () - { +/** + * 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 - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +/* + * 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 - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream + /** + * 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. - public void pull Value From DOORS () - { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +/** + * 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. + */ - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get +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 +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 +"94 ""Refine Model - 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 -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 -"48 ""Constraint Inner Panel +public RefineModel(EBT em) +{ +super( em); + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - 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 +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 +"73 ""Constraints + +String id; + String name; + double value; + String logic; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + 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; } -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - if ( server . is Connected () ) - { - Buffered R + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - 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 + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public JPanel get Panel () - { - return panel ; + /** +* 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; }"" -",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: 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 -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 +",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 +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 "52 ""Pair private String queryID; @@ -48963,255 +48410,187 @@ return """"Query ID: """" }"" ",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 -"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; - } +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 +"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. +*/ - public void run() + synchronized public void waitDone() { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - while( true) - { - try +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -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 -"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 +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -try +_ activeThreads++; +_ started = true; +notify(); + } -public static void main(String args[]) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -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 +_ activeThreads--; +notify(); + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - +_ 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 +"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; - private void saveMenuItemActionPerformed (ActionEvent evt) + EventServerThread(ServerSocket ss) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -exitApplication(); - } - - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + while( true) { -openEventsMenuItemActionPerformed( evt); - } - - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + try { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public String getNextID() { -if (! listModel. isEmpty()) +try { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -void UpdateDisplayList() +public String searchDate() { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +String dateString = new String(); +Vector dateVector = new Vector(); 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 -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: 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - public Vector getConstraints() +public String searchQueryID(String date) { -return constraintVector; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public Vector getDrivers() - { -return driverVector; - } - public String getName() + public String getConstraintFromDataBase(String queryID) { -return name; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + public String getDriverFromDataBase(String queryID) { -if ( driverVector. contains( driver)) +String driverString = new String(); +try { -} -else - this. driverVector. add( driver); - } + 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 +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 +"80 ""Requirement - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } +public Requirement() {// empty constructor - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } +} - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - 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 +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 +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 "47 ""Impact Report private String server IP = """" local host """"; @@ -49350,136 +48729,429 @@ public void action Performed ( Action Event e ) { 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 -"95 ""Text Model +",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 +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: 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 +"77 ""Model Driver -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +String msg=""""""""; -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 ModelDriver(String text) + { +this. msg = text; +init(); + } - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + 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: 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 +"64 ""DOORs Thread Pool -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + //@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: 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: 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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -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 -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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { -public Requirement() -{ -} +this. projectName = projec -public Object clone() throws CloneNotSupportedException +public String getChangedAttribute() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +return changedAttribute; } + public String getDescription() + { +return description; + } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public String getFromAttribute() { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +return fromAttribute; + } -public void ParseRequirement(String TextLine) + public String getModulePath() { - 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,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"84 ""White Board Execution Graph +return modulePath; + } -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + public String getToAttribute() + { +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -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 setProjectName(String projectName) + { +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -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 + 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 +"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 +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: 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 +"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 +"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 +"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(){ @@ -49516,12 +49188,7 @@ 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,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,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: 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: 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 -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 +",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 "54 ""eventserver public static void (String args[]) @@ -49537,478 +49204,582 @@ 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: 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 -"81 ""subscribermanager +",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 +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 +"48 ""Constraint Inner Panel -Socket aSocket; - int ID; - String EventLog; +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 - Connection conn; - ResultSet rs; - Statement stmt; + 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 - // 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) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -} -public void sendImpactReportToEventServer(String text) + +public Vector get Values From Data Base () { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered R -// run method will be execute from the main method when u say Thread. start() in main - public void run() + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +public JPanel get Panel () { -// 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 -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: 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 -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 -"69 ""Notification Event + 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: 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: 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 +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 +"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: 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 +"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 +"62 ""Call Back -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(); -} +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + private PerformanceModel performance model= null - public void ParseEvent(String TextLine) + public void parseSpeculateInformation(String str) { - 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 +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public void identifyPerformanceModels() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -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 -"65 ""About Dialog +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -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: 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 -"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; +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - DOORsThread(ServerSocket ss) + + public void createExecuteString() { - theServer = ss; - count++; - taskNumber = count; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public void run() - { - while( true) - { - try +public void parseImpactReport(String str) { -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 -"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 +Connection conn = null; -// constructor -public Notification_Event() +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 +"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() { - 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 +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public void ParseEvent(String TextLine) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +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 +"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() { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +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 +"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 - //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 -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 -"60 ""Thread Pool + 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 -/** -* 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); +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -/** -* 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() +public Vector get Values From Data Base () { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () { -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 -"91 ""Modify Model + 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 +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: 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 +"93 ""Obsolete Model -public ModifyModel(EBT em) +public ObsoleteModel(EBT em) { super( em); } - // Construct Visual model for Merge Event +// Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 4; -} +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve public StringBuffer GenerateEvent() -{ + { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - +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: 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 +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 +"75 ""Driver - 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 -"76 ""Evaluator +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; + } -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= + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -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 + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -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 + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -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 { + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public double getValueTo() + { +return valueTo; + } -/** - * 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 + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } -/** - * 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 + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + 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 +"83 ""Variable -/** - * 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 +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 -/* - * 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 + //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. - /** - * 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. +//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 -/** - * 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. - */ +//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 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: 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 -"67 ""Event Detail Dialog +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -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 + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + /** +* Returns the name. +* @return String +*/ + public String getName() { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +return name; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -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 -"92 ""New Model + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public NewModel(EBT em) + + /** +* 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 +"91 ""Modify Model + +public ModifyModel(EBT em) { super( em); } @@ -50017,107 +49788,97 @@ super( em); // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = 4; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); +thisEvent. append(""""Modify|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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + ebs = (EBShape)EventShapes - private Connection conn; - private Statement stmt; + + 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 +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 +"56 ""Event Parser + +private Connection conn; private ResultSet rs; - private EventParser ep; - private int id; + private Statement stmt; - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() + //EventParser Constructor + // initializes the Database connection + public EventParser() { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - while( true) - { - try + + public void updateEvent(String str, String ID) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public String getNextID() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public String searchDate() + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public String searchQueryID(String date) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +// 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 String getConstraintFromDataBase(String queryID) + public void speculate(String str) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +System. out. println(""""Speculate""""); +CallBack - public String getDriverFromDataBase(String queryID) +public void impactReport(String str) { -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 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 -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 -"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 +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 +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 +"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 "50 ""Driver Description private String projectName = null; @@ -50247,459 +50008,609 @@ if ( hashCode == 0) 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: 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 -"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 - +",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 +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 +"54 ""eventserver -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public static void (String args[]) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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: 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 +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: 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: 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: 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 +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: 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 +"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 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 +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { +/** + * 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; - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -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 -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 -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 -"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 + * 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 +"93 ""Obsolete Model -/** -* 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(); +public ObsoleteModel(EBT em) +{ +super( em); } -} 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(); - } +// 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 - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() +public StringBuffer GenerateEvent() { -_ activeThreads--; -notify(); - } +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 +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: 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: 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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - /** -* 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 -"77 ""Model Driver + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -String msg=""""""""; -public ModelDriver(String text) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -this. msg = text; -init(); - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - 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 -"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 -"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 get Description () { + return this . description ; } + public String get Logic () { + return this . logic ; + } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; + public String get Module Path () { + return this . module Path ; } - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; + public void set Description ( String description ) { + this . description = description ; } - - public double getValueTo() - { -return valueTo; + public void set Logic ( String logic ) { + this . logic = logic ; } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; + 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 ; + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; + public void set Units ( String units ) { + this . units = units ; } + public void set Value ( String units ) { + this . value = units ; + } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; + public String get Impacted Constraint () { + return this . impacted Constraint ; } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - 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 -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 -"67 ""Event Detail Dialog + public String get Attribute () { + return this . attribute ; + } -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 void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + 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 """" -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +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: 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,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +"65 ""About Dialog -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +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 +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 +"53 ""Performance Model +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -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 -"47 ""Impact Report + private long queryID = 0; -private String server IP = """" local host """"; - private JPanel center Panel = null ; + public static int count = 0; - private JPanel driver Panel = new JPanel (); + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } - private JPanel driver Inner Panel = null ; + public Vector getConstraints() + { +return constraintVector; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public Vector getDrivers() + { +return driverVector; + } - public Impact Report () + public String getName() { +return name; + } - super ("""" Search Result GUI """"); + public void setName(String name) + { +this. name = name; + } - container = get Content Pane (); + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - set Size ( 800 , 250 ); + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - panel = new JPanel (); + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - panel . set Layout ( null ); + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } - this . server IP = - JOption Pane - . show In + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - public static void main ( String [] args ) + public DriverDescription getDriver(DriverDescription driver) { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - Impact Report im = new Impact Report (); + 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 Vector search Date () + 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 +"95 ""Text Model - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { +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 - pair Vector = new Vector (); - query String Combo . remove All Items (); + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - query String Combo . add Item ("""" Select Query String """"); +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - Socket server ; - String line = new String (); +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} - // Select Actions - public void action Performed ( Action Event e ) - { +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +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 +"61 ""Worker Thread - // Button Actions +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +/** + * 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 +"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); - if ( pair - . get + 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 impact Report ( String id ) +public void getIP Server( String serverIP) { +this. serverIP = serverIP; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - set Size ( 1020 , 740 ); - this . query ID = id ; +public void drawModel() +{ +repaint(); +} - System . out . println ("""" Impact Report Constructor ..... ID """" + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public Vector get Constraint From Data Base () - { - Vector v = new Vector (); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - Socket server ; - String line = new String (); +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 - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +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(){} - public Vector get Driver From Data Base () + + 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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - 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 -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 + 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: 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 +"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: 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: 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 "92 ""New Model public NewModel(EBT em) @@ -50724,308 +50635,261 @@ 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 -"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; - } - +",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 +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: 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 +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: 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 +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 +"60 ""Thread Pool - /** -* Returns the id. -* @return int +/** +* The threads in the pool. */ - public String getId() { -return id; - } - - - /** -* Returns the logic. -* @return String +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. */ - public String getLogic() { -return logic; - } - +Collection assignments = new ArrayList(3); - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* Returns the value. -* @return double +/** +* 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 */ - public double getValue() { -return value; - } + pub /** -* 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 +* Get a new work assignment. +* +* @return A new assignment */ - public void setLogic(String logic) { -this. logic = logic; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Sets the name. -* @param name The name to set +* Called to block the current thread until +* the thread pool has no more work. */ - public void setName(String name) { -this. name = name; + 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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - /** -* 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 -"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 ) + //EventParser Constructor + // initializes the Database connection + public EventParser() { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } + 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; - public String get Description () { - return this . description ; - } +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - public String get Logic () { - return this . logic ; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +//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 - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +//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 String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +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 +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 +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: 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 +"87 ""EBT - 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 ; - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; } - 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 boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - 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: 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 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 void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public void mouseExited( java. awt. event.MouseEvente){} -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 mousePressed( java. awt. event.MouseEvente){} -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 void mouseReleased( java. awt. event.MouseEvente){} -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 void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - 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 void update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} - 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 void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - 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 +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""""); -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 +"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 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 +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 +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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -51079,833 +50943,948 @@ if( opSym. token == '(' && clSym. token != ')' || * 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 -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 -"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 -"82 ""Tokenizer +",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 +"86 ""EB Shape -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -/** - * 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( ) ) -{ + public boolean match( int mx, int my) + { +return true; + } + public int GetX() + { +return x; + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public int GetY() + { +return y; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) + public Color GetC() { -String result = """""""" + ch; +return c; + } -for( ; nextChar( ); result += ch ) + public String GetReqno() + { +return requirement No; + } + public String GetProject() + { +return ProjectName; + } - /** - * 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 + 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 +"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 -/** - * 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( ) +public Notification_Event() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -/** - * 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 +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -/** - * 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 -"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 -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 -"61 ""Worker Thread + 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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public void DisplayValues() { -owner = o; -} - + 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: 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 +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 +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 -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +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 +"80 ""Requirement -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 -"60 ""Thread Pool +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -/** -* 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); +public Requirement() {// empty constructor -/** -* 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 +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* 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 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; +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: 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: 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 +"84 ""White Board Execution Graph - private JPanel driver Panel = new JPanel (); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - public Impact Report () - { - super ("""" Search Result GUI """"); - container = get Content Pane (); + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - set Size ( 800 , 250 ); - panel = new JPanel (); +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 - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +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 static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + 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 Vector search Date () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + 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 - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +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 +"49 ""Constraints Description - Socket server ; - String line = new String (); +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 ; - // Select Actions - public void action Performed ( Action Event e ) - { + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - // Button Actions + } -public void action Performed ( Action Event e ) { + public String get Description () { + return this . description ; + } - if ( submit Button == e . get Source ()) { + public String get Logic () { + return this . logic ; + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { + public String get Module Path () { + return this . module Path ; + } - Pair pair = ( Pair ) pair Vector . get ( i ); + public String get Project Name () { + return this . project Name ; + } - if ( pair - . get + 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 impact Report ( String id ) - { + public void set Description ( String description ) { + this . description = description ; + } - // super ("""" Impact Report """"); + public void set Logic ( String logic ) { + this . logic = logic ; + } - container = get Content Pane (); + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - set Size ( 1020 , 740 ); + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } - this . query ID = id ; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + public void set Units ( String units ) { + this . units = units ; + } + public void set Value ( String units ) { + this . value = units ; + } - public Vector get Constraint From Data Base () - { + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - Vector v = new Vector (); + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - Socket server ; - String line = new String (); + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - try - { - server = new Socket ( server IP , 1701 ); + public String get Performance Model Name () { + return this . performance Model Name ; + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () - { - Vector v = new Vector (); +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 - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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: 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 +"76 ""Evaluator - 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 -"89 ""Event Line +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= -protected int top, left, right, bottom; +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 EventLine ( int t, int l, int r, int b) +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -top = t; -left = l; -right = r; -bottom = b; -} +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public int GetT() { return top;} -public int GetL() { return left;} +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 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 -"81 ""subscribermanager +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -Socket aSocket; - int ID; - String EventLog; +/** + * 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 - Connection conn; - ResultSet rs; - Statement stmt; +/** + * 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 - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +/** + * 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 - // 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 -{ + +/** + * 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( ); } -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 -{ +/** + * 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 - // 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 -"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; + /** + * 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. - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +/** + * 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. + */ -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 -"74 ""database +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 +"49 ""Constraints Description -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - /** -* 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 + public String get Description () { + return this . description ; + } - /** -* 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 + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } -/** -* 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 + public String get Project Name () { + return this . project Name ; + } - /** -* 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 String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -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 String get Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } -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 set Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -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 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 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 -"62 ""Call Back + public void set Units ( String units ) { + this . units = units ; + } + public void set Value ( String units ) { + this . value = units ; + } -private Hash table requirementDescTable = new Hash table(); + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - private Hash table constraintDescTable = new Hash table(); + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - private Hash table performanceModelTable = new Hash table(); + public String get Attribute () { + return this . attribute ; + } - private PerformanceModel performance model= null + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } - 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 set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = 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 void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 +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 +"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 void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + 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 parseImpactReport(String str) +public void getIP Server( String serverIP) { +this. serverIP = serverIP; + } -Connection conn = null; - -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -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 -"71 ""Requirement +public void drawModel() +{ +repaint(); +} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +public void drawModel(EBShape sh) { +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - 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 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 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 -"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 void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + protected void BuildEvent(){} + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +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 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 String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; - 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 + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - 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 + // 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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -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 -"65 ""About Dialog +// 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 +{ -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 -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,The user shall be able to construct speculative queries using a GUI.,115,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 + // 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 +"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 void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + 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 -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +// 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 -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try { -repaint(); -} + 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. -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + public void Dispatch -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 + + 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 +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 +"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 +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: 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: 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 "50 ""Driver Description private String projectName = null; @@ -52035,376 +52014,185 @@ if ( hashCode == 0) 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 -"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; +",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 +"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 void createExecuteString() - { +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public void parseImpactReport(String str) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -Connection conn = null; - -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} -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 -"52 ""Pair +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -private String queryID; - private String queryString; +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 +"82 ""Tokenizer - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - } - public String getQueryID() { -return this. queryID; - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +/** + * 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( ) ) +{ - }"" -",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: 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 -"92 ""New Model -public NewModel(EBT em) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -super( em); - } +return Character. isJavaIdentifierPart( ch ); +} - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -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 -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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + /** + * 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 - //@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 -"61 ""Worker Thread /** -* True if this thread is currently processing. - */ -public boolean busy; + * 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 ) { } +} + /** - * The thread pool that this object belongs to. + * 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 */ -public ThreadPool owner; +private /** - * The constructor. - * - * @param o the thread pool + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + +private void skip /** - * Scan for and execute tasks. + * 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. */ -public void run() +private void processSlash( ) { -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: 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 -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 -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 -"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 -"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 -"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: 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 +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: 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: 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: 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 +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 "86 ""EB Shape @@ -52471,685 +52259,735 @@ return ProjectName; 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 -"74 ""database +"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; +} -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +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 +"67 ""Event Detail Dialog - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - Class. fo +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - /** -* 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 +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - /** -* 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 +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} -/** -* 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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - /** -* 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 +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 +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 +"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 +"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: 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: 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 +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: 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 +"82 ""Tokenizer -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -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 +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} -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 +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - 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; +/** + * 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( ) ) +{ - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - } - public String getQueryID() { -return this. queryID; - } +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - public String getQueryString() { -return this. queryString; - } +for( ; nextChar( ); result += ch ) - 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""""; + /** + * 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 - }"" -",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 -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 -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 -"private JPanel center Panel = null ; +/** + * 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 ) { } +} - 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 +/** + * 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 - public Speculate Gui () - { - super ("" Speculate GUI ""); +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - container = get Content Pane (); +private void skip - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +/** + * 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 +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: 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - // Submit Listener + private JPanel driver Panel = new JPanel (); - public void action Performed ( Action Event e ) { + private JPanel driver Inner Panel = null ; - if ( e . get Source () == submit Button ) { + private JPanel impact Panel = null ; + private JPanel impact Inner P - send Query TO Server (); + public Impact Report () + { - } + super ("""" Search Result GUI """"); - if ( e . get Source () == fetch Button ) { + container = get Content Pane (); + set Size ( 800 , 250 ); - System . out . println ("" Fetch Button Pressed + panel = new JPanel (); + panel . set Layout ( null ); - void send Query TO Server () - { + this . server IP = + JOption Pane + . show In - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + public static void main ( String [] args ) + { - socket = new Socket ( ip , Port No ); + Impact Report im = new Impact Report (); - Output Stream os = socket . get Output Stream (); - Output Stream + } - public void pull Value From DOORS () + + public Vector search Date () { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - String [] attribute = { "" Value "", "" Attribute "" }; + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { - String project Name = this . proj Name Text . get + pair Vector = new Vector (); + query String Combo . remove All Items (); - 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 -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 -"51 ""Driver Inner Panel + query String Combo . add Item ("""" Select Query String """"); -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + Socket server ; + String line = new String (); - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + // Select Actions -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + public void action Performed ( Action Event e ) + { -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: 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 -"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: 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 -"69 ""Notification Event + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -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 + // Button Actions -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +public void action Performed ( Action Event e ) { -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); - 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 + if ( pair + . get - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + + public void impact Report ( String id ) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve + // super ("""" Impact Report """"); -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 -"50 ""Driver Description + container = get Content Pane (); -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + set Size ( 1020 , 740 ); - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + + public Vector get Constraint From Data Base () { -this. projectName = projec + Vector v = new Vector (); -public String getChangedAttribute() - { -return changedAttribute; - } + Socket server ; + String line = new String (); - public String getDescription() - { -return description; - } - public String getFromAttribute() - { -return fromAttribute; - } + try + { + server = new Socket ( server IP , 1701 ); - public String getModulePath() + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () { -return modulePath; - } - public String getProjectName() + 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 +"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) { -return projectName; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public String getRequirementID() + +// 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 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -return requirementID; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public String getToAttribute() + + public String toString() { -return toAttribute; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public void setChangedAttribute(String changedAttribute) + /** +* Returns the id. +* @return int +*/ + public String getId() { -this. changedAttribute = changedAttribute; +return id; } - public void setDescription(String description) + + /** +* Returns the name. +* @return String +*/ + public String getName() { -this. description = description; +return name; } - public void setFromAttribute(String fromAttribute) + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -this. fromAttribute = fromAttribute; +return valueFrom; } - public void setModulePath(String modulePath) + + public double getValueTo() { -this. modulePath = modulePath; +return valueTo; } - public void setProjectName(String projectName) + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -this. projectName = projectName; +this. id = id; } - public void setRequirementID(String requirementID) + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -this. requirementID = requirementID; +this. name = name; } - public void setToAttribute(String toAttribute) + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -this. toAttribute = toAttribute; +this. valueFrom = valueFrom; } - public String createKey() + + public void setValueTo( double value) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - public boolean equals(Object o) + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -public int hashCode() +public String getNextID() { -int hashCode = 0; -if ( hashCode == 0) +try { - 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: 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 -"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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - // 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) +public String searchDate() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; +String dateString = new String(); +Vector dateVector = new Vector(); try { + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -} -public void sendImpactReportToEventServer(String text) +public String searchQueryID(String date) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public String getConstraintFromDataBase(String queryID) { -System. out. println(""""Inside Run method""""); -String str=""""""""; +String ConstString = new String(); try { + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public String getDriverFromDataBase(String queryID) { -// 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 -"66 ""Config Dialog +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 +"80 ""Requirement -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); +public Requirement() {// empty constructor + } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -// 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 + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -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 -"53 ""Performance Model +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 +"69 ""Notification Event -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +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 - private long queryID = 0; +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public static int count = 0; - public PerformanceModel(String name, long queryID) +public Object clone() throws CloneNotSupportedException { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + public void ParseEvent(String TextLine) { -return driverVector; - } + 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 String getName() - { -return name; - } - public void setName(String name) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. name = name; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) +if ( m_Eve + +public void DisplayValues() { -} -else - this. driverVector. add( driver); - } + 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 +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 +"75 ""Driver - public void removeDriver(DriverDescription driver) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -this. driverVector. remove( driver); +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) + public String toString() { -this. constraintVector. add( constraint); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public boolean containsConstraint(ConstraintsDescription constraint) + /** +* Returns the id. +* @return int +*/ + public String getId() { -return this. constraintVector. contains( constraint); +return id; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) + /** +* Returns the name. +* @return String +*/ + public String getName() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +return name; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return this. queryID; +return valueFrom; } - public void setQueryID( long id) + + public double getValueTo() { -this. queryID = id; +return valueTo; } - 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 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. + /** +* Sets the id. +* @param id The id to set */ -Collection assignments = new ArrayList(3); + public void setId(String id) + { +this. id = id; + } -/** -* 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 + ** +* Sets the name. +* @param name The name to set */ - pub + public void setName(String name) + { +this. name = name; + } - /** -* Get a new work assignment. -* -* @return A new assignment + ** +* Sets the value. +* @param value The value to set */ - public synchronized Runnable getAssignment() + public void setValueFrom( double value) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +this. valueFrom = valueFrom; + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + public void setValueTo( double value) { -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 +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 "74 ""database @@ -53251,484 +53089,297 @@ System. out. println("""" enter calcValue // this method creates the token for e 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: 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 -"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 +",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 +"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; -public DriverDescription( -String projectName, + String projectName, String modulePath, String requirementID, String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +String changeAttribute, +String fromValue, +String toValue) { -this. projectName = projec +panel = new JPanel(); -public String getChangedAttribute() - { -return changedAttribute; - } +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public String getDescription() - { -return description; - } +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: 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 +"47 ""Impact Report - public String getFromAttribute() - { -return fromAttribute; - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; - public String getModulePath() - { -return modulePath; - } + private JPanel driver Panel = new JPanel (); - public String getProjectName() - { -return projectName; - } + private JPanel driver Inner Panel = null ; - public String getRequirementID() - { -return requirementID; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P - public String getToAttribute() + public Impact Report () { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + super ("""" Search Result GUI """"); - public void setDescription(String description) - { -this. description = description; - } + container = get Content Pane (); - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + set Size ( 800 , 250 ); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + panel = new JPanel (); - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + panel . set Layout ( null ); - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + this . server IP = + JOption Pane + . show In - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() + public static void main ( String [] args ) { -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() - { + Impact Report im = new Impact Report (); -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + } -public int hashCode() + public Vector search Date () { -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 -"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(); -} + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n + pair Vector = new Vector (); - 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 + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -// 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 + Socket server ; + String line = new String (); + // Select Actions - //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 -"79 ""performance model Handler + public void action Performed ( Action Event e ) + { -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + // Button Actions - performance model Handler(String msg) - { -this. strES = msg; - } +public void action Performed ( Action Event e ) { - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -//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; + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - public void saveModel( int id) + public void impact Report ( String id ) { -// save current model -database. saveCurrentModel( id); - } - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + // super ("""" Impact Report """"); - 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 -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: 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 -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 -"91 ""Modify Model + container = get Content Pane (); -public ModifyModel(EBT em) -{ -super( em); - } + set Size ( 1020 , 740 ); + this . query ID = id ; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + System . out . println ("""" Impact Report Constructor ..... ID """" + -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); - 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 -"56 ""Event Parser + Socket server ; + String line = new String (); -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: + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - 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) + public Vector get Driver From Data Base () { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - + Vector v = new Vector (); -//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 + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -//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 -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: 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 -"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 -"90 ""Merge Model - + 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 +"76 ""Evaluator -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +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= - // Construct Visual model for Merge Event -public void BuildEvent() +private static class Precedence { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -public StringBuffer GenerateEvent() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -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 -"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 +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +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 { -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +/** + * 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 -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +/** + * 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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -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 -"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 -"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 -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 -"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: 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 -"81 ""subscribermanager + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +/** + * 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 - // 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 -{ +/* + * 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 -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + /** + * 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. -// 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 -{ +/** + * 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. + */ - // 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 +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 +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 "74 ""database @@ -53831,168 +53482,6 @@ 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: 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 -"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 -"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 -"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: 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 -"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 "47 ""Impact Report private String server IP = """" local host """"; @@ -54131,11 +53620,49 @@ public void action Performed ( Action Event e ) { 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: 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 -"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 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: 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 +",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 +"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 +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 +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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -54167,313 +53694,101 @@ 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 -"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: 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; +",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 +"75 ""Driver - public PerformanceModel(String name, long queryID) +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; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); } - public Vector getConstraints() + + public String toString() { -return constraintVector; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public Vector getDrivers() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return driverVector; +return id; } - public String getName() + + /** +* Returns the name. +* @return String +*/ + 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 -"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: 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 -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 -"77 ""Model Driver - -String msg=""""""""; -public ModelDriver(String text) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -this. msg = text; -init(); +return valueFrom; } - public void init() + public double getValueTo() { -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 -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 -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: 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 -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 -"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 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +return valueTo; } - // 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 -"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. +* Sets the id. +* @param id The id to set */ - synchronized public void waitBegin() + public void setId(String id) { -try { - while ( !_ started ) { -wait(); +this. id = id; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + ** +* Sets the name. +* @param name The name to set */ - synchronized public void workerBegin() + public void setName(String name) { -_ activeThreads++; -_ started = true; -notify(); +this. name = name; } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. + ** +* Sets the value. +* @param value The value to set */ - synchronized public void workerEnd() + public void setValueFrom( double value) { -_ activeThreads--; -notify(); +this. valueFrom = valueFrom; } - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public void setValueTo( double value) { -_ activeThreads = 0; +this. valueTo = valueTo; }"" -",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 -"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 +",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: 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: 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 "95 ""Text Model private int CurrentEvent; @@ -54533,948 +53848,664 @@ if (HideMsg == true) 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: 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 -"78 ""Notification Event +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 +"64 ""DOORs Thread Pool -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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + //@param argsNo arguments are used. + public static void main(String args[]) { -// 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) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + 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 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 +"91 ""Modify Model +public ModifyModel(EBT em) +{ +super( em); + } -// 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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - //This method displays the contents of two array list to console -public void DisplayValues() +public StringBuffer GenerateEvent() { - 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 -"86 ""EB Shape +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + 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 +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 +"77 ""Model Driver +String msg=""""""""; -public EBShape( int xpos, int ypos, Color col) +public ModelDriver(String text) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. msg = text; +init(); } - public void Updaterequirement Info(String rno, String pname, String mname) + public void init() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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: 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 +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: 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 +"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 boolean match( int mx, int my) - { -return true; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public int GetX() - { -return x; - } +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public int GetY() +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -return y; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public Color GetC() + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -return c; - } +setVisible ( false); +dispose (); +} - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - 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 -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 -"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;/ +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: 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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - 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 +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -// 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 +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +public String GetSubscriberModule() { return SubscriberModule;} -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - // 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 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 - public void Dispatch +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public String getErrorMessage() + DOORsThread(ServerSocket ss) { - return errMsg; + theServer = ss; + count++; + taskNumber = count; } - public boolean Contains(String ContextString, String SearchString) + public void run() { -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 -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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + 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 +"69 ""Notification Event -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 -"64 ""DOORs Thread Pool +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 final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +public Object clone() throws CloneNotSupportedException { - 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 -"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(); +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + 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 boolean mouseDown( java. awt.Evente, int x, int y) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - return true; - } - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +if ( m_Eve - public void mouseClicked( java. awt. event.MouseEvente) +public void DisplayValues() { -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){} + 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: 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 +"66 ""Config Dialog -public void paint(Graphics g) {} +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +// 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 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(); +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); } -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 -"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 +// 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: 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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -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 Requirement() {// empty constructor +} - 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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - 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 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 +"86 ""EB Shape -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -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 -"49 ""Constraints Description +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -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 void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + public boolean match( int mx, int my) { +return true; + } - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + public int GetX() + { +return x; } - public String get Description () { - return this . description ; + public int GetY() + { +return y; } - public String get Logic () { - return this . logic ; + public Color GetC() +{ +return c; } - public String get Module Path () { - return this . module Path ; + public String GetReqno() + { +return requirement No; } - public String get Project Name () { - return this . project Name ; + public String GetProject() + { +return ProjectName; } - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } + 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 +"75 ""Driver - public String get Value () { - return this . value ; +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 void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; } - 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 ; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; } - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public double getValueTo() + { +return valueTo; } - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; } - 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 ; + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = 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 """" + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -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 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 +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 +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 +"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 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: 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 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,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"54 ""eventserver + 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 -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++) + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -p + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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: 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 -"90 ""Merge Model + } -public MergeModel(EBT em) +public Vector get Values From Data Base () { -super( em); - MinimumNoRects = 3; - } - + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + if ( server . is Connected () ) + { + Buffered R -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 -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 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 -"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 -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 -"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 -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: 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 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 -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: 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: 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 -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 -"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; + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -for( ; nextChar( ); result += ch ) + 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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; /** - * 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: 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 -"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 -"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() -{ -} +* 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. +*/ -public Object clone() throws CloneNotSupportedException + synchronized public void waitDone() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - 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 -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 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; /** -* The backlog of assignments, which are waiting -* for the thread pool. +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ -Collection assignments = new ArrayList(3); + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e /** -* 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 +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - pub + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } /** -* Get a new work assignment. -* -* @return A new assignment +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public synchronized Runnable getAssignment() + synchronized public void workerEnd() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +_ activeThreads--; +notify(); + } /** -* Called to block the current thread until -* the thread pool has no more work. +* Called to reset this object to +* its initial state. */ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + synchronized public void reset() { -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 -"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 -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 -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: 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 -"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 +_ 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 +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: 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 +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 +"private JPanel center Panel = null ; - 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 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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + public Speculate Gui () { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } + super ("" Speculate GUI ""); + container = get Content Pane (); -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + set Size ( 800 , 600 ); - if ( server . is Connected () ) - { - Buffered R + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + // Submit Listener - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -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 -"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;/ + send Query TO Server (); + } - 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 + if ( e . get Source () == fetch Button ) { -// 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 + + System . out . println ("" Fetch Button Pressed -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + void send Query TO Server () { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + String ip = this . event Server IP ; + int Port No = 1701 ; - // 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. + Socket socket ; + try { - public void Dispatch + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - public String getErrorMessage() + public void pull Value From DOORS () { - return errMsg; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + String [] attribute = { "" Value "", "" Attribute "" }; -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 + 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 "61 ""Worker Thread /** @@ -55513,673 +54544,659 @@ 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +",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 +"62 ""Call Back - // 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""""); +private Hash table requirementDescTable = new Hash table(); -addWindowListener( new WindowAdapter() -{ + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + private PerformanceModel performance model= null -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + public void parseSpeculateInformation(String str) { -Notification +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try +public void identifyPerformanceModels() { -Notification_Event nEvt1 = (Notificati - +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -/ 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++) +public void pullInformationFromDoors() { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -void DeleteRelatedEvents() +public void insertValuesInDataBase() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + public void createExecuteString() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +public void parseImpactReport(String str) + { - // 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 +Connection conn = null; +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -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: 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 -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +ConstraintsDescription constraint = null; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -/** - * 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; +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +public String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } - /** - * 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 -"95 ""Text Model + public String getFromAttribute() + { +return fromAttribute; + } -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + public String getModulePath() + { +return modulePath; + } -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 String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + public String getToAttribute() + { +return toAttribute; + } -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + public void setDescription(String description) + { +this. description = description; + } -public void drawModel() -{ -repaint(); -} + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -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 -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: 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 -"87 ""EBT + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + 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() + { -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -WorkArea. showText( sh); - } + 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 +"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 - public boolean mouseDown( java. awt.Evente, int x, int y) + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - return true; - } +this. id = id; +this. type = type; +this. - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +//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 - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} +//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 void mouseExited( java. awt. event.MouseEvente){} -public void mousePressed( java. awt. event.MouseEvente){} +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -public void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -public void paint(Graphics g) {} -public void update(Graphics g) {} + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } - public JSplitPane getSplitPane() -{ -return splitPane; -} + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -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()) + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -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: 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 -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 -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 -"87 ""EBT + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -public void mouseExited( java. awt. event.MouseEvente){} + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + /** +* 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 +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 +"91 ""Modify Model -public void update(Graphics g) {} +public ModifyModel(EBT em) +{ +super( em); + } - public JSplitPane getSplitPane() + + // Construct Visual model for Merge Event +public void BuildEvent() { -return splitPane; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -public void valueChanged(ListSelectionEvent e) +public StringBuffer GenerateEvent() { -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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() + protected void paintComponent(Graphics g) { -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 -"87 ""EBT - +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: 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: 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 +"60 ""Thread Pool -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +/** +* 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); -public EBT(Frame f) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -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) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -WorkArea. showText( sh); - } +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 - public boolean mouseDown( java. awt.Evente, int x, int y) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { - return true; - } - +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - 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()); + /** +* 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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} +// 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 -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; +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 +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 +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 +"49 ""Constraints Description -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()) +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -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; + 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 ; - 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; + public String get Description () { + return this . description ; } - - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String get Logic () { + return this . logic ; } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public String get Module Path () { + return this . module Path ; } + public String get Project Name () { + return this . project Name ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public String get Requirement ID () { + return this . requirement ID ; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void set Description ( String description ) { + this . description = description ; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Logic ( String logic ) { + this . logic = logic ; } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + 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 ; + } - /** -* 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 -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 -"64 ""DOORs Thread Pool + public void set Units ( String units ) { + this . units = units ; + } -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - //@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 -"69 ""Notification Event + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -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 String get Attribute () { + return this . attribute ; + } -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { - 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 + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +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 -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 +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: 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: 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: 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 "58 ""Subscribed Model private String SubscriberName; @@ -56205,630 +55222,719 @@ 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 -"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 -"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 +",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 +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 +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 +"52 ""Pair +private String queryID; + private String queryString; - 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(); + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -//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 String getQueryID() { +return this. queryID; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public String getQueryString() { +return this. queryString; } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); + public void setQueryString(String queryString) { +this. queryString = queryString; } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; +",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 +"70 ""Notification Processing - Connection conn; - ResultSet rs; - Statement stmt; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + // database and eventserver information + S - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + public Notification_Processing() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -} -public void sendImpactReportToEventServer(String text) +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +try -// run method will be execute from the main method when u say Thread. start() in main - public void run() +public static void main(String args[]) { -System. out. println(""""Inside Run method""""); -String str=""""""""; 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 - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -// 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 -"74 ""database +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log 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 + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +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()) { - Class. fo + 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: 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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; /** -* 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 +* 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. */ - public int get + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - /** -* 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 +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public void saveCurrentModel( int graphId) + synchronized public void waitBegin() { -conn = this. getConnect +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e /** -* 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 +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public void injectVa + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + /** -* 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) +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +_ activeThreads--; +notify(); + } -public void solveStructureEquation() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +_ 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 +"62 ""Call Back -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 +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -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 + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null - public Vector getImpactReport() + public void parseSpeculateInformation(String str) { -//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 -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 -"64 ""DOORs Thread Pool +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - //@param argsNo arguments are used. - public static void main(String args[]) +public void pullInformationFromDoors() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() { - 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: 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - EventServerThread(ServerSocket ss) + + public void createExecuteString() { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() + +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) { - while( true) +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 +"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() { - try +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +try -public String getNextID() +public static void main(String args[]) { try { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + 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 -public String searchDate() +// 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) { -String dateString = new String(); -Vector dateVector = new Vector(); try { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -public String searchQueryID(String date) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +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()) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public String getConstraintFromDataBase(String queryID) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -String ConstString = new String(); -try +if (! listModel. isEmpty()) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public String getDriverFromDataBase(String queryID) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -String driverString = new String(); +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; 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 -"53 ""Performance Model + 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 +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 +"50 ""Driver Description -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - private long queryID = 0; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public static int count = 0; - public PerformanceModel(String name, long queryID) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; } - public Vector getConstraints() + public String getDescription() { -return constraintVector; +return description; } - public Vector getDrivers() + public String getFromAttribute() { -return driverVector; +return fromAttribute; } - public String getName() + public String getModulePath() { -return name; +return modulePath; } - public void setName(String name) + public String getProjectName() { -this. name = name; +return projectName; } - public void addDriver(DriverDescription driver) + public String getRequirementID() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return requirementID; } - public void removeDriver(DriverDescription driver) + public String getToAttribute() { -this. driverVector. remove( driver); +return toAttribute; } - public boolean containsDriver(DriverDescription driver) + public void setChangedAttribute(String changedAttribute) { -return this. driverVector. contains( driver); +this. changedAttribute = changedAttribute; } - public void addConstraint(ConstraintsDescription constraint) + public void setDescription(String description) { -this. constraintVector. add( constraint); +this. description = description; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setFromAttribute(String fromAttribute) { -return this. constraintVector. contains( constraint); +this. fromAttribute = fromAttribute; } - public void removeConstraint(ConstraintsDescription constraint) + public void setModulePath(String modulePath) { -this. constraintVector. remove( constraint); +this. modulePath = modulePath; } - public DriverDescription getDriver(DriverDescription driver) + public void setProjectName(String projectName) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. projectName = projectName; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public void setRequirementID(String requirementID) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +this. requirementID = requirementID; + } - public long getQueryID() + public void setToAttribute(String toAttribute) { -return this. queryID; +this. toAttribute = toAttribute; } - public void setQueryID( long id) + public String createKey() { -this. queryID = id; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String toString() + 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() { -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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // 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) +public int hashCode() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try +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 +"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 void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -// 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 -{ + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - // 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: 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 -"91 ""Modify Model +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 +"89 ""Event Line -public ModifyModel(EBT em) -{ -super( em); - } +protected int top, left, right, bottom; - // Construct Visual model for Merge Event -public void BuildEvent() +public EventLine ( int t, int l, int r, int b) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; +top = t; +left = l; +right = r; +bottom = b; } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +public int GetT() { return top;} +public int GetL() { return left;} - 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 -"60 ""Thread Pool +public int GetR() { return right;} -/** -* 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); +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 +"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; + } -/** -* 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 + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int */ - pub + public String getId() + { +return id; + } /** -* Get a new work assignment. -* -* @return A new assignment +* Returns the name. +* @return String */ - public synchronized Runnable getAssignment() + public String getName() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +return name; + } /** -* Called to block the current thread until -* the thread pool has no more work. +* Returns the value. +* @return double */ - public void complete() + public double getValueFrom() { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +return valueFrom; + } + + + public double getValueTo() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +return valueTo; } -}"" -",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 -"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 + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -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 -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 -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 -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 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + 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 +"80 ""Requirement -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +public Requirement() {// empty constructor -public String GetSubscriberModule() { return SubscriberModule;} +} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -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 -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 -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 + + 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 "90 ""Merge Model @@ -56856,117 +55962,35 @@ 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 -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 -"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"""" - - +",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 +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 +"92 ""New Model - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try +public NewModel(EBT em) { - 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); +super( em); } - // 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()) + // Construct Visual model for Merge Event +public void BuildEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +public StringBuffer GenerateEvent() { - 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: 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 -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 +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: 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 +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 "86 ""EB Shape @@ -57032,334 +56056,46 @@ return ProjectName; { 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: 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: 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: 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 -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 -"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); +",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 +"94 ""Refine Model -addWindowListener( new WindowAdapter() +public RefineModel(EBT em) { - public void windowClosing(WindowEvent evt) - { -try - +super( em); + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + 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 +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 +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: 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 +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 +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 +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 +"53 ""Performance Model -// 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 String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; + public static int count = 0; - 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: 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: 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: 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: 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 -"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 -"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 -"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 -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 -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 -"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) + public PerformanceModel(String name, long queryID) { this. name = name; this. queryID = queryID; @@ -57458,257 +56194,343 @@ return """"performance modelName = """" + """"\ 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: 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 -"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 +",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 +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: 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: 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 +"67 ""Event Detail Dialog - 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 GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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 -public Vector get Values From Data Base () +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - if ( server . is Connected () ) - { - Buffered R +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - 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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -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 -"53 ""Performance Model +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 +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: 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 +"88 ""Event Model -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +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 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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() +public void getIP Server( String serverIP) { -return driverVector; +this. serverIP = serverIP; } - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + +public void drawModel() { +repaint(); } -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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - 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++) +public void Clicked ( int x, int y) { - dd = (DriverDescription) this. driverVector. get( i) +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + +public void CheckNotifyStatus() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { - cd = (ConstraintsDescription) this +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) + 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 { -this. queryID = id; +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - 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 -"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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 +"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: 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 +"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 result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -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 + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -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 + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - 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 + /** +* 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; + } - 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 + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + /** +* 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 +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: 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: 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 +"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 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 +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 "76 ""Evaluator private static final int EOL = 0; @@ -57833,8 +56655,86 @@ 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 -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 +",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: 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 +"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 +"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 +"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 +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 "73 ""Constraints String id; @@ -57926,222 +56826,177 @@ this. name = name; 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; - } +",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 +"82 ""Tokenizer - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +/** + * 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( ) ) +{ - public double getValueTo() - { -return valueTo; - } /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - ** -* 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 -"84 ""White Board Execution Graph + /** + * 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 -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +/** + * 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 ) { } +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * 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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +/** + * 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 -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 +/** + * 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 +"64 ""DOORs Thread Pool -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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + //@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 +"90 ""Merge Model - 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 -"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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ +public MergeModel(EBT em) + { super( em); + MinimumNoRects = 3; } -// Construct Visual model for Merge Event + // 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 +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent 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: 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 +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 +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 "58 ""Subscribed Model private String SubscriberName; @@ -58168,287 +57023,333 @@ 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: 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 -"61 ""Worker Thread +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 +"48 ""Constraint Inner Panel -/** -* True if this thread is currently processing. - */ -public boolean busy; +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 -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -/** - * 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 -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 -"51 ""Driver Inner Panel +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + if ( server . is Connected () ) + { + Buffered R - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -return panel; + +public JPanel get Panel () + { + 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 -"67 ""Event Detail Dialog +",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 +"76 ""Evaluator -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +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= -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +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 -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -private void okButtonActionPerformed (ActionEvent evt) +private static class Token { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 { -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); +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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +/** + * 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 -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 -"73 ""Constraints -String id; - String name; - double value; - String logic; +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +/** + * 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 - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +/* + * 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 /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + * 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. - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +/** + * 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. + */ - /** -* 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; - } +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 +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: 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 +"71 ""Requirement - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* 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 -"84 ""White Board Execution Graph + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +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 +"93 ""Obsolete Model +public ObsoleteModel(EBT em) +{ +super( em); + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +// 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +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: 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 +"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; -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 + 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 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 String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - 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 String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - 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 String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -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 -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 + 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 "82 ""Tokenizer @@ -58572,215 +57473,126 @@ 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 -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 -"75 ""Driver +",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 +"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 +"86 ""EB Shape -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; - } +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - /** -* Returns the id. -* @return int -*/ - public String getId() +public EBShape( int xpos, int ypos, Color col) { -return id; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - /** -* Returns the name. -* @return String -*/ - public String getName() + public void Updaterequirement Info(String rno, String pname, String mname) { -return name; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public boolean match( int mx, int my) { -return valueFrom; +return true; } - public double getValueTo() + public int GetX() { -return valueTo; +return x; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public int GetY() { -this. id = id; +return y; } + public Color GetC() +{ +return c; + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public String GetReqno() { -this. name = name; +return requirement No; } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public String GetProject() { -this. valueFrom = valueFrom; +return ProjectName; } - public void setValueTo( double value) + public String GetModule() { -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 -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 -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 -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 -"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; +return ModulePath; }"" -",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 -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 -"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 ) { - +",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 +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 +"78 ""Notification Event - System . out . println ("" Fetch Button Pressed +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(); +} - void send Query TO Server () +// 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 - 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 () + public void ParseEvent(String TextLine) { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - public static void main ( String [] args ) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - 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 -"64 ""DOORs Thread Pool +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -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 -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 + //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 "93 ""Obsolete Model public ObsoleteModel(EBT em) @@ -58805,378 +57617,179 @@ 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); - } +",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: 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 +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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -// 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 + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -public StringBuffer GenerateEvent() + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) +// 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 { - 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: 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: 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 -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: 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 -"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 () + // 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: 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 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: 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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; - super ("" Speculate GUI ""); - - container = get Content Pane (); + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - set Size ( 800 , 600 ); + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +addWindowListener( new WindowAdapter() +{ - // Submit Listener + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - send Query TO Server (); - } +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - if ( e . get Source () == fetch Button ) { +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - System . out . println ("" Fetch Button Pressed +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 send Query TO Server () +void DeleteRelatedEvents() { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - String ip = this . event Server IP ; - int Port No = 1701 ; + m_Deleterequirement List. remove(0); - Socket socket ; - try { - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +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 - public void pull Value From DOORS () + +void UpdateDisplayList() { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + // 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 - 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 -"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: 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 -"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 -"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 -"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 +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 "87 ""EBT @@ -59268,234 +57881,385 @@ 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 -"49 ""Constraints Description +",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 +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 +"86 ""EB Shape -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 ; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public EBShape( int xpos, int ypos, Color col) { - - 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 ; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - 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 Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; + public boolean match( int mx, int my) + { +return true; } - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public int GetX() + { +return x; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; + public int GetY() + { +return y; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + public Color GetC() +{ +return c; } - public String get Performance Model Name () { - return this . performance Model Name ; + public String GetReqno() + { +return requirement No; } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + public String GetProject() + { +return ProjectName; } - 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 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 +"74 ""database -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 +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 -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: 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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } /** -* Returns the id. -* @return int +* 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 String getId() - { -return id; - } + public int get /** -* Returns the name. -* @return String +* 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 String getName() + public void saveCurrentModel( int graphId) { -return name; - } +conn = this. getConnect - /** -* Returns the value. -* @return double +/** +* 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 double getValueFrom() - { -return valueFrom; - } - + public void injectVa - public double getValueTo() + /** +* 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) { -return valueTo; - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public void solveStructureEquation() { -this. id = id; - } +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public void getTrackVariableName() { -this. name = name; - } +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public void setCalculatedValues() { -this. valueFrom = valueFrom; - } +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 void setValueTo( double value) + public Vector getImpactReport() { -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 +//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 +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 +"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 +"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 "76 ""Evaluator private static final int EOL = 0; @@ -59620,501 +58384,215 @@ 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 -"50 ""Driver Description +",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 +"89 ""Event Line -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +protected int top, left, right, bottom; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { -this. projectName = projec +public int GetT() { return top;} -public String getChangedAttribute() - { -return changedAttribute; - } +public int GetL() { return left;} - public String getDescription() - { -return description; - } +public int GetR() { return right;} - public String getFromAttribute() - { -return fromAttribute; - } +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: 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: 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: 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: 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 +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 +"71 ""Requirement - public String getModulePath() - { -return modulePath; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public String getProjectName() - { -return projectName; - } +public Requirement() +{ +} - public String getRequirementID() +public Object clone() throws CloneNotSupportedException { -return requirementID; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String getToAttribute() + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -return toAttribute; - } +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public void setChangedAttribute(String changedAttribute) +public void ParseRequirement(String TextLine) { -this. changedAttribute = changedAttribute; - } + 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 +"70 ""Notification Processing - public void setDescription(String description) +// 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() { -this. description = description; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public void setFromAttribute(String fromAttribute) +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -this. fromAttribute = fromAttribute; - } +try - public void setModulePath(String modulePath) + +public static void main(String args[]) { -this. modulePath = modulePath; - } +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 - public void setProjectName(String projectName) + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -this. projectName = projectName; - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public void setRequirementID(String requirementID) + + + private void saveMenuItemActionPerformed (ActionEvent evt) { -this. requirementID = requirementID; - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public void setToAttribute(String toAttribute) + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -this. toAttribute = toAttribute; +exitApplication(); } - public String createKey() + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +openEventsMenuItemActionPerformed( evt); } - 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() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public int hashCode() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -int hashCode = 0; -if ( hashCode == 0) +if (! listModel. isEmpty()) { - 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 -"85 ""Decompose Model + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - // Construct Visual model for Merge Event -public void BuildEvent() +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - + 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 +"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 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,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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +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 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 -"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: 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 -"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 -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: 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 -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 -"52 ""Pair -private String queryID; - private String queryString; +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 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: 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 -"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 -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 -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 -"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: 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 -"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 -"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 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(){ @@ -60145,145 +58623,105 @@ 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 -"77 ""Model Driver +",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 +"71 ""Requirement -String msg=""""""""; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public ModelDriver(String text) +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException { -this. msg = text; -init(); +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void init() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -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 -"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 +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) +public void ParseRequirement(String TextLine) { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() -{ + 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 +"86 ""EB Shape - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try +public EBShape( int xpos, int ypos, Color col) { -Notification +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try + public void Updaterequirement Info(String rno, String pname, String mname) { -Notification_Event nEvt1 = (Notificati - +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -/ 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++) + public boolean match( int mx, int my) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +return true; + } -void DeleteRelatedEvents() + public int GetX() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +return x; + } -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + public int GetY() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req - +return y; + } -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) + public Color GetC() { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - +return c; + } - // 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 + public String GetReqno() + { +return requirement No; + } + public String GetProject() + { +return ProjectName; + } -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: 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 -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 -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: 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 + 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 "60 ""Thread Pool /** @@ -60352,215 +58790,242 @@ for ( int i=0; i< threads. length; i++) { 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 -"77 ""Model Driver +",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 +"52 ""Pair -String msg=""""""""; +private String queryID; + private String queryString; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + public Pair(String queryID, String queryString) { - 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 -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 -"66 ""Config Dialog +this. queryID = queryID; +this. queryString = queryString; -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + } + public String getQueryID() { +return this. queryID; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -// 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 + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -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 -"91 ""Modify Model + }"" +",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: 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 +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 +"76 ""Evaluator -public ModifyModel(EBT em) -{ -super( em); - } +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= - // Construct Visual model for Merge Event -public void BuildEvent() +private static class Precedence { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -public StringBuffer GenerateEvent() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - protected void paintComponent(Graphics g) +private static class Token { -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 -"60 ""Thread Pool +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; +} /** -* The threads in the pool. -*/ -protected Thread threads[] = null; + * 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 + /** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); + * 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 /** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + * Internal method that hides type-casting. + * Changed the method to support double */ -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 +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + * 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 /** -* 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: 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 -"79 ""performance model Handler + * 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. -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 +/** + * 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. + */ - performance model Handler(String msg) + +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 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -this. strES = msg; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void messageParser() + + public void updateEvent(String str, String ID) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -//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; +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +//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 - public void saveModel( int id) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -// save current model -database. saveCurrentModel( 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 insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - 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 + +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 "88 ""Event Model @@ -60676,442 +59141,152 @@ 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 -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 -"61 ""Worker Thread +",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: 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: 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 +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: 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 +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 +"53 ""Performance Model -/** -* True if this thread is currently processing. - */ -public boolean busy; +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + private long queryID = 0; + public static int count = 0; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + 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; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public Vector getDrivers() + { +return driverVector; + } -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 -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 -"63 ""Doors Thread + public String getName() + { +return name; + } -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public void setName(String name) + { +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - DOORsThread(ServerSocket ss) + public void removeDriver(DriverDescription driver) { - theServer = ss; - count++; - taskNumber = count; +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - public void run() + public void addConstraint(ConstraintsDescription constraint) { +this. constraintVector. add( constraint); + } - while( true) + public boolean containsConstraint(ConstraintsDescription constraint) { - try +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) { -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 -"58 ""Subscribed Model +this. constraintVector. remove( constraint); + } -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + cd = (ConstraintsDescription) this -public String GetSubscriberName() { return SubscriberName;} + public long getQueryID() + { +return this. queryID; + } -public String GetSubscriberReqno() { return SubscriberReqno;} + public void setQueryID( long id) + { +this. queryID = id; + } -public String GetSubscriberModule() { return SubscriberModule;} + 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 +"85 ""Decompose Model -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 -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: 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: 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 -"51 ""Driver Inner Panel +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } -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) { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 -"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 -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 -"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 -"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 -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 -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 -"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 -"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 -"60 ""Thread Pool +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 +"60 ""Thread Pool /** * The threads in the pool. @@ -61179,7 +59354,9 @@ for ( int i=0; i< threads. length; i++) { 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 +",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 +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: 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 "private JPanel center Panel = null ; private JLabel des Label = null ; @@ -61248,731 +59425,885 @@ done. waitDone(); 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 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + }",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: 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: 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 +"79 ""performance model Handler -public Requirement() -{ -} +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + performance model Handler(String msg) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +this. strES = msg; + } -public void ParseRequirement(String TextLine) + public void messageParser() { - 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 -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 -"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 -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: 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: 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 -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 -"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 +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +//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; -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + + public void saveModel( int id) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +// save current model +database. saveCurrentModel( id); + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + 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 +"64 ""DOORs Thread Pool -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -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: 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 -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: 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 -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 -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 -"91 ""Modify Model + //@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 +"84 ""White Board Execution Graph -public ModifyModel(EBT em) -{ -super( em); - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - 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 -"85 ""Decompose Model +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 DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +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 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: 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 -"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 -"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); + 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 -/** -* 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 + 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 - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - /** -* 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(); +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 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); } -}"" -",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 -"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() +// 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 Object clone() throws CloneNotSupportedException + +public StringBuffer GenerateEvent() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 +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: 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 +"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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +public String GetSubscriberName() { return SubscriberName;} -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: 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: 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 -"80 ""Requirement +public String GetSubscriberReqno() { return SubscriberReqno;} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public Requirement() {// empty constructor +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 +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 +"86 ""EB Shape -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - 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 EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - /** -* 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() + public boolean match( int mx, int my) { -try { - while ( _ activeThreads>0 ) { -wait(); +return true; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + + public int GetX() { -try { - while ( !_ started ) { -wait(); +return x; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public int GetY() { -_ activeThreads++; -_ started = true; -notify(); +return y; } + public Color GetC() +{ +return c; + } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String GetReqno() { -_ activeThreads--; -notify(); +return requirement No; + } + + public String GetProject() + { +return ProjectName; } - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public String GetModule() { -_ activeThreads = 0; +return ModulePath; }"" -",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 -"74 ""database +",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 +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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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 +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - /** - * 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 +// 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 (); +} - /** -* 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 +// 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 +"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 +"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. + */ - /** -* 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 +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} /** -* 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 + * 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; + /** -* 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 + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + /** + * 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 +"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 -public void getTrackVariableName() +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -public void setCalculatedValues() + public void ParseEvent(String TextLine) { -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 +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - public Vector getImpactReport() +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -//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 -"52 ""Pair +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -private String queryID; - private String queryString; - public Pair(String queryID, String queryString) { + //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 +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 +"82 ""Tokenizer -this. queryID = queryID; -this. queryString = queryString; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +/** + * 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( ) ) +{ - }"" -",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: 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 -"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: 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 -"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) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +return Character. isJavaIdentifierPart( ch ); +} - public void showText(EBShape sh) +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +String result = """""""" + ch; -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +for( ; nextChar( ); result += ch ) -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() + + /** + * 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( ) { -repaint(); +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +/** + * 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 -if (HideMsg == true) + +/** + * 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( ) { - 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 -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 -"64 ""DOORs Thread Pool +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 +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 +"77 ""Model Driver -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } - //@param argsNo arguments are used. - public static void main(String args[]) + public void init() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +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 +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 +"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) { - 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 -"92 ""New Model +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public NewModel(EBT em) + +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 +"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 +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 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + 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 -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 -"52 ""Pair +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 +"83 ""Variable -private String queryID; - private String queryString; +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 - public Pair(String queryID, String queryString) { + //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. -this. queryID = queryID; -this. queryString = queryString; - } +//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 - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; +//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; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; } - public void setQueryString(String queryString) { -this. queryString = queryString; + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - }"" -",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 -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 -"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 + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - // Speculate Gui - public Speculate Gui () - { + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - super ("" Speculate GUI ""); - container = get Content Pane (); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - // Submit Listener + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - send Query TO Server (); - } + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - if ( e . get Source () == fetch Button ) { + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - System . out . println ("" Fetch Button Pressed + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - void send Query TO Server () - { - String ip = this . event Server IP ; - int Port No = 1701 ; + /** +* 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 +"69 ""Notification Event - Socket socket ; - try { +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 - socket = new Socket ( ip , Port No ); +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +public Object clone() throws CloneNotSupportedException { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - 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 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 static void main ( String [] args ) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - 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 -"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 -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: 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 -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: 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 +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 +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 +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 +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 "78 ""Notification Event public String m_SubscriberName = """"""""; @@ -62023,103 +60354,151 @@ 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: 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 -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: 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 view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"87 ""EBT - +",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: 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 +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 +"80 ""Requirement -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +public Requirement() {// empty constructor +} - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public boolean mouseDown( java. awt.Evente, int x, int y) + 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 +"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: 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 +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 +"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) { - return true; - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public void mouseExited( java. awt. event.MouseEvente){} +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + public void createExecuteString() + { -public void mouseEntered( java. awt. event.MouseEvente){} +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public void paint(Graphics g) {} -public void update(Graphics g) {} +public void parseImpactReport(String str) + { - public JSplitPane getSplitPane() -{ -return splitPane; -} +Connection conn = null; +Statement stmt = null; -public void valueChanged(ListSelectionEvent e) +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 +"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() { -if ( e. getValueIsAdjusting()) -return; } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) +public Object clone() throws CloneNotSupportedException { -switch(EventList. getSelectedIndex()) +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -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 + 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 "87 ""EBT @@ -62211,7 +60590,132 @@ 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 +",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 +"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 "87 ""EBT @@ -62304,213 +60808,149 @@ 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 -"66 ""Config Dialog +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 +"56 ""Event Parser -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +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: -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + 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; -// 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 +//Check if a subscription exists + public boolean CheckSubscription(String str) + { -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -// 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 -"82 ""Tokenizer +//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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +//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 -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +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 +"83 ""Variable -/** - * 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( ) ) -{ +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. - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +//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 -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) +//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 - /** - * 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 +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -/** - * 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 ) { } -} + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -/** - * 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: 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 -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 -"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 logic. +* @return String +*/ + public String getLogic() + { +return logic; + } /** * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -62528,7 +60968,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -62552,849 +60993,815 @@ this. name = name; */ 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 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 -"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 + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -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 -"95 ""Text Model + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -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 + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -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(); -} + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -public void drawModel() -{ -repaint(); -} + /** +* 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: 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 +"48 ""Constraint Inner Panel -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +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 -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 -"47 ""Impact Report + 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 String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - private JPanel driver Inner Panel = null ; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +public Vector get Values From Data Base () { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - super ("""" Search Result GUI """"); + if ( server . is Connected () ) + { + Buffered R - container = get Content Pane (); - set Size ( 800 , 250 ); + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { - panel = new JPanel (); + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +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 +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 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public static void main ( String [] args ) + //@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 +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 +"84 ""White Board Execution Graph - Impact Report im = new Impact Report (); +//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 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 ) - { + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - pair Vector = new Vector (); - query String Combo . remove All Items (); +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 - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); +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++ - // Select Actions - public void action Performed ( Action Event e ) - { + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions + 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 void action Performed ( Action Event e ) { + 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 - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +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 +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 +"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 void impact Report ( String id ) - { +public String GetSubscriberName() { return SubscriberName;} - // super ("""" Impact Report """"); +public String GetSubscriberReqno() { return SubscriberReqno;} - container = get Content Pane (); +public String GetSubscriberModule() { return SubscriberModule;} - set Size ( 1020 , 740 ); +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - this . query ID = id ; +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 +"93 ""Obsolete Model - System . out . println ("""" Impact Report Constructor ..... ID """" + +public ObsoleteModel(EBT em) +{ +super( em); + } - public Vector get Constraint From Data Base () - { +// 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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +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: 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 +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 +"89 ""Event Line +protected int top, left, right, bottom; - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} +public int GetT() { return top;} - public Vector get Driver From Data Base () - { +public int GetL() { return left;} - Vector v = new Vector (); +public int GetR() { return right;} - Socket server ; - String line = new String (); +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 +"63 ""Doors Thread - try - { - server = new Socket ( server IP , 1701 ); +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - 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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } - //@param argsNo arguments are used. - public static void main(String args[]) + public void run() + { + + while( true) { -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 -"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 +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: 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 +"60 ""Thread Pool -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 +/** +* 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); - public void showText(EBShape sh) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - // 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() +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -repaint(); -} +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 -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -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 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,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; + /** +* 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 +"74 ""database - // database and eventserver information - S - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public static void main(String args[]) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { +System. out. println("""" in get Connection""""); +Connection connect=null; 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 + Class. fo -// 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"""" + /** +* 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 - private void saveMenuItemActionPerformed (ActionEvent evt) + /** +* 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) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - +conn = this. getConnect - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } +/** +* 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 - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + /** +* 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) { -openEventsMenuItemActionPerformed( evt); - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + +public void solveStructureEquation() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public void getTrackVariableName() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +public void setCalculatedValues() { -new AboutDialog ( this, true). show(); - } +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 -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + public Vector getImpactReport() { - "" -",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 -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 -"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 -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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +//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 +"53 ""Performance Model +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -public Requirement() {// empty constructor + private long queryID = 0; -} + public static int count = 0; -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + 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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - + public Vector getDrivers() + { +return driverVector; + } -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 -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 -"75 ""Driver + public String getName() + { +return name; + } -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + public void setName(String name) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; this. name = name; } - - public String toString() + public void addDriver(DriverDescription driver) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - /** -* Returns the id. -* @return int -*/ - public String getId() + public void removeDriver(DriverDescription driver) { -return id; +this. driverVector. remove( driver); } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public boolean containsDriver(DriverDescription driver) { -return name; +return this. driverVector. contains( driver); } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void addConstraint(ConstraintsDescription constraint) { -return valueFrom; +this. constraintVector. add( constraint); } - - public double getValueTo() + public boolean containsConstraint(ConstraintsDescription constraint) { -return valueTo; +return this. constraintVector. contains( constraint); } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void removeConstraint(ConstraintsDescription constraint) { -this. id = id; +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) - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. name = name; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void setQueryID( long id) { -this. valueFrom = valueFrom; +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 +"47 ""Impact Report - public void setValueTo( double value) +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 () { -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 -"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 + super ("""" Search Result GUI """"); -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 + container = get Content Pane (); - 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 + set Size ( 800 , 250 ); + panel = new JPanel (); -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + Impact Report im = new Impact Report (); } -public Vector get Values From Data Base () + public Vector search Date () { - Vector v = new Vector (); + + 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 ) + { - if ( server . is Connected () ) - { - Buffered R + pair Vector = new Vector (); + query String Combo . remove All Items (); - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + query String Combo . add Item ("""" Select Query String """"); - if ( impacted Value ! = null ) + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) { - double value 1 = Double . parse Double ( value ); - d + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -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: 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: 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 -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 -"60 ""Thread Pool + // Button Actions -/** -* 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); +public void action Performed ( Action Event e ) { -/** -* 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 + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - /** -* 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 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); - } + public void impact Report ( String id ) + { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + // super ("""" Impact Report """"); + container = get Content Pane (); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + set Size ( 1020 , 740 ); + this . query ID = id ; - 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: 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 -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 -"82 ""Tokenizer + System . out . println ("""" Impact Report Constructor ..... ID """" + -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + Socket server ; + String line = new String (); -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -/** - * 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( ) ) -{ + public Vector get Driver From Data Base () + { - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + Vector v = new Vector (); + Socket server ; + String line = new String (); -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + 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: 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 +"86 ""EB Shape -for( ; nextChar( ); result += ch ) +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - /** - * 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 +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/** - * 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 ) { } -} + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -/** - * 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 + public boolean match( int mx, int my) + { +return true; + } -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public int GetX() + { +return x; + } -private void skip + public int GetY() + { +return y; + } -/** - * 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( ) + public Color GetC() { -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 +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 "69 ""Notification Event public String m_SubscriberName = """"""""; @@ -63439,604 +61846,2169 @@ public void DisplayValues() 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 -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 -"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 +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 +"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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { + setTitle(""""EventsProcessor""""); -String sName, sReqno, sModule, sKey1, sKey2; -try +addWindowListener( new WindowAdapter() { - 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 void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public String getErrorMessage() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { - return errMsg; - } - - - public boolean Contains(String ContextString, String SearchString) +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -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 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 -"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 +Notification -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { - -this. projectName = projec - -public String getChangedAttribute() +if (! listModel. isEmpty()) +{ + int index =0; + try { -return changedAttribute; - } +Notification_Event nEvt1 = (Notificati - public String getDescription() - { -return description; - } - public String getFromAttribute() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -return fromAttribute; - } - - public String getModulePath() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -return modulePath; - } +N - public String getProjectName() +void DeleteEvent(String SubscriberName, String EventID) { -return projectName; - } - - public String getRequirementID() +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) { -return requirementID; - } +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) +void DeleteRelatedEvents() { -this. changedAttribute = changedAttribute; - } +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public void setDescription(String description) - { -this. description = description; - } + m_Deleterequirement List. remove(0); - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) +void AddSubscription(String SubscriberName, Requirement requirement ) { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { -this. requirementID = requirementID; - } +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() +void UpdateDisplayList() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - 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"""" + // 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 -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) + +private boolean Analyze_CheckSubscription(String str) { - 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 -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 -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 -"95 ""Text Model +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 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 +"54 ""eventserver -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; +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 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 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 +"51 ""Driver Inner Panel - public void showText(EBShape sh) +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 +"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 +"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 +"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: 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 +"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 +"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 +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 +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 +"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: 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 +"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 +"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: 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 +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: 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 +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 +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 +"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: 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 +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 +"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: 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 +"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: 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: 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: 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 +"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 +"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 +"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 +"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 +"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 +"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 +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 +"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 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void HideText() + + 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 +"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 { -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public void ShowInfo( int CE) + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); + 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 +"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 +"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 +"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: 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 +"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 +"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 +"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 +"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)); } -public void drawModel() -{ -repaint(); -} + +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: 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 +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: 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 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -protected void paintComponent(Graphics g) +public EBT(Frame f) { - super. paintComponent( g); +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -if (HideMsg == true) + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - 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 -"84 ""White Board Execution Graph +WorkArea. showText( sh); + } -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public void mouseExited( java. awt. event.MouseEvente){} -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 mousePressed( java. awt. event.MouseEvente){} -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 void mouseReleased( java. awt. event.MouseEvente){} -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 void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - 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 void update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} - 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 void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - 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 +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""""); -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -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 -"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; +public Requirement() {// empty constructor +} - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void run() - { + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - 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: 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 -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 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +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 +"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;/ - // database and eventserver information - S - public Notification_Processing() + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) +// finds the subscribers for this requirement + public void IdentifySubscribers() { -try +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 -public static void main(String args[]) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { + +String sName, sReqno, sModule, sKey1, sKey2; 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 + 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 -// 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"""" + public String getErrorMessage() + { + return errMsg; + } - private void saveMenuItemActionPerformed (ActionEvent evt) + public boolean Contains(String ContextString, String SearchString) { -try +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 +"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) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +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 - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -exitApplication(); - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -openEventsMenuItemActionPerformed( evt); +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 +"86 ""EB Shape - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public EBShape( int xpos, int ypos, Color col) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + public void Updaterequirement Info(String rno, String pname, String mname) { -new AboutDialog ( this, true). show(); +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } -void UpdateDisplayList() + public boolean match( int mx, int my) { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) +return true; + } + + + public int GetX() { - "" -",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: 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 -"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: 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 -"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 -"71 ""Requirement +return x; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() + public int GetY() + { +return y; + } + + public Color GetC() { -} +return c; + } -public Object clone() throws CloneNotSupportedException + public String GetReqno() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement No; } - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public String GetProject() { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +return ProjectName; + } -public void ParseRequirement(String TextLine) + + public String GetModule() { - 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 +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 +"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: 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 +"94 ""Refine Model -public NewModel(EBT em) +public RefineModel(EBT em) { super( em); } - // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = 3; } - 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 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 -"95 ""Text Model +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 +"61 ""Worker Thread -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +/** +* True if this thread is currently processing. + */ +public boolean busy; -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 +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - public void showText(EBShape sh) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +owner = o; +} -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi -public void ShowInfo( int CE) +/** + * Scan for and execute tasks. + */ +public void run() { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} +Runnable target = null; -public void drawModel() +do { -repaint(); -} +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 +"64 ""DOORs Thread Pool + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + //@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 +"63 ""Doors Thread -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 -"55 ""eventserver Threadstatic private int count = 0; +static 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) + + DOORsThread(ServerSocket ss) { theServer = ss; count++; taskNumber = count; - ep = new EventParser(); - } public void run() + } + + + public void run() { while( true) @@ -64045,500 +64017,384 @@ if (HideMsg == true) { Socket client = theServer. accept(); BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +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 +"86 ""EB Shape -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public String searchDate() +public EBShape( int xpos, int ypos, Color col) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -public String searchQueryID(String date) + public void Updaterequirement Info(String rno, String pname, String mname) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public String getConstraintFromDataBase(String queryID) + public boolean match( int mx, int my) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +return true; + } - public String getDriverFromDataBase(String queryID) + public int GetX() { -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 -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: 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 -"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 -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 -"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 +return x; + } - performance model Handler(String msg) + public int GetY() { -this. strES = msg; +return y; } - 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() + public Color GetC() { - 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; +return c; } - - public void saveModel( int id) + public String GetReqno() { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); +return requirement No; } - 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 -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 -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 -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 -"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 + public String GetProject() { -Notification_Event nEvt1 = (Notificati +return ProjectName; + } -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + public String GetModule() { -N +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 +"93 ""Obsolete Model -void DeleteEvent(String SubscriberName, String EventID) - { -try +public ObsoleteModel(EBT em) { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +super( em); + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +// Construct Visual model for Merge Event +public void BuildEvent() { - 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 + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -void UpdateDisplayList() +public StringBuffer GenerateEvent() { -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 +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 +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: 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 +"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 +"85 ""Decompose Model -private boolean Analyze_CheckSubscription(String str) +public DecomposeModel(EBT em) { -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 -"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= - +super( em); +MinimumNoRects = 3; + } -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[ ] + // Construct Visual model for Merge Event +public void BuildEvent() { + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 -private static class Token +public StringBuffer GenerateEvent() { -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 { - +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 +"65 ""About Dialog -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +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 +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -/** - * 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 + /** +* 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. +*/ -/** - * 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 + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException /** - * 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 +* 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 /** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -/** - * 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 + /** +* 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; -/* - * 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 + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - /** - * 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. +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -/** - * 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[]) + { +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"""" -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 -"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() + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { -} + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -public Object clone() throws CloneNotSupportedException + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +exitApplication(); } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +openEventsMenuItemActionPerformed( evt); + } -public void ParseRequirement(String TextLine) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { - 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 -"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 ) +if (! listModel. isEmpty()) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public Balance( Reader inStream ) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { -errors = 0; -tok = new Tokenizer( inStream ); -} + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -/** - * 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; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { -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 -"73 ""Constraints + 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 +"75 ""Driver String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ + 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; -this. value = value; -this. logic = logic; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - /** * Returns the id. * @return int */ - public String getId() { + public String getId() + { return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - /** * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double */ - public double getValue() { -return value; + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; } @@ -64546,225 +64402,434 @@ return value; * Sets the id. * @param id The id to set */ - public void setId(String id) { + 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) { + 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; + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; }"" -",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 -"64 ""DOORs Thread Pool +",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 +"66 ""Config Dialog -public final static int defaultPort = 2347; +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 +"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: 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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; ServerSocket theServer; - // static int numberOfThreads = 3; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - //@param argsNo arguments are used. - public static void main(String args[]) + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) { -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 -"50 ""Driver Description +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -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 String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -this. projectName = projec -public String getChangedAttribute() +public String searchQueryID(String date) { -return changedAttribute; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public String getDescription() + + public String getConstraintFromDataBase(String queryID) { -return description; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public String getFromAttribute() + + public String getDriverFromDataBase(String queryID) { -return fromAttribute; +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 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); } - public String getModulePath() + +// 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() { -return modulePath; - } +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 +"90 ""Merge Model - public String getProjectName() + +public MergeModel(EBT em) { -return projectName; +super( em); + MinimumNoRects = 3; } - public String getRequirementID() + + // 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 +"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) { -return requirementID; +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 +"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 getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) + public String toString() { -this. changedAttribute = changedAttribute; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public void setDescription(String description) + /** +* Returns the id. +* @return int +*/ + public String getId() { -this. description = description; +return id; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) + /** +* Returns the name. +* @return String +*/ + public String getName() { -this. modulePath = modulePath; +return name; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -this. requirementID = requirementID; +return valueFrom; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() + public double getValueTo() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +return valueTo; } - 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() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -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: 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: 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 -"54 ""eventserver +this. id = id; + } -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++) + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -p +this. name = name; + } -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 -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 -"94 ""Refine Model -public RefineModel(EBT em) -{ -super( em); + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - // 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: 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 + 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 "62 ""Call Back @@ -64840,364 +64905,448 @@ 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); - } +",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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -// Construct Visual model for Merge Event -public void BuildEvent() +public Requirement() { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve - +} -public StringBuffer GenerateEvent() +public Object clone() throws CloneNotSupportedException { -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 -"private JPanel center Panel = null ; +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public Speculate Gui () +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 +"74 ""database - super ("" Speculate GUI ""); - container = get Content Pane (); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - set Size ( 800 , 600 ); + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + /** + * 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 - // Submit Listener - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + /** +* 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 - send Query TO Server (); - } + /** +* 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 - if ( e . get Source () == fetch Button ) { +/** +* 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 - System . out . println ("" Fetch Button Pressed + /** +* 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 - void send Query TO Server () +public void solveStructureEquation() { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - socket = new Socket ( ip , Port No ); +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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +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 - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + 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: 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 +"95 ""Text Model - String project Name = this . proj Name Text . get +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 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 -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 -"94 ""Refine Model -public RefineModel(EBT em) + public void showText(EBShape sh) { -super( em); - } + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - // Construct Visual model for Merge Event -public void BuildEvent() +public void HideText() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -public StringBuffer GenerateEvent() +public void ShowInfo( int CE) { -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 -"67 ""Event Detail Dialog +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -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 void drawModel() +{ +repaint(); +} -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +protected void paintComponent(Graphics g) { + super. paintComponent( g); -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +if (HideMsg == true) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + 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 +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: 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 +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 +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 +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 +"74 ""database -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -setVisible ( false); -dispose (); -} + Class. fo -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + /** +* 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 -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 -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 -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 -"62 ""Call Back + /** +* 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 -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +/** +* 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 - private Hash table performanceModelTable = new Hash table(); + /** +* 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 - private PerformanceModel performance model= null + +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 parseSpeculateInformation(String str) +public void getTrackVariableName() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 +"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 void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +public int GetT() { return top;} +public int GetL() { return left;} -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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 +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 +"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 +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 +"54 ""eventserver -public void insertValuesInDataBase() +public static void (String args[]) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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: 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 +"90 ""Merge Model - public void createExecuteString() +public MergeModel(EBT em) { +super( em); + MinimumNoRects = 3; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -public void parseImpactReport(String str) - { -Connection conn = null; +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 +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 +"private JPanel center Panel = null ; -Statement stmt = 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 -Vector constraintsVector = null; -Vector driversVector = null; + // Speculate Gui -ConstraintsDescription constraint = null; + public Speculate Gui () + { -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 -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 -"73 ""Constraints + super ("" Speculate GUI ""); -String id; - String name; - double value; - String logic; + container = get Content Pane (); + set Size ( 800 , 600 ); - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + // Submit Listener + public void action Performed ( Action Event e ) { - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + if ( e . get Source () == submit Button ) { + send Query TO Server (); - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + } + if ( e . get Source () == fetch Button ) { - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + System . out . println ("" Fetch Button Pressed - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + void send Query TO Server () + { - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - /** -* 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 -"77 ""Model Driver + public void pull Value From DOORS () + { -String msg=""""""""; + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get - public void init() + public static void main ( String [] args ) { -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 -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 + 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 "88 ""Event Model @@ -65313,64 +65462,7 @@ 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: 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: 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 -"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 -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 +",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 "49 ""Constraints Description private String project Name = null ; @@ -65504,10 +65596,167 @@ public int hash Code () { 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: 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: 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 -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 +",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 +"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 +"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 +"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 +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: 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 +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: 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 +"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: 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 "56 ""Event Parser private Connection conn; @@ -65572,85 +65821,29 @@ 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 -"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 -"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 -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: 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 -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 -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 -"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++) +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 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) { -p +this. msg = text; +init(); + } -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 + + 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 +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 "56 ""Event Parser private Connection conn; @@ -65718,525 +65911,963 @@ 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: 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: 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 -"50 ""Driver Description +",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 +"86 ""EB Shape -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 +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +public EBShape( int xpos, int ypos, Color col) { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -this. projectName = projec -public String getChangedAttribute() + public void Updaterequirement Info(String rno, String pname, String mname) { -return changedAttribute; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public String getDescription() + + public boolean match( int mx, int my) { -return description; +return true; } - public String getFromAttribute() + + public int GetX() { -return fromAttribute; +return x; } - public String getModulePath() + + public int GetY() { -return modulePath; +return y; } - public String getProjectName() + public Color GetC() +{ +return c; + } + + public String GetReqno() { -return projectName; +return requirement No; } - public String getRequirementID() + public String GetProject() { -return requirementID; +return ProjectName; } - public String getToAttribute() + + public String GetModule() { -return toAttribute; +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 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); } - public void setChangedAttribute(String changedAttribute) + // 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 +"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. changedAttribute = changedAttribute; + 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 +"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 - public void setDescription(String description) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -this. description = description; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - public void setFromAttribute(String fromAttribute) + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -this. fromAttribute = fromAttribute; +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + /** +* 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 +"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 +"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 +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: 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 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 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 +"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() { -this. projectName = projectName; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public void setRequirementID(String requirementID) +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -this. requirementID = requirementID; - } +try - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() +public static void main(String args[]) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +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 - 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() + +// 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"""" -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" -public int hashCode() + private void saveMenuItemActionPerformed (ActionEvent evt) { -int hashCode = 0; -if ( hashCode == 0) +try { - 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 -"79 ""performance model Handler + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -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 + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } - performance model Handler(String msg) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. strES = msg; +openEventsMenuItemActionPerformed( evt); } - public void messageParser() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -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() +if (! listModel. isEmpty()) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public void saveModel( int id) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -// save current model -database. saveCurrentModel( id); +new AboutDialog ( this, true). show(); } - 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 -"71 ""Requirement +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 +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 +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 +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 +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 +"64 ""DOORs Thread Pool -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException + //@param argsNo arguments are used. + public static void main(String args[]) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 +"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; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + EventServerThread(ServerSocket ss) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { - 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 -"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. - */ + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -public Balance( Reader inStream ) +public String getNextID() + { +try { -errors = 0; -tok = new Tokenizer( inStream ); -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -if( opSym. token == '(' && clSym. token != ')' || - + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - /** - * 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 -"91 ""Modify Model -public ModifyModel(EBT em) + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -super( em); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - // Construct Visual model for Merge Event -public void BuildEvent() + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - + 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 +"60 ""Thread Pool -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +/** +* 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); - protected void paintComponent(Graphics g) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -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 -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 -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 -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 -"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 +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 - // Speculate Gui - public Speculate Gui () + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - 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 ) { + /** +* 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 +"62 ""Call Back - send Query TO Server (); - } +private Hash table requirementDescTable = new Hash table(); - if ( e . get Source () == fetch Button ) { + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - System . out . println ("" Fetch Button Pressed + private PerformanceModel performance model= null - void send Query TO Server () + public void parseSpeculateInformation(String str) { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - 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 () +public void identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - 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 void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public static void main ( String [] args ) +public void insertValuesInDataBase() { - 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 -"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 +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + public void createExecuteString() + { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public void parseImpactReport(String str) + { -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 +Connection conn = null; +Statement stmt = null; -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 +Vector constraintsVector = null; +Vector driversVector = null; -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ +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: 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 +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: 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 +"52 ""Pair - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +private String queryID; + private String queryString; - 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 Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - 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 String getQueryID() { +return this. queryID; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -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 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 -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 -"86 ""EB Shape + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + }"" +",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 +"75 ""Driver -public EBShape( int xpos, int ypos, Color col) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public void Updaterequirement Info(String rno, String pname, String mname) + public String toString() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; } - public boolean match( int mx, int my) + /** +* Returns the name. +* @return String +*/ + public String getName() { -return true; +return name; } - public int GetX() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return x; +return valueFrom; } - public int GetY() + public double getValueTo() { -return y; +return valueTo; } - public Color GetC() -{ -return c; + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; } - public String GetReqno() + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -return requirement No; +this. name = name; } - public String GetProject() + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -return ProjectName; +this. valueFrom = valueFrom; } - public String GetModule() + public void setValueTo( double value) { -return ModulePath; +this. valueTo = valueTo; }"" -",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 +",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 "47 ""Impact Report private String server IP = """" local host """"; @@ -66375,348 +67006,134 @@ public void action Performed ( Action Event e ) { 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 -"88 ""Event Model - +",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: 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 +"76 ""Evaluator -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); +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= - public EventModel(EBT e) +private static class Precedence { -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 int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - public void ClearVectors() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - -public void drawModel() -{ -repaint(); -} +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public void drawModel(EBShape sh) +private static class Token { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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 { -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } +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 -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 - +/** + * 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 void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +/** + * 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 - protected void BuildEvent(){} +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } -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: 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 -"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: 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 -"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; - +/** + * 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 -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +/* + * 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 - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } + /** + * 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. - 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: 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 -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 -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 -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: 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 -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 -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 -"94 ""Refine Model +/** + * 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 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 -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 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: 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: 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 +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 +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 "56 ""Event Parser private Connection conn; @@ -66784,162 +67201,318 @@ 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 -"47 ""Impact Report +",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 +"52 ""Pair -private String server IP = """" local host """"; - private JPanel center Panel = null ; +private String queryID; + private String queryString; - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + public Pair(String queryID, String queryString) { - private JPanel impact Panel = null ; - private JPanel impact Inner P +this. queryID = queryID; +this. queryString = queryString; - public Impact Report () - { + } - super ("""" Search Result GUI """"); + public String getQueryID() { +return this. queryID; + } - container = get Content Pane (); + public String getQueryString() { +return this. queryString; + } - set Size ( 800 , 250 ); + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - panel = new JPanel (); + public void setQueryString(String queryString) { +this. queryString = queryString; + } - panel . set Layout ( null ); + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - this . server IP = - JOption Pane - . show In + }"" +",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 +"94 ""Refine Model - public static void main ( String [] args ) - { +public RefineModel(EBT em) +{ +super( em); + } - Impact Report im = new Impact Report (); + // 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 +"82 ""Tokenizer - public Vector search Date () - { +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - 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 ) - { +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - pair Vector = new Vector (); - query String Combo . remove All Items (); +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); +/** + * 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( ) ) +{ - // Select Actions - public void action Performed ( Action Event e ) - { + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + /** + * 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 - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +/** + * 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 - public void impact Report ( String id ) - { - // super ("""" Impact Report """"); +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - container = get Content Pane (); +private void skip - set Size ( 1020 , 740 ); - this . query ID = id ; +/** + * 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: 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 +"82 ""Tokenizer - System . out . println ("""" Impact Report Constructor ..... ID """" + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public Vector get Constraint From Data Base () - { - Vector v = new Vector (); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - Socket server ; - String line = new String (); +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +/** + * 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( ) ) +{ - public Vector get Driver From Data Base () - { + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - Vector v = new Vector (); - Socket server ; - String line = new String (); +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - try - { - server = new Socket ( server IP , 1701 ); +for( ; nextChar( ); result += ch ) - 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 -"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 + /** + * 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 "53 ""Performance Model private String name = null; @@ -67049,258 +67622,209 @@ return """"performance modelName = """" + """"\ 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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: 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: 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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - /** -* 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. -*/ + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - synchronized public void waitDone() + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -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() + while( true) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() +public String getNextID() { -_ activeThreads++; -_ started = true; -notify(); - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() +public String searchDate() { -_ activeThreads--; -notify(); - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +public String searchQueryID(String date) { -_ 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 -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 -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 -"58 ""Subscribed Model +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: 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 +"89 ""Event Line + +protected int top, left, right, bottom; -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) +public EventLine ( int t, int l, int r, int b) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +top = t; +left = l; +right = r; +bottom = b; +} -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +public int GetT() { return top;} -public String GetSubscriberModule() { return SubscriberModule;} +public int GetL() { return left;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public int GetR() { return right;} -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: 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 -"76 ""Evaluator +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 +"private JPanel center Panel = null ; -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 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 -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 Speculate Gui () + { -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ + super ("" Speculate GUI ""); -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + container = get Content Pane (); + set Size ( 800 , 600 ); -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 { + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + // Submit Listener -/** - * 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 + public void action Performed ( Action Event e ) { -/** - * 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 + if ( e . get Source () == submit Button ) { -/** - * 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 + send Query TO Server (); + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + if ( e . get Source () == fetch Button ) { - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + System . out . println ("" Fetch Button Pressed -/** - * 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 + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; -/* - * 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 + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - /** - * 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. + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -/** - * 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. - */ + 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 ) { -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 -"89 ""Event Line -protected int top, left, right, bottom; + 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 +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: 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 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } -public EventLine ( int t, int l, int r, int b) + // Construct Visual model for Merge Event +public void BuildEvent() { -top = t; -left = l; -right = r; -bottom = b; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -public int GetT() { return top;} - -public int GetL() { return left;} +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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: 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 -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 -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 + 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 "80 ""Requirement public String m_RequirementID =""""""""; @@ -67331,47 +67855,8 @@ public void ParseRequirement(String TextLine) { 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 -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 -"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 +",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 +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 "49 ""Constraints Description private String project Name = null ; @@ -67505,1480 +67990,1309 @@ public int hash Code () { 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 -"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 -"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 - +",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 +"50 ""Driver Description - /** -* 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 +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 -/** -* 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) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +this. projectName = projec -public void solveStructureEquation() +public String getChangedAttribute() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - +return changedAttribute; + } -public void getTrackVariableName() + public String getDescription() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - +return description; + } -public void setCalculatedValues() + public String getFromAttribute() { -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 - +return fromAttribute; + } - public Vector getImpactReport() + public String getModulePath() { -//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 -"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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; +return modulePath; + } - public PerformanceModel(String name, long queryID) + public String getProjectName() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +return projectName; } - public Vector getConstraints() + public String getRequirementID() { -return constraintVector; +return requirementID; } - public Vector getDrivers() + public String getToAttribute() { -return driverVector; +return toAttribute; } - public String getName() + public void setChangedAttribute(String changedAttribute) { -return name; +this. changedAttribute = changedAttribute; } - public void setName(String name) + public void setDescription(String description) { -this. name = name; +this. description = description; } - public void addDriver(DriverDescription driver) + public void setFromAttribute(String fromAttribute) { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +this. fromAttribute = fromAttribute; } - public void removeDriver(DriverDescription driver) + public void setModulePath(String modulePath) { -this. driverVector. remove( driver); +this. modulePath = modulePath; } - public boolean containsDriver(DriverDescription driver) + public void setProjectName(String projectName) { -return this. driverVector. contains( driver); +this. projectName = projectName; } - public void addConstraint(ConstraintsDescription constraint) + public void setRequirementID(String requirementID) { -this. constraintVector. add( constraint); +this. requirementID = requirementID; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setToAttribute(String toAttribute) { -return this. constraintVector. contains( constraint); +this. toAttribute = toAttribute; } - public void removeConstraint(ConstraintsDescription constraint) + public String createKey() { -this. constraintVector. remove( constraint); +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public DriverDescription getDriver(DriverDescription driver) + 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() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +int hashCode = 0; +if ( hashCode == 0) { - cd = (ConstraintsDescription) this + 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: 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 +"95 ""Text Model - public long getQueryID() - { -return this. queryID; - } +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - public void setQueryID( long id) - { -this. queryID = id; - } +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 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 -"92 ""New Model -public NewModel(EBT em) + public void showText(EBShape sh) { -super( em); - } + // 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(); +} - // Construct Visual model for Merge Event -public void BuildEvent() +public void drawModel() { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +repaint(); } -public StringBuffer GenerateEvent() +protected void paintComponent(Graphics g) { -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 -"64 ""DOORs Thread Pool + super. paintComponent( g); -public final static int defaultPort = 2347; +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; ServerSocket theServer; - // static int numberOfThreads = 3; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - //@param argsNo arguments are used. - public static void main(String args[]) + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) { -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 -"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 -"77 ""Model Driver +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -String msg=""""""""; -public ModelDriver(String text) +public String getNextID() { -this. msg = text; -init(); - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void init() +public String searchDate() { -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 -"75 ""Driver +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + +public String searchQueryID(String date) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public String toString() + public String getConstraintFromDataBase(String queryID) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - /** -* Returns the id. -* @return int -*/ - public String getId() + + public String getDriverFromDataBase(String queryID) { -return id; - } +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 +"88 ""Event Model - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +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); - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public double getValueTo() +public void getIP Server( String serverIP) { -return valueTo; +this. serverIP = serverIP; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +public void drawModel() +{ +repaint(); +} - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - 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 -"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 -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 -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 -"56 ""Event Parser +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public void Clicked ( int x, int y) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - public void updateEvent(String str, String ID) +public void CheckNotifyStatus() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + protected void BuildEvent(){} -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +Even -//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 String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -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 -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 -"81 ""subscribermanager + 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 +"79 ""performance model Handler -Socket aSocket; - int ID; - String EventLog; +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - Connection conn; - ResultSet rs; - Statement stmt; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - // 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) + performance model Handler(String msg) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - +this. strES = msg; + } -} -public void sendImpactReportToEventServer(String text) + public void messageParser() { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -// 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 +//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; + } - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public void saveModel( int id) { -// 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: 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +// save current model +database. saveCurrentModel( id); + } - 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() - { + 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: 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 +"64 ""DOORs Thread Pool - while( true) +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 { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + 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 +"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 String getNextID() + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -public String searchDate() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +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 -public String searchQueryID(String date) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -Vector queryVector = new Vector(); -String searchQuery = new String(); + +String sName, sReqno, sModule, sKey1, sKey2; try { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + 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 String getConstraintFromDataBase(String queryID) + public void Dispatch + + + public String getErrorMessage() { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + return errMsg; + } - public String getDriverFromDataBase(String queryID) + public boolean Contains(String ContextString, String SearchString) { -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 -"85 ""Decompose Model +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 +"47 ""Impact Report -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P + public Impact Report () + { -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 -"82 ""Tokenizer + super ("""" Search Result GUI """"); + container = get Content Pane (); -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + set Size ( 800 , 250 ); + panel = new JPanel (); -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public static void main ( String [] args ) + { -/** - * 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( ) ) -{ + Impact Report im = new Impact Report (); + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { -for( ; nextChar( ); result += ch ) + pair Vector = new Vector (); + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - /** - * 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 + Socket server ; + String line = new String (); -/** - * 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 ) { } -} + // Select Actions + public void action Performed ( Action Event 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 + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -/** - * 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 +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -/** - * 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 -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 -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 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: 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 -"48 ""Constraint Inner Panel + for ( int i = 0 ; i < pair Vector . size (); i ++) { -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 + Pair pair = ( Pair ) pair Vector . get ( i ); - 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 + if ( pair + . get -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + + public void impact Report ( String id ) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } + // super ("""" Impact Report """"); + container = get Content Pane (); -public Vector get Values From Data Base () + 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 R + Buffered - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + + public Vector get Driver From Data Base () { - if ( impacted Value ! = null ) + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try { - double value 1 = Double . parse Double ( value ); - d + 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 +"64 ""DOORs Thread Pool -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - /** -* 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() + //@param argsNo arguments are used. + public static void main(String args[]) { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +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 +"47 ""Impact Report -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() +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 () { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e + super ("""" Search Result GUI """"); -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + 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 ) { -_ activeThreads++; -_ started = true; -notify(); + + Impact Report im = new Impact Report (); + } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public Vector search Date () { -_ activeThreads--; -notify(); - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -_ 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: 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 -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 -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 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: 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 -"88 ""Event Model + pair Vector = new Vector (); -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); + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + Socket server ; + String line = new String (); -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + // Select Actions + public void action Performed ( Action Event e ) + { - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -public void drawModel() -{ -repaint(); -} +public void action Performed ( Action Event e ) { -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + 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 -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; -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 + System . out . println ("""" Impact Report Constructor ..... ID """" + -public void CheckNotifyStatus() + public Vector get Constraint From Data Base () { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + Vector v = new Vector (); - protected void BuildEvent(){} + Socket server ; + String line = new String (); - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -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 Vector get Driver From Data Base () + { + Vector v = new Vector (); - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - 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 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 -"65 ""About Dialog + 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 +"83 ""Variable -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 -"53 ""Performance Model +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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; + //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. - public static int count = 0; - public PerformanceModel(String name, long queryID) +//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. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +this. value = value; +this - public Vector getConstraints() + +//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() { -return constraintVector; +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; } - public Vector getDrivers() + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -return driverVector; +return logic; } - public String getName() + + /** +* Returns the name. +* @return String +*/ + public String getName() { return name; } - public void setName(String name) - { -this. name = name; + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - 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 + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - public long getQueryID() - { -return this. queryID; + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public void setQueryID( long id) - { -this. queryID = id; + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - 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: 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 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + /** +* 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 +"63 ""Doors Thread - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - performance model Handler(String msg) + DOORsThread(ServerSocket ss) { -this. strES = msg; + theServer = ss; + count++; + taskNumber = count; } - public void messageParser() + + public void run() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + 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 +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: 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 +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 +"87 ""EBT -//Re-execut -public String generateReport() + +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) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public void saveModel( int id) + public boolean mouseDown( java. awt.Evente, int x, int y) { -// save current model -database. saveCurrentModel( id); + return true; } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - 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 -"51 ""Driver Inner Panel + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -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) { +public void mouseExited( java. awt. event.MouseEvente){} -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void mousePressed( java. awt. event.MouseEvente){} -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 -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 -"70 ""Notification Processing +public void mouseReleased( java. awt. event.MouseEvente){} -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +public void mouseEntered( java. awt. event.MouseEvente){} - // database and eventserver information - S +public void paint(Graphics g) {} - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +public void update(Graphics g) {} -addWindowListener( new WindowAdapter() + public JSplitPane getSplitPane() { - public void windowClosing(WindowEvent evt) - { -try +return splitPane; +} -public static void main(String args[]) +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -try +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) { - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) { -try +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + 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) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +this. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; + } - private void saveMenuItemActionPerformed (ActionEvent evt) + public String getDescription() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + public String getToAttribute() { -exitApplication(); +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public void setDescription(String description) { -openEventsMenuItemActionPerformed( evt); +this. description = description; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + public void setFromAttribute(String fromAttribute) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + public void setProjectName(String projectName) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + public void setToAttribute(String toAttribute) { -new AboutDialog ( this, true). show(); +this. toAttribute = toAttribute; } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -void UpdateDisplayList() + public boolean equals(Object o) { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() { - "" -",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 -"73 ""Constraints - -String id; - String name; - double value; - String logic; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +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 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 +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 +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 +"56 ""Event Parser - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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: - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + 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; - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +//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 - /** -* 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; - } +//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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - /** -* 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: 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 +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 "94 ""Refine Model public RefineModel(EBT em) @@ -69000,285 +69314,259 @@ 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: 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: 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 -"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 ); - - } - +",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 +"49 ""Constraints Description -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - if ( server . is Connected () ) - { - Buffered R + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -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: 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 -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: 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,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 + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - performance model Handler(String msg) - { -this. strES = msg; + public String get Module Path () { + return this . module Path ; } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + public String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } -//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 String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); + 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 insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } - 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 -"69 ""Notification Event + public void set Units ( String units ) { + this . units = units ; + } -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 void set Value ( String units ) { + this . value = units ; + } -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - 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 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 void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + public String to String () { -if ( m_Eve + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -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 -"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); +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 -/** -* 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 +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 +"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; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - /** -* 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: 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 -"91 ""Modify Model +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public ModifyModel(EBT em) +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 +"94 ""Refine Model + +public RefineModel(EBT em) { super( em); } - // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 4; +CurrentEvent = 3; } - public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 +"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""""; - 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 -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 -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 -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 -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 -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 +",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 +"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 "84 ""White Board Execution Graph //Driver data members @@ -69351,125 +69639,128 @@ 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 -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 -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 -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: 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 -"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; - +",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 +"69 ""Notification Event - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +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 void run() - { - while( true) - { - try +public Object clone() throws CloneNotSupportedException { -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 -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 -"62 ""Call Back - +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + 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 - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - 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 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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; -public void identifyPerformanceModels() + //EventParser Constructor + // initializes the Database connection + public EventParser() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void pullInformationFromDoors() + public void updateEvent(String str, String ID) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public void insertValuesInDataBase() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public void createExecuteString() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public void parseImpactReport(String str) +//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 -Connection conn = null; - -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -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 -"90 ""Merge Model +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 +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: 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 +"85 ""Decompose Model -public MergeModel(EBT em) - { +public DecomposeModel(EBT em) +{ super( em); - MinimumNoRects = 3; +MinimumNoRects = 3; } @@ -69477,189 +69768,223 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +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 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 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +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 +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 +"67 ""Event Detail Dialog - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +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 Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +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_ - public String get Description () { - return this . description ; - } - public String get Logic () { - return this . logic ; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +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 +"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 String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + 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 - public void set Logic ( String logic ) { - this . logic = logic ; - } +// 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 - 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 ; - } +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - public void set Units ( String units ) { - this . units = units ; - } + // 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 set Value ( String units ) { - this . value = units ; - } + public void Dispatch - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public String getErrorMessage() + { + return errMsg; } - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - public String get Performance Model Name () { - return this . performance Model Name ; - } +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: 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 +"94 ""Refine Model - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; +public RefineModel(EBT em) +{ +super( em); } - 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 - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -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 -"66 ""Config Dialog +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 +"60 ""Thread Pool -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +/** +* 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); -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +/** +* 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 -// 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 + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); + /** +* 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: 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: 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 +"91 ""Modify Model -// 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 -"92 ""New Model - -public NewModel(EBT em) +public ModifyModel(EBT em) { super( em); } @@ -69668,687 +69993,581 @@ super( em); // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = 4; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); +thisEvent. append(""""Modify|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 -"private JPanel center Panel = null ; + ebs = (EBShape)EventShapes - 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 + 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 +"47 ""Impact Report - public Speculate Gui () - { +private String server IP = """" local host """"; + private JPanel center Panel = null ; - super ("" Speculate GUI ""); + private JPanel driver Panel = new JPanel (); - container = get Content Pane (); + private JPanel driver Inner Panel = null ; - set Size ( 800 , 600 ); + private JPanel impact Panel = null ; + private JPanel impact Inner P - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public Impact Report () + { + super ("""" Search Result GUI """"); - // Submit Listener + container = get Content Pane (); - public void action Performed ( Action Event e ) { + set Size ( 800 , 250 ); - if ( e . get Source () == submit Button ) { + panel = new JPanel (); - send Query TO Server (); + panel . set Layout ( null ); - } + this . server IP = + JOption Pane + . show In - if ( e . get Source () == fetch Button ) { + public static void main ( String [] args ) + { - System . out . println ("" Fetch Button Pressed + Impact Report im = new Impact Report (); + } - void send Query TO Server () - { - String ip = this . event Server IP ; - int Port No = 1701 ; + public Vector search Date () + { - Socket socket ; - try { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - socket = new Socket ( ip , Port No ); + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { - Output Stream os = socket . get Output Stream (); - Output Stream + pair Vector = new Vector (); - public void pull Value From DOORS () - { + query String Combo . remove All Items (); - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + query String Combo . add Item ("""" Select Query String """"); - String [] attribute = { "" Value "", "" Attribute "" }; + Socket server ; + String line = new String (); - String project Name = this . proj Name Text . get + // Select Actions - 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 -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 -"70 ""Notification Processing + public void action Performed ( Action Event e ) + { -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } - // database and eventserver information - S + // Button Actions - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -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 + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -// 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"""" + if ( pair + . get - private void saveMenuItemActionPerformed (ActionEvent evt) + public void impact Report ( String id ) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + // super ("""" Impact Report """"); - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } + container = get Content Pane (); + set Size ( 1020 , 740 ); - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); - } + this . query ID = id ; - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + System . out . println ("""" Impact Report Constructor ..... ID """" + - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + public Vector get Constraint From Data Base () { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + Vector v = new Vector (); -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } + Socket server ; + String line = new String (); -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 -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 -"49 ""Constraints Description + try + { + server = new Socket ( server IP , 1701 ); -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + if ( server . is Connected () ) + { + Buffered - 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 ) + public Vector get Driver From Data Base () { - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } + Vector v = new Vector (); + Socket server ; + String line = new String (); - public String get Description () { - return this . description ; - } + try + { + server = new Socket ( server IP , 1701 ); - public String get Logic () { - return this . logic ; - } + 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 +"53 ""Performance Model - public String get Module Path () { - return this . module Path ; - } +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - public String get Project Name () { - return this . project Name ; - } + private long queryID = 0; - public String get Requirement ID () { - return this . requirement ID ; - } + public static int count = 0; - public String get Units () { - return this . units ; + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String get Value () { - return this . value ; + public Vector getConstraints() + { +return constraintVector; } - public void set Description ( String description ) { - this . description = description ; + public Vector getDrivers() + { +return driverVector; } - public void set Logic ( String logic ) { - this . logic = logic ; + public String getName() + { +return name; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public void setName(String name) + { +this. name = name; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); } - public void set Units ( String units ) { - this . units = units ; + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); } - public void set Value ( String units ) { - this . value = units ; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); } - public String get Attribute () { - return this . attribute ; - } + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public String get Performance Model Name () { - return this . performance Model Name ; + public long getQueryID() + { +return this. queryID; } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + public void setQueryID( long id) + { +this. queryID = id; } - 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: 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 -"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: 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 -"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) + public String toString() { -this. id = id; -this. type = type; -this. +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 +"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 -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ -//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 void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -public String toString() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - /** -* Returns the id. -* @return int -*/ - public String getId() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -return id; - } +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - /** -* Returns the logic. -* @return String -*/ - public String getLogic() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -return logic; - } - +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - /** -* Returns the name. -* @return String -*/ - public String getName() +void DeleteEvent(String SubscriberName, String EventID) { -return name; - } +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); - /** -* 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; - } +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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } + // 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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 +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 +"67 ""Event Detail Dialog - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +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 - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - /** -* 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 -"62 ""Call Back +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +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 +"88 ""Event Model - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +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 void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + 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 identifyPerformanceModels() +public void getIP Server( String serverIP) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. serverIP = serverIP; + } -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +public void drawModel() +{ +repaint(); +} +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -public void parseImpactReport(String str) - { +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 -Connection conn = null; -Statement stmt = null; +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 ((((( -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + protected void BuildEvent(){} -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 -"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; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } - - /** -* Returns the id. -* @return int -*/ - public String getId() + else { -return id; - } +Even - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public double getValueTo() - { -return valueTo; - } + 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 +"89 ""Event Line +protected int top, left, right, bottom; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +public int GetT() { return top;} - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } +public int GetL() { return left;} +public int GetR() { return right;} - 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 -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 -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: 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 +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 +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 "76 ""Evaluator private static final int EOL = 0; @@ -70473,54 +70692,50 @@ 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 -"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;} +",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 +"83 ""Variable -public String GetSubscriberReqno() { return SubscriberReqno;} +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 -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + //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. -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 -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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; +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() + +public String toString() { String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + /** * Returns the id. @@ -70532,6 +70747,16 @@ return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + /** * Returns the name. * @return String @@ -70546,15 +70771,8 @@ return name; * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -70562,38 +70780,217 @@ return valueTo; * Sets the id. * @param id The id to set */ - public void setId(String id) - { + 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) - { + public void setName(String name) { this. name = name; } - ** + /** * Sets the value. * @param value The value to set */ - public void setValueFrom( double value) + 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 +"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 +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 +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: 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: 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 +"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. valueFrom = valueFrom; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } + public Vector getConstraints() + { +return constraintVector; + } - public void setValueTo( double value) + public Vector getDrivers() { -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: 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 +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: 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 +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 "63 ""Doors Thread static private int count = 0; @@ -70623,7 +71020,193 @@ static private int count = 0; 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 +",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: 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 +"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 +"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 +"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 "81 ""subscribermanager Socket aSocket; @@ -70637,44 +71220,161 @@ Socket aSocket; // 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) + // 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 +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 +"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() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +_ activeThreads++; +_ started = true; +notify(); + } -} -public void sendImpactReportToEventServer(String text) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +_ activeThreads--; +notify(); + } -// run method will be execute from the main method when u say Thread. start() in main - public void run() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +_ 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 subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,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) { - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +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 +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 +"54 ""eventserver + +public static void (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 +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 +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: 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 "53 ""Performance Model private String name = null; @@ -70784,169 +71484,402 @@ return """"performance modelName = """" + """"\ 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 -"63 ""Doors Thread +",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: 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: 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 +"50 ""Driver Description -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 - DOORsThread(ServerSocket ss) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { - theServer = ss; - count++; - taskNumber = count; - } +this. projectName = projec - public void run() +public String getChangedAttribute() { +return changedAttribute; + } - while( true) + public String getDescription() { - try +return description; + } + + public String getFromAttribute() { -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 -"86 ""EB Shape +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } -public EBShape( int xpos, int ypos, Color col) + public String getToAttribute() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - public void Updaterequirement Info(String rno, String pname, String mname) + public void setDescription(String description) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +this. description = description; } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } - public boolean match( int mx, int my) + public void setModulePath(String modulePath) { -return true; +this. modulePath = modulePath; } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - public int GetX() + public void setRequirementID(String requirementID) { -return x; +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - public int GetY() + public String createKey() { -return y; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public Color GetC() + 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) { -return c; - } + 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 +"56 ""Event Parser - public String GetReqno() +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -return requirement No; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public String GetProject() + + public void updateEvent(String str, String ID) { -return ProjectName; - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public String GetModule() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -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 -"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 +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - 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 +//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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +// 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 +"77 ""Model Driver + +String msg=""""""""; +public ModelDriver(String text) + { +this. msg = text; +init(); } -public Vector get Values From Data Base () + public void init() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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 +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 +"61 ""Worker Thread - if ( server . is Connected () ) - { - Buffered R +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + +/** + * 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: 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 +"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 +"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) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + 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 JPanel get Panel () + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - 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 +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 "49 ""Constraints Description private String project Name = null ; @@ -71080,558 +72013,335 @@ public int hash Code () { 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,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,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 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 user shall be able to construct speculative queries using a GUI.,115,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 -"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 -"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: 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 -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 -"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 -"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; -} - +",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: 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 +"58 ""Subscribed Model -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -do -{ -target = owner. getAssignment(); -if ( target!=null) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - 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 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 -"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 +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -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 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 +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 +"64 ""DOORs Thread Pool +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -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++ + //@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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - 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 DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - 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 String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } -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: 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 -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 -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 -"52 ""Pair + public String getProjectName() + { +return projectName; + } -private String queryID; - private String queryString; + public String getRequirementID() + { +return requirementID; + } + public String getToAttribute() + { +return toAttribute; + } - public Pair(String queryID, String queryString) { + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -this. queryID = queryID; -this. queryString = queryString; + public void setDescription(String description) + { +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public String getQueryID() { -return this. queryID; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public String getQueryString() { -return this. queryString; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - }"" -",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 -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 -"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 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: 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 -"52 ""Pair + 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() + { -private String queryID; - private String queryString; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - public Pair(String queryID, String queryString) { +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 +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 +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -this. queryID = queryID; -this. queryString = queryString; + /** +* 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 - public String getQueryID() { -return this. queryID; +/** +* 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 - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + /** +* 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; }"" -",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 -"78 ""Notification Event +",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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -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 + /** +* 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. +*/ -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e - public void ParseEvent(String TextLine) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +_ activeThreads++; +_ started = true; +notify(); + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +_ 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 +"85 ""Decompose Model - //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 -"91 ""Modify Model -public ModifyModel(EBT em) +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } @@ -71639,270 +72349,206 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - +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: 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 +"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 +"87 ""EBT - 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 -"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 +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() +public EBT(Frame f) { +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - 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) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - try - { -Notification +WorkArea. showText( sh); + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try + public boolean mouseDown( java. awt.Evente, int x, int y) { -Notification_Event nEvt1 = (Notificati - + return true; + } -/ 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 + public boolean mouseUp( java. awt.Evente, int x, int y) { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i - +return true; + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + public void mouseClicked( java. awt. event.MouseEvente) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +VisualPanel.Clicked( e. getX(), e. getY()); +} -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 +public void mouseExited( java. awt. event.MouseEvente){} -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - // 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 +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} +public void update(Graphics g) {} -private boolean Analyze_CheckSubscription(String str) + public JSplitPane getSplitPane() { -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 -"80 ""Requirement +return splitPane; +} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -public Requirement() {// empty constructor +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""""); -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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: 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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -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 -"89 ""Event Line + performance model Handler(String msg) + { +this. strES = msg; + } -protected int top, left, right, bottom; + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -public EventLine ( int t, int l, int r, int b) +//Re-execut +public String generateReport() { -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - 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() - { +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - while( true) - { - try + + public void saveModel( int id) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +// save current model +database. saveCurrentModel( id); + } -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + 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: 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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +public Requirement() { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - +} -public String searchQueryID(String date) +public Object clone() throws CloneNotSupportedException { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public String getConstraintFromDataBase(String queryID) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public String getDriverFromDataBase(String queryID) +public void ParseRequirement(String TextLine) { -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 -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 + 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 +"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 "60 ""Thread Pool /** @@ -71971,289 +72617,8 @@ for ( int i=0; i< threads. length; i++) { 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 -"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 -"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 -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 -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 -"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 -"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 -"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: 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 -"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 +",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: 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 "75 ""Driver String id; @@ -72345,177 +72710,143 @@ this. valueFrom = valueFrom; { 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 -"88 ""Event Model +",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 +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: 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: 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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -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); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec -public void getIP Server( String serverIP) +public String getChangedAttribute() { -this. serverIP = serverIP; +return changedAttribute; } - - 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 String getDescription() + { +return description; } -} - - -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() + public String getFromAttribute() { -//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)); -} +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + public String getProjectName() + { +return projectName; } - else + + public String getRequirementID() { -Even +return requirementID; + } + public String getToAttribute() + { +return toAttribute; + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } + public void setDescription(String description) + { +this. description = description; + } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + 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() + { -/** - * 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; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -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 + 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: 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: 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: 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 "70 ""Notification Processing // member variables for menu @@ -72622,490 +72953,210 @@ try 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 -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 -"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: 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 -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 -"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 -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 -"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 -"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 -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 -"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; - } +",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: 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: 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 +"82 ""Tokenizer - public void ClearVectors() +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public void drawModel() +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -repaint(); +return currentLine; } -public void drawModel(EBShape sh) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); +return errors; } -private void ClearData() +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) { -for ( int i = 0; i < EventShapes. size(); i++) +while( nextChar( ) ) { -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++) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - - - protected void BuildEvent(){} +return Character. isJavaIdentifierPart( ch ); +} - protected void AddLine( int t, int l, int r, int b) +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { -EventLines. addElement( new EventLine( t, l, r, b)); -} +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -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""""); - } + /** + * 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 - public StringBuffer GenerateEvent() +/** + * 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( ) { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} - 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 -"95 ""Text Model +/** + * 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 -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 +/** + * 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 - 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() +/** + * 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( ) { -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +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 +"62 ""Call Back -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + private Hash table performanceModelTable = new Hash table(); -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 -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 -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 -"73 ""Constraints + private PerformanceModel performance model= null -String id; - String name; - double value; - String logic; + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + public void createExecuteString() + { - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +public void parseImpactReport(String str) + { - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +Connection conn = null; +Statement stmt = null; - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - /** -* 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 +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: 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 "60 ""Thread Pool /** @@ -73174,547 +73225,261 @@ for ( int i=0; i< threads. length; i++) { 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 -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: 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; +",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 +"78 ""Notification Event - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +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, 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 +// constructor +public Notification_Event() { - - + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -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 -"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) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -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 +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -public void CheckNotifyStatus() + public void ParseEvent(String TextLine) { -//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) +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -EventLines. addElement( new EventLine( t, l, r, b)); -} + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -Even - - -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - 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++) + //This method displays the contents of two array list to console +public void DisplayValues() { -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 -"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; - } + 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 +"73 ""Constraints - public Vector getDrivers() - { -return driverVector; - } +String id; + String name; + double value; + String logic; - public String getName() - { -return name; - } - public void setName(String name) - { + Constraints(String id, String name, double value, String logic){ +this. id = id; this. name = name; +this. value = value; +this. logic = logic; } - 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(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - 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: 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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } -// 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 -"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; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public Vector getDrivers() - { -return driverVector; - } - public String getName() - { + /** +* Returns the name. +* @return String +*/ + public String getName() { return name; } - public void setName(String name) - { -this. name = name; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - 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) + /** +* 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: 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: 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: 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 +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 +"70 ""Notification Processing - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - public long getQueryID() - { -return this. queryID; - } + // database and eventserver information + S - public void setQueryID( long id) + public Notification_Processing() { -this. queryID = id; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public String toString() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -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 -"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= +try -private static class Precedence +public static void main(String args[]) + { +try { -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[ ] + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token +try { -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 +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -/** - * 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 +// 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"""" -/** - * 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( ); -} + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -/** - * 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 + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } -/* - * 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 + // 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) - /** - * 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. + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -/** - * 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. - */ +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { "" -",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 +",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 "95 ""Text Model private int CurrentEvent; @@ -73773,8 +73538,9 @@ 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 -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 +",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 +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: 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 "47 ""Impact Report private String server IP = """" local host """"; @@ -73913,710 +73679,674 @@ public void action Performed ( Action Event e ) { 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 -"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 -"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 ); -} - +",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 +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 +"50 ""Driver Description -/** - * 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; +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 - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - /** - * 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: 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 -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 -"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 -"62 ""Call Back +this. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; + } -private Hash table requirementDescTable = new Hash table(); + public String getDescription() + { +return description; + } - private Hash table constraintDescTable = new Hash table(); + public String getFromAttribute() + { +return fromAttribute; + } - private Hash table performanceModelTable = new Hash table(); + public String getModulePath() + { +return modulePath; + } - private PerformanceModel performance model= null + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - public void parseSpeculateInformation(String str) + public String getToAttribute() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -public void identifyPerformanceModels() + public void setDescription(String description) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. description = description; + } + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -public void pullInformationFromDoors() + public void setModulePath(String modulePath) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public void insertValuesInDataBase() + public void setRequirementID(String requirementID) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 void createExecuteString() + 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() { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void parseImpactReport(String str) +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 +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: 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: 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: 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 +"51 ""Driver Inner Panel -Connection conn = null; +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; -Statement stmt = null; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -Vector constraintsVector = null; -Vector driversVector = null; +panel = new JPanel(); -ConstraintsDescription constraint = null; +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -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: 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 -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 -"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;/ +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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -// finds the subscribers for this requirement - public void IdentifySubscribers() + + public void updateEvent(String str, String ID) { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; 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 +String mDate; +String mReqtext; -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // 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 +//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 - public String getErrorMessage() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { - return errMsg; - } +// 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 boolean Contains(String ContextString, String SearchString) + public void speculate(String str) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +System. out. println(""""Speculate""""); +CallBack -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 -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 -"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. -*/ +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 +"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 +"53 ""Performance Model - synchronized public void waitDone() +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) { -try { - while ( _ activeThreads>0 ) { -wait(); +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + public Vector getConstraints() { -try { - while ( !_ started ) { -wait(); +return constraintVector; } -} catch ( InterruptedException e - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public Vector getDrivers() { -_ activeThreads++; -_ started = true; -notify(); +return driverVector; } - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String getName() { -_ activeThreads--; -notify(); +return name; } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public void setName(String name) { -_ 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 -"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. -*/ +this. name = name; + } - synchronized public void waitDone() + public void addDriver(DriverDescription driver) { -try { - while ( _ activeThreads>0 ) { -wait(); +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + public void removeDriver(DriverDescription driver) { -try { - while ( !_ started ) { -wait(); +this. driverVector. remove( driver); } -} catch ( InterruptedException e - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public boolean containsDriver(DriverDescription driver) { -_ activeThreads++; -_ started = true; -notify(); +return this. driverVector. contains( driver); } - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public void addConstraint(ConstraintsDescription constraint) { -_ activeThreads--; -notify(); +this. constraintVector. add( constraint); } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public boolean containsConstraint(ConstraintsDescription constraint) { -_ 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: 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 -"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 +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { + dd = (DriverDescription) this. driverVector. get( i) -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - + cd = (ConstraintsDescription) this -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public long getQueryID() { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - +return this. queryID; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + 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 +"53 ""Performance Model -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -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 -"90 ""Merge Model + 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 MergeModel(EBT em) + public Vector getConstraints() { -super( em); - MinimumNoRects = 3; +return constraintVector; } + public Vector getDrivers() + { +return driverVector; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + public String getName() + { +return name; + } + public void setName(String name) + { +this. name = name; + } -public StringBuffer GenerateEvent() + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -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 -"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; - +} +else + this. driverVector. add( driver); + } - DOORsThread(ServerSocket ss) + public void removeDriver(DriverDescription driver) { - theServer = ss; - count++; - taskNumber = count; +this. driverVector. remove( driver); } - - public void run() + public boolean containsDriver(DriverDescription driver) { +return this. driverVector. contains( driver); + } - while( true) - { - try + public void addConstraint(ConstraintsDescription constraint) { -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 -"62 ""Call Back +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -private Hash table requirementDescTable = new Hash table(); + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - private Hash table constraintDescTable = new Hash table(); + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - private Hash table performanceModelTable = new Hash table(); + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - private PerformanceModel performance model= null + public long getQueryID() + { +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } - public void parseSpeculateInformation(String str) + public String toString() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -public void pullInformationFromDoors() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +try -public void insertValuesInDataBase() +public static void main(String args[]) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - +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 - public void createExecuteString() +// 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"""" -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) + private void saveMenuItemActionPerformed (ActionEvent evt) { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } -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 -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 -"82 ""Tokenizer + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { -return currentLine; -} + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -/** - * 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( ) ) +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 +"77 ""Model Driver +String msg=""""""""; - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +public ModelDriver(String text) + { +this. msg = text; +init(); + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + 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: 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: 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 +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 +"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 +"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 +"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;/ -for( ; nextChar( ); result += ch ) + 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 - /** - * 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 +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * 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--; +String sName, sReqno, sModule, sKey1, sKey2; 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 -"79 ""performance model Handler + System. o -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + // 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. - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + public void Dispatch - performance model Handler(String msg) + public String getErrorMessage() { -this. strES = msg; + return errMsg; } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -//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; +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 +"85 ""Decompose Model -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - 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: 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 -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 +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: 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: 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: 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 restore the executable model to its prior state.,119,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: 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 "88 ""Event Model @@ -74732,432 +74462,535 @@ 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 -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 -"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: 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 -"78 ""Notification Event +",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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -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 + /** +* 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. +*/ -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e - public void ParseEvent(String TextLine) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +_ activeThreads++; +_ started = true; +notify(); + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +_ 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: 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 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - //This method displays the contents of two array list to console -public void DisplayValues() +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - 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: 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +public String GetSubscriberName() { return SubscriberName;} - EventServerThread(ServerSocket ss) +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 +"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 +"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() { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +return projectName; + } + + public String getRequirementID() { +return requirementID; + } - while( true) + public String getToAttribute() { - try +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } -public String getNextID() + public void setFromAttribute(String fromAttribute) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -public String searchDate() + public void setProjectName(String projectName) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -public String searchQueryID(String date) + public void setToAttribute(String toAttribute) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +this. toAttribute = toAttribute; + } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - public String getConstraintFromDataBase(String queryID) + public boolean equals(Object o) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +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 String getDriverFromDataBase(String queryID) +public int hashCode() { -String driverString = new String(); -try +int hashCode = 0; +if ( hashCode == 0) { - 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 -"88 ""Event Model + 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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -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); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec -public void getIP Server( String serverIP) +public String getChangedAttribute() { -this. serverIP = serverIP; +return changedAttribute; } + public String getDescription() + { +return description; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public String getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } -public void drawModel() -{ -repaint(); -} + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public String getToAttribute() + { +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + public void setDescription(String description) + { +this. description = description; } -} + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -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 setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public void CheckNotifyStatus() + public void setRequirementID(String requirementID) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - protected void BuildEvent(){} + 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() + { - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +public int hashCode() { -Even +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 +"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; -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + 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 +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 +"private JPanel center Panel = null ; - 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: 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: 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: 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 -"74 ""database + 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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + public Speculate Gui () + { - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + super ("" Speculate GUI ""); + container = get Content Pane (); - /** - * 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 + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** -* 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 + // Submit Listener + public void action Performed ( Action Event e ) { - /** -* 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 + if ( e . get Source () == submit Button ) { + send Query TO Server (); -/** -* 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 + if ( e . get Source () == fetch Button ) { -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + System . out . println ("" Fetch Button Pressed -public void getTrackVariableName() + void send Query TO Server () { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse + String ip = this . event Server IP ; + int Port No = 1701 ; -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 + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - public Vector getImpactReport() + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () { -//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 -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 -"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. -*/ + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + String [] attribute = { "" Value "", "" Attribute "" }; -/** -* 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 + String project Name = this . proj Name Text . get -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public static void main ( String [] args ) { -_ activeThreads++; -_ started = true; -notify(); - } + 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 +"85 ""Decompose Model - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - /** -* 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: 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 + // 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 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -75223,7 +75056,130 @@ 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 +",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 +"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 +"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 "50 ""Driver Description private String projectName = null; @@ -75353,230 +75309,539 @@ if ( hashCode == 0) 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 -"64 ""DOORs Thread Pool +",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 +"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: 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 +"81 ""subscribermanager -public final static int defaultPort = 2347; +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: 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 +"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 +"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 +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 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; ServerSocket theServer; - // static int numberOfThreads = 3; + private Connection conn; + private Statement stmt; + private ResultSet rs; - //@param argsNo arguments are used. - public static void main(String args[]) + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) { -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 -"80 ""Requirement +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 +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 +"63 ""Doors Thread -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public Requirement() {// empty constructor + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + 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 +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 +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 +"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(); - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +//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 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: 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 -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 -"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 +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public void saveModel( int id) { -this. id = id; -this. type = type; -this. +// save current model +database. saveCurrentModel( id); + } + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -//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 + 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 +"82 ""Tokenizer -//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 +/** + * 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; +} -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +/** + * 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( ) ) +{ - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - /** -* 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; - } + * 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +/** + * 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 ) { } +} - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +/** + * 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +/** + * 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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +/** + * 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 +"71 ""Requirement - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + 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 +"65 ""About Dialog - /** -* 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 -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 +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: 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 +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 "57 ""Event Notifier // Variables to process the requirement private String requirement No;//Requirement No. @@ -75630,295 +75895,267 @@ 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 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; +",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 +"92 ""New Model - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public NewModel(EBT em) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - +super( em); + } - 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; + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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 +"88 ""Event Model -//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 +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); -//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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public void speculate(String str) +public void getIP Server( String serverIP) { -System. out. println(""""Speculate""""); -CallBack +this. serverIP = serverIP; + } -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 -"89 ""Event Line + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -protected int top, left, right, bottom; +public void drawModel() +{ +repaint(); +} -public EventLine ( int t, int l, int r, int b) + +public void drawModel(EBShape sh) { -top = t; -left = l; -right = r; -bottom = b; +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -public int GetT() { return top;} +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -public int GetL() { return left;} -public int GetR() { return right;} +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 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 -"92 ""New Model -public NewModel(EBT em) +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { -super( em); - } +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - // Construct Visual model for Merge Event -public void BuildEvent() + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +EventLines. addElement( new EventLine( t, l, r, b)); } -public StringBuffer GenerateEvent() +protected void AddEventRect( int x, int y, int colorStatus) { -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: 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 -"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; +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + 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: 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: 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 +"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 - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +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 - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 +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 +"86 ""EB Shape - /** -* 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 user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,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; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) +public EBShape( int xpos, int ypos, Color col) { - try +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public String getNextID() + public boolean match( int mx, int my) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +return true; + } -public String searchDate() + public int GetX() { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +return x; + } -public String searchQueryID(String date) + public int GetY() { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +return y; + } + + public Color GetC() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +return c; + } + public String GetReqno() + { +return requirement No; + } - public String getConstraintFromDataBase(String queryID) + public String GetProject() { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +return ProjectName; + } - public String getDriverFromDataBase(String queryID) + public String GetModule() { -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: 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: 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 -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 +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 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -75984,1358 +76221,1313 @@ 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 -"49 ""Constraints Description +",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: 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 +"85 ""Decompose Model -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 DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; - public String get Description () { - return this . description ; - } + /** +* 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. +*/ - public String get Logic () { - return this . logic ; + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - public String get Module Path () { - return this . module Path ; +/** +* 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 - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } + /** +* 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 +"77 ""Model Driver - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +String msg=""""""""; - public void set Project Name ( String project Name ) { - this . project Name = project Name ; +public ModelDriver(String text) + { +this. msg = text; +init(); } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + 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 +"87 ""EBT - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public String get Performance Model Name () { - return this . performance Model Name ; + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public String to String () { + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +public void mouseExited( java. awt. event.MouseEvente){} -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 void mousePressed( java. awt. event.MouseEvente){} -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: 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 -"90 ""Merge Model +public void mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +public void paint(Graphics g) {} +public void update(Graphics g) {} - // Construct Visual model for Merge Event -public void BuildEvent() + public JSplitPane getSplitPane() { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +return splitPane; +} -public StringBuffer GenerateEvent() +public void valueChanged(ListSelectionEvent e) { -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 -"77 ""Model Driver - -String msg=""""""""; +if ( e. getValueIsAdjusting()) +return; +} -public ModelDriver(String text) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -this. msg = text; -init(); - } +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""""); - 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 -"92 ""New Model +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 +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 +"94 ""Refine Model -public NewModel(EBT em) +public RefineModel(EBT em) { super( em); } - // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = 3; } - 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: 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 -"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; - } +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 +"62 ""Call Back - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; - } +private Hash table requirementDescTable = new Hash table(); - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } + private Hash table constraintDescTable = new Hash table(); - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + private Hash table performanceModelTable = new Hash table(); - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } + private PerformanceModel performance model= null - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public void parseSpeculateInformation(String str) { -return this. constraintVector. contains( constraint); - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) +public void identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +Enumeration subscriberTableEnumeration = nu - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() +public void pullInformationFromDoors() { -return this. queryID; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() +public void insertValuesInDataBase() { -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 -"88 ""Event Model +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -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 void createExecuteString() + { - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public void getIP Server( String serverIP) +public void parseImpactReport(String str) { -this. serverIP = serverIP; - } +Connection conn = null; - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public void drawModel() -{ -repaint(); -} +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 +"62 ""Call Back -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +private Hash table requirementDescTable = new Hash table(); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -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 + private PerformanceModel performance model= null -public void CheckNotifyStatus() + public void parseSpeculateInformation(String str) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - protected void BuildEvent(){} +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +public void insertValuesInDataBase() { -Even - +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -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 + public void createExecuteString() + { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - 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 -"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++) +public void parseImpactReport(String str) { -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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +Connection conn = null; -public Requirement() -{ -} +Statement stmt = null; -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +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 +"52 ""Pair -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 -"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 -"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 -"86 ""EB Shape +private String queryID; + private String queryString; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; } + public String getQueryID() { +return this. queryID; + } - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); + public String getQueryString() { +return this. queryString; } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - public boolean match( int mx, int my) - { -return true; + public void setQueryString(String queryString) { +this. queryString = queryString; } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public int GetX() - { -return x; - } + }"" +",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 +"66 ""Config Dialog - public int GetY() - { -return y; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public String GetProject() - { -return ProjectName; - } +// 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 - 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 -"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 -"74 ""database +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +// 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 +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 +"60 ""Thread Pool - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +/** +* 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); - /** - * Construct a connection object. - * @param Returns an object of type Connection +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public ThreadPool( int size) { - Class. fo - +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 /** -* 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 +* Get a new work assignment. +* +* @return A new assignment */ - public int get + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* 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 +* Called to block the current thread until +* the thread pool has no more work. */ - public void saveCurrentModel( int graphId) + public void complete() { -conn = this. getConnect +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: 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 +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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -/** -* 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 + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - /** -* 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) + + performance model Handler(String msg) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +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(); -public void solveStructureEquation() +//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) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +// 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 +"88 ""Event Model -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 +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 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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public Vector getImpactReport() +public void getIP Server( String serverIP) { -//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 -"83 ""Variable +this. serverIP = serverIP; + } -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 + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - //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. +public void drawModel() +{ +repaint(); +} -//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 +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -//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 +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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 - /** -* Returns the id. -* @return int -*/ - public String getId() +public void CheckNotifyStatus() { -return id; - } +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } + protected void BuildEvent(){} - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; +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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + 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 +"93 ""Obsolete Model - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; +public ObsoleteModel(EBT em) +{ +super( em); } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +// 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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +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: 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 +"89 ""Event Line +protected int top, left, right, bottom; - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +public int GetT() { return top;} - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public int GetL() { return left;} +public int GetR() { return right;} - /** -* 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: 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 -"74 ""database +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: 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 +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 +"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;/ -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + 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 - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +// 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 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -System. out. println("""" in get Connection""""); -Connection connect=null; + +String sName, sReqno, sModule, sKey1, sKey2; try { - Class. fo + 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 - /** -* 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 + + public String getErrorMessage() + { + return errMsg; + } - /** -* 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) + public boolean Contains(String ContextString, String SearchString) { -conn = this. getConnect +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 +"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: 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 +"58 ""Subscribed Model -/** -* 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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - /** -* 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 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 void solveStructureEquation() +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 +"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 ) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -public void getTrackVariableName() + +public Vector get Values From Data Base () { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R -public void setCalculatedValues() + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public Vector getImpactReport() + +public JPanel get Panel () { -//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 -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 -"92 ""New Model + 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 +"93 ""Obsolete Model -public NewModel(EBT em) +public ObsoleteModel(EBT em) { super( em); } - // Construct Visual model for Merge Event +// Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve 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 -"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; - } +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,Event types shall include modifying a requirement.,124,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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + // 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""""); -//Re-execut -public String generateReport() +addWindowListener( new WindowAdapter() { - 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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public void saveModel( int id) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -// save current model -database. saveCurrentModel( id); - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - 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 -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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +/ 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 -public Requirement() {// empty constructor -} +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + m_Deleterequirement List. remove(0); - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +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 -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 -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 -"52 ""Pair -private String queryID; - private String queryString; +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public Pair(String queryID, String queryString) { + // 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 -this. queryID = queryID; -this. queryString = queryString; - } - public String getQueryID() { -return this. queryID; - } +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: 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 +"76 ""Evaluator - public String getQueryString() { -return this. queryString; - } +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= - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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 - }"" -",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 -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 -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 -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 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 -"92 ""New Model -public NewModel(EBT em) +private static class Token { -super( em); - } +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 { - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; } - -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: 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 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. + * 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. */ -private static class Symbol -{ -public chartoken; -public int theLine; +public Token getToken -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. +/** + * 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 Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} +/** + * 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 /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * Internal method that hides type-casting. + * Changed the method to support double */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** - * Print an error message if clSym does not match opSym. - * Update errors. + * Another internal method that hides type-casting. */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - /** - * 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. +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. */ -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 -"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 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - +private void processToken( Token lastToken ) { +System. out. printl - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +/* + * 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 -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 -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 -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 -"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 + /** + * 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. - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +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: 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 +"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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -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 + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -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 Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - 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 String get Description () { + return this . description ; + } - 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 String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - 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 String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -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 -"78 ""Notification Event + public void set Description ( String description ) { + this . description = description ; + } -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 void set Logic ( String logic ) { + this . logic = logic ; + } -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -// 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 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 ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + public void set Units ( String units ) { + this . units = units ; + } + public void set Value ( String units ) { + this . value = units ; + } -// 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 + 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 ; + } - //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 -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 -"90 ""Merge Model + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -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 -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 +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 "89 ""Event Line protected int top, left, right, bottom; @@ -77357,268 +77549,65 @@ 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 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: 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 -"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 - +",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 +"61 ""Worker Thread -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: 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 -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: 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 -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 -"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. +* True if this thread is currently processing. */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - +public boolean busy; /** - * 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. + * The thread pool that this object belongs to. */ -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 -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 -"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); +public ThreadPool owner; /** -* A Done object that is /** * The constructor. * - * @param sizeHow many threads in the thread pool. + * @param o the thread pool */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +WorkerThread(ThreadPool o) { -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(); +owner = o; } -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 -"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) +/** + * Scan for and execute tasks. + */ +public void run() { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - +Runnable target = null; -private void okButtonActionPerformed (ActionEvent evt) +do { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +target = owner. getAssignment(); +if ( target!=null) { -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 -"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 + 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 +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 +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 +"64 ""DOORs Thread Pool +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - performance model Handler(String msg) - { -this. strES = msg; - } - public void messageParser() + //@param argsNo arguments are used. + public static void main(String args[]) { -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) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -// 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 + 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 "89 ""Event Line protected int top, left, right, bottom; @@ -77640,286 +77629,468 @@ 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 -"54 ""eventserver +",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 +"94 ""Refine Model -public static void (String args[]) +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 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 +"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( int i=0; i<4; i++) + 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 +"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() { -p +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -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: 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 -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 -"48 ""Constraint Inner Panel +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -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 +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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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(); } -public Vector get Values From Data Base () + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +openEventsMenuItemActionPerformed( evt); + } - if ( server . is Connected () ) - { - Buffered R + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -public JPanel get Panel () +void UpdateDisplayList() { - 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 -"47 ""Impact Report +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: 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,The subscribermanager shall re execute the model using the speculative values.,117,0 +"71 ""Requirement -private String server IP = """" local host """"; - private JPanel center Panel = null ; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - private JPanel driver Panel = new JPanel (); +public Requirement() +{ +} - private JPanel driver Inner Panel = null ; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - super ("""" Search Result GUI """"); +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - container = get Content Pane (); + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - set Size ( 800 , 250 ); + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { - panel = new JPanel (); + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public static void main ( String [] args ) +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - Impact Report im = new Impact Report (); - } +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public Vector search Date () + public String getConstraintFromDataBase(String queryID) { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - 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 ) + 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 +"66 ""Config Dialog - pair Vector = new Vector (); +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - Socket server ; - String line = new String (); +// 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 - // Select Actions - public void action Performed ( Action Event e ) - { +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +// 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: 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 +"83 ""Variable - // Button Actions +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 -public void action Performed ( Action Event e ) { + //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. - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +//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 - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +//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 void impact Report ( String id ) +public String toString() { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - // super ("""" Impact Report """"); - - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } - public Vector get Constraint From Data Base () + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - Vector v = new Vector (); - - Socket server ; - String line = new String (); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered + /** +* 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; + } - public Vector get Driver From Data Base () - { - Vector v = new Vector (); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -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 -"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; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",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 +",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 "73 ""Constraints String id; @@ -78011,122 +78182,326 @@ this. name = name; 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 -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 -"52 ""Pair +",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 +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; -private String queryID; - private String queryString; + /** +* 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: 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 +"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) - public Pair(String queryID, String queryString) { + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -this. queryID = queryID; -this. queryString = queryString; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +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 +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: 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 +"78 ""Notification Event - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +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 void setQueryString(String queryString) { -this. queryString = queryString; - } +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +// 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 - }"" -",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 -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + 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 - /** -* 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() +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +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 +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 +"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 +"72 ""Balance /** -* 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 + * 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 ); +} /** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + * 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; /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || /** -* 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 -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 + * 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 +"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 +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 +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: 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 "94 ""Refine Model public RefineModel(EBT em) @@ -78148,27 +78523,8 @@ 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: 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 -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: 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 -"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 +",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 +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 "58 ""Subscribed Model private String SubscriberName; @@ -78195,148 +78551,349 @@ 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 -"63 ""Doors Thread +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 +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 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,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"82 ""Tokenizer -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + +/** + * 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: 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: 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: 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 +"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 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); } - public void run() - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - 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 -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 -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: 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 -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 -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: 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 -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 -"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; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } + 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: 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 +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 +"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 void run() + 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 - while( true) - { - try +// finds the subscribers for this requirement + public void IdentifySubscribers() { -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 -"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; +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 - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) - { - try +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - -public String getNextID() - { +String sName, sReqno, sModule, sKey1, sKey2; try { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + 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 String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + public void Dispatch -public String searchQueryID(String date) + public String getErrorMessage() { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + return errMsg; + } - public String getConstraintFromDataBase(String queryID) + public boolean Contains(String ContextString, String SearchString) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - 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 +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 +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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -78420,576 +78977,175 @@ 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 -"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 -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 subscribermanager shall immediately process speculative events.,116,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 -"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 -"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 -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 -"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 -"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 -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 -"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 = """"""""; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public boolean match( int mx, int my) - { -return true; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public int GetX() - { -return x; + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; } - public int GetY() - { -return y; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public String GetProject() - { -return ProjectName; - } + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - 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 -"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 + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() -{ + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + /** +* 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 +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 +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 +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 +"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; -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + EventServerThread(ServerSocket ss) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -Notification - -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + while( true) { -if (! listModel. isEmpty()) -{ - int index =0; try { -Notification_Event nEvt1 = (Notificati - +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -/ 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) +public String getNextID() { try { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -void DeleteRelatedEvents() +public String searchDate() { -while ( m_Deleterequirement List. size()!=0) +String dateString = new String(); +Vector dateVector = new Vector(); +try { - 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 + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -void UpdateDisplayList() +public String searchQueryID(String date) { -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 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -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: 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 -"94 ""Refine Model -public RefineModel(EBT em) + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -super( em); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} -public StringBuffer GenerateEvent() + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { -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: 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 -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 + 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 +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 +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 "70 ""Notification Processing // member variables for menu @@ -79096,74 +79252,239 @@ try 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: 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 -"86 ""EB Shape +",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: 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 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +public Requirement() {// empty constructor -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void Updaterequirement Info(String rno, String pname, String mname) + 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 +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 +"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) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + 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 boolean match( int mx, int my) +public String getNextID() { -return true; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public int GetX() +public String searchDate() { -return x; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public int GetY() +public String searchQueryID(String date) { -return y; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public Color GetC() + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -return c; - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public String GetReqno() + + public String getDriverFromDataBase(String queryID) { -return requirement No; - } +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 +"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 + */ - public String GetProject() - { -return ProjectName; - } +private void skip - 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 +/** + * 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 "70 ""Notification Processing // member variables for menu @@ -79270,147 +79591,172 @@ try 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 -"65 ""About Dialog +",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 +"49 ""Constraints Description -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: 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 -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: 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 -"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 -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;/ +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 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() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -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 + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -//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 String get Description () { + return this . description ; + } - public void Dispatch + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - public String getErrorMessage() - { - return errMsg; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + public String get Units () { + return this . units ; + } -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: 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 -"60 ""Thread Pool + public String get Value () { + return this . value ; + } -/** -* 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); + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } -/** -* 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 + 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 ; + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + 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 +"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) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + theServer = ss; + count++; + taskNumber = count; + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + public void run() { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + + while( true) { -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: 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 + 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: 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 "private JPanel center Panel = null ; private JLabel des Label = null ; @@ -79479,154 +79825,40 @@ Test case: Events are displayed in the order in which they are received.(6.1) Pr 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 -"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 - + }",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 +"91 ""Modify Model - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public ModifyModel(EBT em) { - 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 -"69 ""Notification Event +super( em); + } -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() + // Construct Visual model for Merge Event +public void BuildEvent() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -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(); +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -if ( m_Eve -public void DisplayValues() + protected void paintComponent(Graphics g) { - 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 -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 +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 +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: 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 "68 ""Events Processor // event list private JList eventList; @@ -79742,635 +79974,683 @@ 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 -"62 ""Call Back +",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 +"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 +"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 Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +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 parseSpeculateInformation(String str) +public void CheckNotifyStatus() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + protected void BuildEvent(){} -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -public void insertValuesInDataBase() +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +Even +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public void parseImpactReport(String str) - { + 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: 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 +"92 ""New Model -Connection conn = null; +public NewModel(EBT em) +{ +super( em); + } -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -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: 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 -"81 ""subscribermanager +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 +"52 ""Pair -Socket aSocket; - int ID; - String EventLog; +private String queryID; + private String queryString; - Connection conn; - ResultSet rs; - Statement stmt; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + public Pair(String queryID, String queryString) { - // 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 -{ +this. queryID = queryID; +this. queryString = queryString; + } -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -// 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 -{ + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - // 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 -"82 ""Tokenizer + }"" +",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 +"87 ""EBT -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public EBT(Frame f) { -return currentLine; -} +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -return errors; -} +WorkArea. showText( sh); + } -/** - * 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( ) ) -{ + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) + public void mouseClicked( java. awt. event.MouseEvente) { -return Character. isJavaIdentifierPart( ch ); +VisualPanel.Clicked( e. getX(), e. getY()); } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; +public void mouseExited( java. awt. event.MouseEvente){} -for( ; nextChar( ); result += ch ) +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - /** - * 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 +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} -/** - * 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( ) +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } +return splitPane; } -/** - * 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 - */ +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -private void skip +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""""); -/** - * 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( ) +mainframe. addWindowListener( new WindowAdapter() { -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 -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 -"83 ""Variable +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 +"64 ""DOORs Thread Pool -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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + //@param argsNo arguments are used. + public static void main(String args[]) { -this. id = id; -this. type = type; -this. - - -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - + 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 +"87 ""EBT -//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 +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public boolean mouseDown( java. awt.Evente, int x, int y) { -return logic; + return true; } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +public void mouseExited( java. awt. event.MouseEvente){} - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +public void update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +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""""); - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +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: 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: 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 +"82 ""Tokenizer - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - /** -* 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 -"90 ""Merge Model +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +/** + * 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( ) ) +{ - // Construct Visual model for Merge Event -public void BuildEvent() + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +return Character. isJavaIdentifierPart( ch ); +} -public StringBuffer GenerateEvent() +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { -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 -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: 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 -"86 ""EB Shape +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -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 = """"""""; - } + /** + * 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 - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +/** + * 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 ) { } +} - public boolean match( int mx, int my) - { -return true; - } +/** + * 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 - public int GetX() - { -return x; - } +/** + * 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 - public int GetY() - { -return y; - } - public Color GetC() +/** + * 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( ) { -return c; - } +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 +"58 ""Subscribed Model - public String GetReqno() - { -return requirement No; - } +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - public String GetProject() - { -return ProjectName; - } +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 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 -"84 ""White Board Execution Graph +public String GetSubscriberReqno() { return SubscriberReqno;} -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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 +"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""""); - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +addWindowListener( new WindowAdapter() +{ -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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -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 +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - 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 +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 - 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 +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -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 +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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { -} + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + // 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 - 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: 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: 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 + +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 "47 ""Impact Report private String server IP = """" local host """"; @@ -80488,152 +80768,29 @@ public void action Performed ( Action Event e ) { { 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 -"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 ) { } -} + if ( server . is Connected () ) + { + Buffered -/** - * 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 + public Vector get Driver From Data Base () + { -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + Vector v = new Vector (); -private void skip + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -/** - * 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 + 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 +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 "80 ""Requirement public String m_RequirementID =""""""""; @@ -80664,104 +80821,7 @@ public void ParseRequirement(String TextLine) { 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 -"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 -"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 +",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 "77 ""Model Driver String msg=""""""""; @@ -80779,273 +80839,213 @@ 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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 +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 +"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 +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 +"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 +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 +"73 ""Constraints - /** -* 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. -*/ +String id; + String name; + double value; + String logic; - 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(); + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } -} 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(); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the id. +* @return int */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public String getId() { +return id; } /** -* Called to reset this object to -* its initial state. +* Returns the logic. +* @return String */ - 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 -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 -"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 String getLogic() { +return logic; } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} - -public void mouseExited( java. awt. event.MouseEvente){} + /** +* 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; + } -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + /** +* 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 +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 +"90 ""Merge Model -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -public void valueChanged(ListSelectionEvent e) + // Construct Visual model for Merge Event +public void BuildEvent() { -if ( e. getValueIsAdjusting()) -return; -} + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -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[]) +public StringBuffer GenerateEvent() { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +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: 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 +"93 ""Obsolete Model -mainframe. addWindowListener( new WindowAdapter() +public ObsoleteModel(EBT em) { -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: 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 -"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 -"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 +super( em); + } - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +// Construct Visual model for Merge Event +public void BuildEvent() { - 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 + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve - /** -* 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) +public StringBuffer GenerateEvent() { -conn = this. getConnect - +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 +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 +"94 ""Refine Model -/** -* 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 +public RefineModel(EBT em) +{ +super( em); + } - /** -* 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 + // 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 +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 +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 +"91 ""Modify Model -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 ModifyModel(EBT em) +{ +super( em); + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -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 StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - 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 + 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 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